Read output of /proc/[pid]/status

Feb 12, 2012 at 8:04pm
This question is kind of a C question, rather than C++, but I figured this would still be an appropriate place to ask.

I am trying to parse the output of the linux command /proc/[pid]/status

I figured, since I am doing this in C, that I would use fscanf, but I am not sure how to use this function. I have tried fscanf(/proc/[pid]/status, "%s", str) but this doesn't work. Any idea on how to do this? Thanks.
Last edited on Feb 12, 2012 at 8:04pm
Topic archived. No new replies allowed.