Read output of /proc/[pid]/status

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
Topic archived. No new replies allowed.