lm::LoadMonitor::NetworkStats::OneInterfaceStats Class Reference

Stores data read from /proc/net/dev file for one interface. More...


Public Member Functions

 OneInterfaceStats (const std::string &line)
 Parse data from string.

Data Fields

char name [INTERFACE_NAME_LENGTH]
 Interface name.
long long recv [RECV_FIELDS]
 Stats about data received on given interface.
long long send [SEND_FIELDS]
 Stats about data sent on given interface.

Static Public Attributes

static const size_t RECV_FIELDS = 8
 Number of fields available for incomming data.
static const size_t SEND_FIELDS = 8
 Number of fields available for outgoing data.
static const size_t INTERFACE_NAME_LENGTH = 16
 Length of the interface name.
static const size_t RECV_BYTES = 0
 Index of "number of bytes received" field.
static const size_t RECV_PACKETS = 1
 Index of "number of packets received" field.
static const size_t RECV_ERRORS = 2
 Index of "number of receive errors" field.
static const size_t RECV_DROPS = 3
 Index of "number of drops" field.
static const size_t RECV_FIFO = 4
 Index of "FIFO" field.
static const size_t RECV_FRAME = 5
 Index of "frame count" field.
static const size_t RECV_COMPRESSED = 6
 Index of "compressed" field.
static const size_t RECV_MULTICAST = 7
 Index of "multicast" field.
static const size_t SEND_BYTES = 0
 Index of "number of bytes sent" field.
static const size_t SEND_PACKETS = 1
 Index of "number of packets sent" field.
static const size_t SEND_ERRORS = 2
 Index of "number of send errors" field.
static const size_t SEND_DROPS = 3
 Index of "number of drops" field.
static const size_t SEND_FIFO = 4
 Index of "FIFO" field.
static const size_t SEND_COLLISION = 5
 Index of "collision count" field.
static const size_t SEND_CARRIER = 6
 Index of "carrier" field.
static const size_t SEND_COMPRESSED = 7
 Index of "compressed" field.


Detailed Description

Stores data read from /proc/net/dev file for one interface.

This class stores all data available for one interface in the file /proc/net/dev.


Constructor & Destructor Documentation

lm::LoadMonitor::NetworkStats::OneInterfaceStats::OneInterfaceStats ( const std::string &  line  ) 

Parse data from string.

Parse one line that is formatted exactly as interface line from the /proc/net/dev file.

Parameters:
line String containing one line from the file.


Field Documentation

const size_t lm::LoadMonitor::NetworkStats::OneInterfaceStats::INTERFACE_NAME_LENGTH = 16 [static]

Length of the interface name.

char lm::LoadMonitor::NetworkStats::OneInterfaceStats::name[INTERFACE_NAME_LENGTH]

Interface name.

long long lm::LoadMonitor::NetworkStats::OneInterfaceStats::recv[RECV_FIELDS]

Stats about data received on given interface.

const size_t lm::LoadMonitor::NetworkStats::OneInterfaceStats::RECV_BYTES = 0 [static]

Index of "number of bytes received" field.

const size_t lm::LoadMonitor::NetworkStats::OneInterfaceStats::RECV_COMPRESSED = 6 [static]

Index of "compressed" field.

const size_t lm::LoadMonitor::NetworkStats::OneInterfaceStats::RECV_DROPS = 3 [static]

Index of "number of drops" field.

const size_t lm::LoadMonitor::NetworkStats::OneInterfaceStats::RECV_ERRORS = 2 [static]

Index of "number of receive errors" field.

const size_t lm::LoadMonitor::NetworkStats::OneInterfaceStats::RECV_FIELDS = 8 [static]

Number of fields available for incomming data.

const size_t lm::LoadMonitor::NetworkStats::OneInterfaceStats::RECV_FIFO = 4 [static]

Index of "FIFO" field.

const size_t lm::LoadMonitor::NetworkStats::OneInterfaceStats::RECV_FRAME = 5 [static]

Index of "frame count" field.

const size_t lm::LoadMonitor::NetworkStats::OneInterfaceStats::RECV_MULTICAST = 7 [static]

Index of "multicast" field.

const size_t lm::LoadMonitor::NetworkStats::OneInterfaceStats::RECV_PACKETS = 1 [static]

Index of "number of packets received" field.

long long lm::LoadMonitor::NetworkStats::OneInterfaceStats::send[SEND_FIELDS]

Stats about data sent on given interface.

const size_t lm::LoadMonitor::NetworkStats::OneInterfaceStats::SEND_BYTES = 0 [static]

Index of "number of bytes sent" field.

const size_t lm::LoadMonitor::NetworkStats::OneInterfaceStats::SEND_CARRIER = 6 [static]

Index of "carrier" field.

const size_t lm::LoadMonitor::NetworkStats::OneInterfaceStats::SEND_COLLISION = 5 [static]

Index of "collision count" field.

const size_t lm::LoadMonitor::NetworkStats::OneInterfaceStats::SEND_COMPRESSED = 7 [static]

Index of "compressed" field.

const size_t lm::LoadMonitor::NetworkStats::OneInterfaceStats::SEND_DROPS = 3 [static]

Index of "number of drops" field.

const size_t lm::LoadMonitor::NetworkStats::OneInterfaceStats::SEND_ERRORS = 2 [static]

Index of "number of send errors" field.

const size_t lm::LoadMonitor::NetworkStats::OneInterfaceStats::SEND_FIELDS = 8 [static]

Number of fields available for outgoing data.

const size_t lm::LoadMonitor::NetworkStats::OneInterfaceStats::SEND_FIFO = 4 [static]

Index of "FIFO" field.

const size_t lm::LoadMonitor::NetworkStats::OneInterfaceStats::SEND_PACKETS = 1 [static]

Index of "number of packets sent" field.


The documentation for this class was generated from the following files:
Generated on Tue Dec 19 17:43:49 2006 for Load Monitor for Linux by  doxygen 1.4.7