Scyld ClusterWare HPC: Reference Guide | ||
---|---|---|
<< Previous | Next >> |
The node to query
A pointer to a struct beostat_meminfo, which is defined as follows:
struct beostat_meminfo { struct beostat_memusage mem; struct beostat_memusage swap; unsigned long long shared; unsigned long long buffers; unsigned long long cached; }; |
struct beostat_memusage { unsigned long long used; unsigned long long free; }; |
beostat_get_meminfo will get the memory usage of a node in the cluster. All values are in bytes.
Warning: Since Linux aggressively caches the hard disk into memory it will often appear to always be about 90% used. Some have suggested that the values of buffers
and cached
added together should be subtracted from the reported memory usage. However, these values may not be mutually exclusive.
meminfo_t meminfo; beostat_get_meminfo (3, &meminfo); printf ("The node 3 has %s bytes free\n", meminfo.mem.free); |
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_loadavg | Up | beostat_get_MHz |