Commit Graph

64 Commits

Author SHA1 Message Date
Victor Marmol
675c09e296 Remove stats from cache when container is destroyed 2015-06-10 07:53:46 -07:00
Rohit Jnagal
eb8f941ba6 Make process listing work when cadvisor is running in docker.
Use /rootfs/proc to build the process listing.
2015-06-04 18:49:43 +00:00
Rohit Jnagal
1a2781819e Separate in-memory cache from storage drivers. 2015-06-02 16:06:01 +00:00
Rohit Jnagal
d8fb3c802f Add cgroup info and links to the process list on root page. 2015-05-20 03:19:56 +00:00
Rohit Jnagal
1ca29f8f20 Improve process table output.
Use pretty prints, but maintain sorting capabilities.
2015-05-19 16:33:56 +00:00
Rohit Jnagal
3bcae7f430 Add memory-percent to ps output. 2015-05-12 22:44:48 +00:00
Rohit Jnagal
2a99748874 Add process information to the UI.
For root, we report all processes. Process stats are refreshed every minute.
2015-05-12 19:08:12 +00:00
Victor Marmol
d61a381e84 Merge pull request #707 from rjnagal/docker
Add an api to support ps/top.
2015-05-11 23:01:24 -07:00
Rohit Jnagal
5e10989a78 Add an api to support ps/top. 2015-05-12 00:06:47 +00:00
Victor Marmol
4fdd709717 Collectors export metrics from Collect(). 2015-05-11 12:26:51 -07:00
Victor Marmol
834d1cf34e Lower logging level of some common logs. 2015-05-06 10:24:50 -07:00
Victor Marmol
bce54ce3f5 Run custom collectors in container housekeeping.
This will allow us to register and run custom collectors for each
container.
2015-05-04 15:57:18 -07:00
Victor Marmol
11462d80bc Lowering log levels.
Reduce common logging using Kubernetes logging standards.
2015-04-13 15:05:41 -07:00
Clayton Coleman
3e7c1b3613 Reduce the level for a few common log messages
Following the Kubernetes convention of V(2) is normal verbosity (log
each request to a webserver).
2015-03-19 23:55:36 -04:00
Victor Marmol
54bc33dd2c Lowering log level for frequent events.
Lowering all frequent normal logs to v=3. Kubelet runs by default on
debug of v=2 and we don't want to log these events in that case.
2015-03-09 14:53:53 -07:00
Rohit Jnagal
d3db8503f4 Move derived stats to v2. Add v2 container spec. 2015-03-04 18:27:57 +00:00
Rohit Jnagal
872546ba3a Bulk move current info api to info/v1. Making room for info/v2. 2015-03-04 00:47:28 +00:00
Victor Marmol
000a1be281 Changes to use new version of Docker packages. 2015-03-03 08:56:04 -08:00
Victor Marmol
e89d40b786 Failures to create stats summary should be non-fatal.
Fixes #544.
2015-02-27 09:01:07 -08:00
Rohit Jnagal
23642688af Merge pull request #532 from vmarmol/fix
Sort subcontainers in ContainerSpec.
2015-02-23 15:02:09 -08:00
Victor Marmol
94cd7114f8 Sort subcontainers in ContainerSpec.
Fixes #531.
2015-02-23 14:28:02 -08:00
Victor Marmol
63f5714db8 Add Start and End to ContainerInfoRequests.
This will allow querying a certain time range.
2015-02-22 19:07:40 -08:00
Rohit Jnagal
7201af3ca5 Expose a minimal 2.0 API with the first summary endpoint.
Right now, we just do raw container name. More types to follow.
We'll re-do the older endpoint in 2.0 before we publish it.
2015-02-19 05:27:44 +00:00
Rohit Jnagal
2406b6c55b Add derived stats tracking to containers. 2015-02-16 20:44:34 +00:00
Victor Marmol
48c994e5be Also print a 60s average CPU usage for self-logging. 2015-02-09 15:16:45 -08:00
Victor Marmol
b2f49a954b Specify that stats writing continued in error. 2015-02-03 16:15:11 -08:00
Victor Marmol
86238d0179 Allow partial success of GetStats().
This should make us more robust in the face of failure (at the cost of
making the failures less prominent). We allow GetStats() to return an
error and a partial result. We will process the result and report the
error.

Fixes #306.
2015-02-03 15:26:31 -08:00
Rohit Jnagal
667a8e0fd1 Rename load to load average.
Load is now LoadAverage. Also added comments about smoothing interval.
2015-01-28 00:37:45 +00:00
Rohit Jnagal
33c2cac71d Compute smoothed cpu load for containers. 2015-01-27 20:21:53 +00:00
Rohit Jnagal
67af1a1bbd Add scheddebug based cpuload reader.
Prefer netlink based reader when available as it provides stats for
processes in state other than running (sleep, diskio, uninterruptible).
2015-01-26 18:46:29 +00:00
Rohit Jnagal
1375f451b2 Refactor netlink implementation.
This allows us to plug in a scheddebug based interface.
2015-01-23 23:07:50 +00:00
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