class CAVERNnet_perfMonitor_c : public CAVERNnet_socketbase_c

This class does the performance monitoring calculations for CAVERNsoft

Inheritance:


Public Methods

void showStats (char* streamInfo, char* comment)
Displays the resultant statistics instantaneously in the netlogger format - this should be typically done after a read/write is done a network
int logStats (char* streamInfo, char* comment, FILE* filePtr)
This logs performance statistics in a file
int sendStats (char* streamInfo, char* comment)
Sends the performance statistics to a remote perfdaemon -for further analysis of the monitored data - the initSendStats API should be called first, before calling a sendStats (In order to connect to the perfdaemon initially)

(Note: A typical example of sendStats is given in the (CAVERN_DISTRIB_DIR/demos/tcpreflector/ directory)

int initSendStats (char* monitorClientIP, int port = CAVERNnet_perfDaemon_c::DEFAULT_PORT)
Initialize sendStats - provide the IP of the perfDaemon and an optional port number to connect to
void exitSendStats ()
Properly delete the perfDaemonClient after sendStats is done

Public


Return values
static const int OK
Operation successful
static const int FAILED
Operation Failed

Inherited from CAVERNnet_socketbase_c:

Public Methods

static int hostnameToIP(char *hostname, char* hostIP)
static void ipNumToString(unsigned int ip, char *ipstring)
static double getTimeInSecs()
static void getHostName(char *name, int len)
static void expandHostName(char *src, char *newname, int len)
unsigned int getTotalDataSent()
unsigned int getTotalDataRead()
double getInstantReceiveBandwidth()
double getInstantSendBandwidth()
double getAverageReceiveBandwidth()
double getAverageSendBandwidth()
void setInstantLatency(double lat)
double getInstantLatency()
double getAverageLatency()
double getMaxLatency()
double getMinLatency()
void incrementDataSent(unsigned long size)
void incrementDataRead(unsigned long size)
double getInstantInterMesgDelay()
double getMaxInterMesgDelay()
double getMinInterMesgDelay()
double getAverageInterMesgDelay()
double getSTABandwidth()
double getSTALatency()
double getBurstiness()
double getJitter()
unsigned long getPacketsRead()
unsigned long getPacketsSent()
virtual int getSocketId()
int selectSock(void *ptr, int *status, int numSocks, struct timeval *timeout)

Protected Methods

void computeInstantSendBandwidth()
void computeInstantReceiveBandwidth()
void computeAverageReceiveBandwidth()
void computeAverageSendBandwidth()
void calculateJitter(double lat)
void calculateBurstiness(double bw)

Documentation

This class does the performance monitoring calculations for CAVERNsoft. The calculations in the CAVERNnet_socketbase class are used by an instance of this class, included in other higher level modules (an instance of this class is not generally created by the user).

Along with the API documentation, is also included, a note on the calculated parameters, the units of calculation and how they are calculated.

As mentioned, in general, an instance of this class need not be created by the user. Instead the API's provided in the higher level classes (like the showStats, logStats and sendStats) should be directly invoked whenever network monitoring statistics is required. This is because the monitoring is done in all the networking classes automatically for every data flow over a network, using an instance of this class. The user can hence use the API's of the higher level classes as mentioned above, which would ensure statistics to be extracted whenever required.

API calls should be made by the user as often as required to obtain the monitored statistics in the netlogger format ( <label,value> pairs).

Currectly, the following capabilities have been provided with the performance monitoring: statistics can be displayed instantaneously, logged into a user specified logfile or sent to another remote daemon for further analysis

void showStats(char* streamInfo, char* comment)
Displays the resultant statistics instantaneously in the netlogger format - this should be typically done after a read/write is done a network.

Also, it should be noted that a showStats call should be made at the end of atleast one send and receive for two-way information (the same applies for logStats and sendStats)

Parameters:
streamInfo - A label describing the stream that is being monitored.
comment - A comment on the event that marks the time at which the stream is being monitored

int logStats(char* streamInfo, char* comment, FILE* filePtr)
This logs performance statistics in a file. The user opens a file and passes the file pointer with this function and results of monitoring are written into the logfile.

Returns:
Either CAVERNnet_perfMonitor_c::OK or CAVERNnet_perfMonitor_c::FAILED
Parameters:
streamInfo - A label describing the stream that is being monitored.
comment - A comment on the event that marks the time at which the stream is being monitored
filePtr - File pointer to the file in which the results of monitoring are to be stored

int sendStats(char* streamInfo, char* comment)
Sends the performance statistics to a remote perfdaemon -for further analysis of the monitored data - the initSendStats API should be called first, before calling a sendStats (In order to connect to the perfdaemon initially)

(Note: A typical example of sendStats is given in the (CAVERN_DISTRIB_DIR/demos/tcpreflector/ directory)

Returns:
Either CAVERNnet_perfMonitor_c::OK or CAVERNnet_perfMonitor_c::FAILED
Parameters:
streamInfo - A label describing the stream that is being monitored.
comment - A comment on the event that marks the time at which the stream is being monitored

int initSendStats(char* monitorClientIP, int port = CAVERNnet_perfDaemon_c::DEFAULT_PORT)
Initialize sendStats - provide the IP of the perfDaemon and an optional port number to connect to. This should be done initially before using the sendStats API.

Returns:
Either CAVERNnet_perfMonitor_c::OK or CAVERNnet_perfMonitor_c::FAILED
Parameters:
monitorClientIP - IP address of the perfDameon to connect to
port - Port number at which the perfDaemon is running -this is optional. The default port number for perfDaemon is 9500 -so a different port number has to be specified if the perfDaemon is running on a different port.


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de