CPU time accounting

Robert G. Brown rgb at phy.duke.edu
Mon Apr 14 09:29:55 EDT 2003

On Sat, 12 Apr 2003, Mi Zhou wrote:

> I am new to cluster management. I wan to get some statistics on the usage of
> the cluster. Is there some utility that can summarize CPU usage of each
> user/group?

What an interesting question!

The "psacct" package in Red Hat et. al. linuces contains the BSD system
accounting package (accton, sa, ac, etc).  Install and read the man
pages to see what you get, on a node by node basis.

I have no idea if any of the other cluster monitor tools for general
workstation clusters interfaces with psacct -- xmlsysd (my own) does
not, although it wouldn't be terribly difficult to hack it so that it

Alternatively, and perhaps more intelligently (since this isn't the kind
of question one generally cares to have answered in a 5-10 second
polling loop as the changes are usually fairly predictable given
knowledge of who's on a cluster at any given time) it would be fairly
straightforward to write a collection script in e.g. perl that polled
each node on demand and cumulated results across a cluster.  That would
be relatively resource expensive -- order of a second per remote ssh
call to get the cumulated results -- but presumably one would only run
it once a day or thereabouts to cumulate the usage du jour.

Note that accounting isn't usually turned on by default because it is
"expensive" in its own right -- the system creates an accounting file
that gets a record for each process run, and adds a write to this file
to the termination sequence for each job as it finishes to preserve its
cumulated stat data.  On a typical normal node this won't be a horrible
problem, but on a system running lots of little commands or with a
broken looping command stream it can be.


Robert G. Brown	                       http://www.phy.duke.edu/~rgb/
Duke University Dept. of Physics, Box 90305
Durham, N.C. 27708-0305
Phone: 1-919-660-2567  Fax: 919-660-2525     email:rgb at phy.duke.edu

Beowulf mailing list, Beowulf at beowulf.org
To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf

More information about the Beowulf mailing list