Scyld ClusterWare HPC: Reference Guide | ||
---|---|---|
<< Previous | Next >> |
The node to query
The CPU index on the particular node
A pointer to a struct beostat_stat_cpu, which will be filled upon successful completion. struct beostat_stat_cpu is defined as follows:
struct beostat_stat_cpu { long user; long system; long nice; long idle; }; |
The members of this structure have the following meanings:
The number of CPU ticks spend processing normal priority (0) user level instructions.
The number of CPU ticks spend processing nice priority (>0) user level instructions.
The number of CPU ticks spend processing system (kernel) level instructions.
The number of CPU ticks spend idle.
beostat_get_stat_cpu will get the cpu ticks counts on a given node/CPU. These ticks just keep incrementing over time until they overflow and wrap back around. To get actual CPU usage over some time period, you must either take the derivative of these values or use the beostat convenience function beostat_get_cpu_percent.
struct beostat_stat_cpu stat_cpu; beostat_get_stat_cpu (3, 0, &stat_cpu); printf ("There have been %ld idle ticks on cpu 0 for node 3 is %s\n", stat_cpu.idle); free (name); |
This function relies on the Beostat subsystem, which consists of the proc filesystem on the remote node, the sendstats daemon on the remote node, the recvstats daemon on the master node, and two shared memory files in the directory /var/shm. If any part of the system breaks down, this function could fail.
<< Previous | Home | Next >> |
beostat_get_net_rate | Up | beostat_get_statfs_p |