comparison probes/tests/cpuacct.c @ 3:2cb8a6cbe468

cpuacct: convert per cpu usage from nanoseconds to jiffies
author Louis Opter <louis@dotcloud.com>
date Fri, 31 Dec 2010 20:04:25 +0100
parents 6ce4443e7545
children
comparison
equal deleted inserted replaced
2:ba9d8601d5f9 3:2cb8a6cbe468
26 if (_lxcst_probe_cpuacct(c)) 26 if (_lxcst_probe_cpuacct(c))
27 err(EXIT_FAILURE, "probe cpuacct failed"); 27 err(EXIT_FAILURE, "probe cpuacct failed");
28 28
29 printf("user %d\nsystem %d\n", c->cpuacct.user, c->cpuacct.system); 29 printf("user %d\nsystem %d\n", c->cpuacct.user, c->cpuacct.system);
30 for (i = 0; c->cpuacct.percpu[i]; ++i) 30 for (i = 0; c->cpuacct.percpu[i]; ++i)
31 printf("cpu[%d] %lu\n", i, c->cpuacct.percpu[i]); 31 printf("cpu[%d] %u\n", i, c->cpuacct.percpu[i]);
32 32
33 _lxcst_container_delete(c); 33 _lxcst_container_delete(c);
34 34
35 lxcst_close(hdl); 35 lxcst_close(hdl);
36 36