Scyld ClusterWare HPC: Reference Guide | ||
---|---|---|
<< Previous | Next >> |
The node to query
A pointer to a array of structures of the type struct beostat_net_dev, which is defined as follows:
struct beostat_net_dev { char name[16]; struct beostat_net_stat recv; unsigned long frame; unsigned long multicast; struct beostat_net_stat trans; unsigned long colls; unsigned long carrier; }; |
struct beostat_net_stat { unsigned long bytes; unsigned long packets; unsigned long errs; unsigned long drop; unsigned long fifo; unsigned long compressed; }; |
The number of beostat_net_dev structures allocated by the caller.
beostat_get_net_dev will get the network interface statistics of a node. The caller must allocate the memory for the array of structures and up MAX_NET_DEV
or size entries will be filled (which ever is smaller). If there are less network devices available, the remaining structure(s) will be filled with zeros.
int i; struct beostat_net_dev net_dev[MAX_NET_DEV]; beostat_get_net_dev (3, net_dev, MAX_NET_DEV); for (i = 0; i < MAX_NET_DEV; I++) if (net_dev[i].name[0] != 0) printf ("%ld bytes of interface %s has been received on node 3.\n", net_dev[i].recv.bytes, net_dev[i].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_name | Up | beostat_get_net_rate |