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

Re: Getting CPU load (from /proc/?)

Arcady Genkin <antipode@thpoon.com> wrote:
>How would I get a real-time CPU load information?  I found
>/proc/loadavg, but that's not what I need, since it only gives average
>load values.

You could try 'vmstat 1', which will poll every second. Ignoring the
first line, which is an "up to the time vmstat was started" figure, the
last field in each line is the percentage of time the CPU is idle.

I can't speak for how accurate it is, but it seems to be fairly

Colin Watson                                     [cjw44@flatline.org.uk]

Reply to: