Commit Graph

77 Commits

Author SHA1 Message Date
Jin-Hwan Jeong
9bb7a0278d this patch fixes "high cpu consumption without sleeping in housekeeping()" problem if system time has changed
Signed-off-by: Jin-Hwan Jeong <jhjeong.kr@gmail.com>
2015-08-18 09:03:12 +09:00
anushree-n
04a78502ca Modify generic collector 2015-08-12 17:56:01 -07:00
Rohit Jnagal
15664a6a0c Fix cgroup name parsing logic in ps output for centos6.
Centos 6 uses a different ps lib resulting in different output.
2015-08-08 02:23:58 +00:00
Rohit Jnagal
ef41402a39 Merge pull request #838 from rjnagal/docker
Add custom metrics to spec.
2015-07-27 16:37:32 -07:00
Rohit Jnagal
c0b3f779f5 Add custom metrics to spec.
Remove spec-related fields from stat.
We can simplify the stats a bit further by handling Int and Float better.
But this was big enough change already.
Verified v1 and v2 spec/stats/appmetrics APIs.
2015-07-25 20:17:54 +00:00
Victor Marmol
b581ee2e67 Merge pull request #835 from rjnagal/docker
Fix converion of rss and vsz in ps output.
2015-07-24 10:12:25 -07:00
Rohit Jnagal
a5e65b38c6 Fix converion of rss and vsz in ps output. 2015-07-24 15:35:58 +00:00
Victor Marmol
ca7fd6d40a Merge pull request #831 from rjnagal/docker
Two small fixes to custom metric collection.
2015-07-22 21:34:23 -07:00
Rohit Jnagal
3f8e065947 Two small fixes to custom metric collection.
- a typo in minPollingFrequency multiplies it with time.Second twice.
- Updating custom metrics is unnecessarily called for all containers.
2015-07-23 01:56:07 +00:00
Victor Marmol
17c45c6ec3 Merge pull request #827 from rjnagal/docker
Add logic to read custom metric config files from container root.
2015-07-22 13:39:17 -07:00
Rohit Jnagal
a123fd72d8 Add logic to read custom metric config files from container root.
Docker does not provide the rootfs path through docker inspect or statefile
and the path is dependent on the storage driver being used.

Instead of enumerating the storage drivers, we pick a pid from the container
and get the config from /proc/pid/root. Although a bit expensive, this method
works for non-docker containers too.
2015-07-22 15:45:07 +00:00
Piotr Szczesniak
90ca5f9286 Moved max_housekeeping and allow_dynamic_housekeeping flags to cadvisor.go 2015-07-21 20:26:57 +02:00
anushree-n
e2e193c1fd Add metrics caching 2015-07-20 11:24:20 -07:00
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