On Tue, Jul 13, 2010 at 11:46:00AM +0600, Alexander E. Patrakov wrote:
> $ ps 8878
> PID TTY STAT TIME COMMAND
> 8878 ? S 21114574:25
> python /usr/share/pyshared/trac/web/fcgi_fronten
That does look wrong!
> $ grep cpu /proc/stat
> cpu 497530 5241 284260 1375355973 201909 17 4756 19904 0
and
> $ cat /proc/uptime
> 1721865.10 13753609.46
Gives a Hertz of 200, which seems a little odd. Maybe its ok for Xen.
I got that by adding the numbers in stat, dividing by the first number
in uptime then number of CPUs.
> $ cat /proc/8878/stat
> 8878 (python) S 8866 8865 8865 0 -1 4202496 7038 0 0 0 1844394016732
> 280348245 0 0 20 0 1 0 130606738 219033600 5560 18446744073709551615
> 4194304 6410804 0 0 0 0 0 16781312 16387 18446744073709551615 0 0 17 0 0
> 0 0 0 0
1844394016732 and 280348245 are the user and system time the process has
used, in jiffies.
To know how many days, add these two numbers, divide by 200 to get
seconds and then by (24 * 60 * 60) to get days.
I get 106751 days.
As an example of my system, which has a Hertz of 100 for process 32698:
$ cat /proc/32698/stat | awk '{print "(" , $14, " + ", $15, ") / 100"}' | bc
132
$ ps -o time 32698
TIME
00:02:12
132 seconds = 2 minutes 12 seconds.
The big question is, is this a problem specific to how Xen is setup on
your system, or a wider problem?
- Craig
--
Craig Small GnuPG:1C1B D893 1418 2AF4 45EE 95CB C76C E5AC 12CA DFA5
http://www.enc.com.au/ csmall at : enc.com.au
http://www.debian.org/ Debian GNU/Linux, software should be Free
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]