beostat_get_net_rate¶
Name¶
beostat_get_net_rate – get the cumulative network interface on a node
Synopsis¶
#include <sys/beostat.h>
unsigned long beostat_get_net_rate (int node);
Arguments¶
node
The node to query
Description¶
beostat_get_net_rate
executes on the master node and returns the
current network usage rate in bytes per second across all interfaces on
that node.
Examples¶
printf ("Node 3 is currently transferring %d bytes / second.\n", beostat_get_net_rate (3));
This function can give erroneous results for its transfer counts during the moment of rollover of each interface.
Return Value¶
Returns an unsigned long, which represents the network transfer rate. If an error occurs, it will return -1.
Errors¶
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.