Re: about /proc/*/stat

From: Jan Engelhardt
Date: Wed Nov 17 2004 - 05:22:15 EST


>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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/