[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

getloadavg and proc filesystem



Hi all,

I am looking at writing some monitoring scripts from data out of the / proc filesystem
for monitoring cpu, idle, etc.

I have had a look at the source code for getloadavg.c, and wondering what happens if the kernel changes the data in /proc/loadavg while getloadavg is doing its stuff.

This problem is even more likely to happen with /proc/cpuinfo...

Or does the proc filesystem somehow protect against this?

Thanks for any advice,

Andrew



Reply to: