Commit Graph

33 Commits

Author SHA1 Message Date
Rohit Jnagal
cbdd96a554 Add task load stats to containers.
The stats are only populated when cAdvisor is running outside network namespaces.
We'll add a different backend to retrieve the same data from within namespaces.
2015-01-16 23:25:22 +00:00
Victor Marmol
62b8382921 Handle initial zero value of lastError.
Also reduce logging to once every minute.
2015-01-08 10:31:32 -08:00
Rohit Jnagal
b0462e3e94 Log one error message per hour for failing containers. 2014-12-23 00:49:48 +00:00
Katie Knister
cd8a7923ae Caches container info for 5 seconds before updating it 2014-12-16 17:32:01 -08:00
Victor Marmol
e3ab15417c Ignore update errors for dead containers.
This adds an Exists() interface to detect when the container is dead.
Before reporting an update error we check is Exists() is true.

Some documentation was added as well.
2014-11-22 05:31:11 +08:00
Victor Marmol
4b9861246f Remove unused code. 2014-11-20 15:22:47 +08:00
Victor Marmol
f97e57df88 Simplify how the Docker containers are handled.
This is done by introducting the concept of "namespaces" of container
names. The aliases of a container are under this namespace. Namespace
names are of the form:

//<namespace>/<alias>

This allows us to (within cAdvisor) query all docker containers as
//docker regardless of whether this is a systemd or a non-systemd system.

This does break our ability to handle Docker aliases with the /container
endpoint. I think this is acceptable as our support there was not
consistent between system types.
2014-11-12 18:01:47 -08:00
Victor Marmol
add5147769 Flatten ContainerStats struct 2014-10-20 11:17:20 -07:00
Victor Marmol
62b37eca1d Adding --log_cadvisor_usage flag to log the resource usage of cAdvisor.
This helps during performance analysis.
2014-10-15 08:18:38 -07:00
Satnam Singh
8551d376d8 Undo changes to if statements as requested by vmarmol. Fix typos in my changes. 2014-09-24 10:59:18 -07:00
Satnam Singh
bae82a583d A few minor Go style suggestions. 2014-09-24 10:53:52 -07:00
Vish Kannan
195772a1bc Merge pull request #245 from vmarmol/tests
Refactor and dependency inject containerData deps
2014-09-22 10:39:55 -07:00
Victor Marmol
e759059a09 Refactor and dependency inject containerData deps 2014-09-22 10:20:54 -07:00
Victor Marmol
e22831f1bd Flatten ContainerSpec. 2014-09-19 10:14:22 -07:00
Victor Marmol
621bb22eeb Make dynamic housekeeping flag configurable 2014-09-16 11:04:45 -07:00
Victor Marmol
4e028d7995 Make housekeeping interval dynamic, fist signal is resource usage.
If no resources are used by the container since the last housekeeping,
we double the housekeeping interval until --max_housekeeping_interval.
If usage was detected, we drop it back to the baseline
(--housekeeping_interval).

From my tests this reduces CPU usage in CoreOS from ~8% to ~3% with no
real loss of accuracy.

Fixes #159
2014-09-10 15:01:54 -07:00
Victor Marmol
1bdef9797b Prepare housekeeping interval to be dynamic.
Change housekeeping to be from a fixed interval to a possibly varied
interval decided by nextHousekeeping().
2014-09-09 14:00:30 -07:00
Victor Marmol
c692e9388d Move the initial housekeeping tick to the housekeeping thread.
This significantly reduces startup time.
2014-09-03 21:45:57 -07:00
Victor Marmol
3d10fc747c Make the duration of housekeeping flag configurable. 2014-08-30 19:57:53 -07:00
Vishnu Kannan
1a24eed18f Fix storage driver buffer duration default value.
The cache will now hold atlest the minimum number of stats required by the UI and more
if the buffer duration is longer than the default.

Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
2014-08-20 20:46:14 +00:00
Vishnu Kannan
3e390e0f33 Use glog instead of 'log' library.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
2014-08-07 18:38:58 +00:00
Nan Deng
e18c7fbf8f report error if there's a nil storage driver 2014-06-17 15:07:41 -07:00
Nan Deng
3718b139b3 remove StatsPercentiles in container handler 2014-06-17 12:55:51 -07:00
Victor Marmol
fbf6e85fc7 Renaming StatsSummary to StatsPercentiles 2014-06-16 17:49:37 -07:00
Nan Deng
a6763f4525 gofmt -r "WriteStats->AddStats" 2014-06-16 14:55:39 -07:00
Nan Deng
dc9f4422b4 rename 2014-06-16 14:51:35 -07:00
Nan Deng
a8401c422e stats writers 2014-06-16 14:49:59 -07:00
Victor Marmol
410c27a84f Track a container by all of its aliases 2014-06-13 18:24:59 -07:00
Nan Monnand Deng
fa0f3efab7 fix the memory leak problem mentioned in #26 2014-06-13 14:02:26 -04:00
Nan Deng
312bcae2db gofmt -r "ContainerRef->ContainerReference" -w -l . 2014-06-12 17:32:46 -07:00
Nan Deng
163179a84e changed pages and manager. 2014-06-12 17:31:26 -07:00
Nan Deng
2f4e76b648 rename 2014-06-12 14:39:33 -07:00
Victor Marmol
712f9fb32f Migrating cAdvisor code from lmctfy 2014-06-09 12:12:07 -07:00