The HyperNews Linux KHG Discussion Pages

## Documentation on /proc/pid#/ dirs?

  Forum: Filesystems
  Date: Wed, 15 Apr 1998 23:50:44 GMT
  From: <che@debian.org>

Hi, folks. I've gotten a request to make a simple utility to output the percentage of CPU all processes are currently taken up. I've browsed through the procps-1.2.6 source code, but the code is far from readable, and I've only gotten a few bare ideas of how to proceed. I'd like to know if there's a simpler way of just parsing through all the pid directories in /proc to find out this kind of information. But after looking at files like: [che@grendel:/proc/5191]% cat stat 5170 (in.telnetd) S 132 132 132 0 -1 1048832 85 0 312 0 4 18 0 0 0 0 -1 0 7081019 1224704 166 2147483647 134512640 134542862 3221224824 3221223988 1074534446 0 0 2621441 65536 1232885 0 0 I have no idea how to parse them. :) Is there a guide to what these files mean? Or am I barking up the wrong tree? Ben

Messages

1. Everyone's a critic! by Michael K. Johnson
-> Danke sehr! by che@debian.org