I was like, WTF? Am I parsing the stat file wrong? No - a pure-C version (literally copied and pasted) works fine and I'm getting all the other data correctly. Could it be a datatype issue? No, I tried several just in case.
Irritated and frustrated, I went to bed and came to the conclusion, in my half-unconscious state, that the mere act of starting up the interpreter was causing the priority level to drop, as the interpreter itself now got a higher priority. I couldn't see that with top since the program started and finished before top refreshed.
I hate it when stuff like that happens...
measuring something changes it (Score:1)
One of the problems of doing science - measuring something actually changes its value. Trying to minimise that change is part of the "fun".