* about /proc/*/stat
@ 2004-11-17 9:28 martin f krafft
2004-11-17 10:20 ` Jan Engelhardt
2004-11-17 10:24 ` martin f krafft
0 siblings, 2 replies; 3+ messages in thread
From: martin f krafft @ 2004-11-17 9:28 UTC (permalink / raw)
To: linux kernel mailing list
[-- Attachment #1: Type: text/plain, Size: 931 bytes --]
If I look at /proc/meminfo, I see each number prefixed with a short
identifying name. Looking at /proc/*/stat, however, I have to count
fields to get to the field I want. I realise that it's probably not
possible to change the format of this file (since it's read by
ps(1), among others), but I wonder if you have any tools that parse
it, similar to /proc/meminfo -- i.e. primarily for debugging?
If not, I have a shell script that works well and which I would then
publicise. I just don't want to push yet another software doing
The Same Thing out there...
--
martin; (greetings from the heart of the sun.)
\____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck
invalid/expired pgp subkeys? use subkeys.pgp.net as keyserver!
spamtraps: madduck.bogus@madduck.net
"no, 'eureka' is greek for 'this bath is too hot.'"
-- dr. who
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: about /proc/*/stat
2004-11-17 9:28 about /proc/*/stat martin f krafft
@ 2004-11-17 10:20 ` Jan Engelhardt
2004-11-17 10:24 ` martin f krafft
1 sibling, 0 replies; 3+ messages in thread
From: Jan Engelhardt @ 2004-11-17 10:20 UTC (permalink / raw)
To: martin f krafft; +Cc: linux kernel mailing list
>If I look at /proc/meminfo, I see each number prefixed with a short
>identifying name. Looking at /proc/*/stat, however, I have to count
>fields to get to the field I want. I realise that it's probably not
>possible to change the format of this file (since it's read by
>ps(1), among others), but I wonder if you have any tools that parse
>it, similar to /proc/meminfo -- i.e. primarily for debugging?
fscanf(fp, "%d %d %d ... ", &status, &anotherthing,....)
Jan Engelhardt
--
Gesellschaft für Wissenschaftliche Datenverarbeitung
Am Fassberg, 37077 Göttingen, www.gwdg.de
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: about /proc/*/stat
2004-11-17 9:28 about /proc/*/stat martin f krafft
2004-11-17 10:20 ` Jan Engelhardt
@ 2004-11-17 10:24 ` martin f krafft
1 sibling, 0 replies; 3+ messages in thread
From: martin f krafft @ 2004-11-17 10:24 UTC (permalink / raw)
To: linux kernel mailing list
[-- Attachment #1: Type: text/plain, Size: 790 bytes --]
also sprach martin f krafft <madduck@madduck.net> [2004.11.17.1028 +0100]:
> If not, I have a shell script that works well and which I would then
> publicise. I just don't want to push yet another software doing
> The Same Thing out there...
FWIW: http://madduck.net/~madduck/scratch/pstat
--
martin; (greetings from the heart of the sun.)
\____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck
invalid/expired pgp subkeys? use subkeys.pgp.net as keyserver!
spamtraps: madduck.bogus@madduck.net
"he gave me his card
he said, 'call me if they die'
i shook his hand and said goodbye
ran out to the street
when a bowling ball came down the road
and knocked me off my feet"
-- bob dylan
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-11-17 10:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-17 9:28 about /proc/*/stat martin f krafft
2004-11-17 10:20 ` Jan Engelhardt
2004-11-17 10:24 ` martin f krafft
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®