#include <stdio.h>
#include <wchar.h>
#include <string.h>
#include <exception>
#include <ResourceMonitor/ResourceMonitor.h>
#include "rmClient.h"
#include "rmClientError.h"
#include "rmSysInfo.h"
#include "rmConfig.h"
#include "rmControl.h"
#include "rmMonitor.h"
#include "rmEvent.h"
#include "eventLog.h"
#include "uuid/uuid.h"
#include <tcpd.h>
Go to the source code of this file.
Compounds | |
class | rmClient |
class | subagentBase |
Functions | |
subagentBase * | gSubagent (NULL) |
int | initRMClient () |
initializes all the system information from ResourceMonitor Daemon. More... | |
void | shutdownRMClient () |
int | getRMVersion () |
returns the version number of the ResourceMonitor Daemon. More... | |
int | getInteger32 (RMEntity aEntity, RMAttribute aName, unsigned long aID, long *aValue) |
returns the integer value of a particular name in a particular entity. More... | |
int | setInteger32 (RMEntity aEntity, RMAttribute aName, unsigned long aID, long aValue) |
sets the integer value of a particular name in a particular entity. More... | |
int | getUnsigned (RMEntity aEntity, RMAttribute aName, unsigned long aID, unsigned long *aValue) |
returns the integer value of a particular name in a particular entity. More... | |
int | setUnsigned (RMEntity aEntity, RMAttribute aName, unsigned long aID, unsigned long aValue) |
sets the integer value of a particular name in a particular entity. More... | |
int | getUnsigned64 (RMEntity aEntity, RMAttribute aName, unsigned long aID, u_int64_t *aValue) |
returns the unsigned integer value of a particular name in a particular entity. More... | |
int | setUnsigned64 (RMEntity aEntity, RMAttribute aName, unsigned long aID, u_int64_t aValue) |
sets the unsigned integer value of a particular name in a particular entity. More... | |
int | getUUIDString (RMEntity aEntity, RMAttribute aName, unsigned long aID, char *aBuf) |
returns the UUID (in string format) of a particular name in an entity. More... | |
int | getUUID (RMEntity aEntity, RMAttribute aName, unsigned long aID, uuid_t aUUID) |
returns the UUID of a particular name in an entity. More... | |
int | setUUIDString (RMEntity aEntity, RMAttribute aName, unsigned long aID, char *aUUID) |
sets the UUID of a particular name in an entity. More... | |
int | getString (RMEntity aEntity, RMAttribute aName, unsigned long aID, char **aBuf) |
gets the string of a particular named attribute in an entity. More... | |
int | setString (RMEntity aEntity, RMAttribute aName, unsigned long aID, char *aBuf) |
gets the string of a particular named attribute in an entity. More... | |
int | newEntry (RMEntity aEntity, unsigned long aID) |
create a new entry in an entity. More... | |
int | deleteEntry (RMEntity aEntity, unsigned long aID) |
remove an entry in an entity. More... | |
unsigned long | getNewId (RMEntity aEntity) |
get a valid ID for creating a new entry in an entity. More... | |
int | findId (RMEntity aEntity, unsigned long aID) |
test if the ID represents a valid entry in an entity. More... | |
int | getNextId (RMEntity aEntity, unsigned long aID, unsigned long *aNextID) |
find the next valid ID in an entity based on the ID supplied. More... | |
size_t | getCount (RMEntity aEntity) |
returns the number of entries for an entity. More... | |
int | getBinary (RMEntity aEntity, RMAttribute aName, unsigned long aID, char **aBuf, unsigned long *aLength) |
get binary data from Event Log. More... | |
void | addEvent (posix_log_recid_t aRecid, unsigned long aId) |
add a ResourceMonitor event to the event queue. More... | |
void | processEvents () |
process all the ResourceMonitor events in the queue. More... | |
Variables | |
int | allow_severity = LOG_INFO |
int | deny_severity = LOG_WARNING |
|
add a ResourceMonitor event to the event queue. Add a ResourceMonitor event into the event queue. ResourceMonitor events including: threshold monitor notifications, thresholdCancel monitor notifications, leakyBucket monitor notifications, Subsystem changes, Resource changes
Definition at line 1358 of file rmClient.cpp. References subagentBase::addEvent. |
|
remove an entry in an entity. Remove a new entry in the specified entity table using the id value.
Definition at line 1239 of file rmClient.cpp. References subagentBase::deleteEntry, and RMEntity. |
|
test if the ID represents a valid entry in an entity. Test if a particular id, aID, represents a valid entry in the entity table.
Definition at line 1273 of file rmClient.cpp. References subagentBase::findId, and RMEntity. |
|
get binary data from Event Log. Get the binary string of a particular named attribute of an entity.
Definition at line 1334 of file rmClient.cpp. References subagentBase::getBinary, RMAttribute, and RMEntity. |
|
returns the number of entries for an entity. Get the number of entries in entity table.
Definition at line 1309 of file rmClient.cpp. References subagentBase::getCount, and RMEntity. |
|
returns the integer value of a particular name in a particular entity. Get the value of a particular named attribute in a particular entity. The data type must be 'long', or a 32 bit integer in this case.
Definition at line 888 of file rmClient.cpp. References subagentBase::getInteger32, RMAttribute, and RMEntity. |
|
get a valid ID for creating a new entry in an entity. Get the id value of the next new entry in the entity table.
Definition at line 1254 of file rmClient.cpp. References subagentBase::getNewId, and RMEntity. |
|
find the next valid ID in an entity based on the ID supplied. Find the next valid ID in the entity table, which means the first entry in the table whose id value is greater than the aID.
Definition at line 1293 of file rmClient.cpp. References subagentBase::getNextId, and RMEntity. |
|
returns the version number of the ResourceMonitor Daemon. Returns the ResourceMonitor version number. Definition at line 853 of file rmClient.cpp. Referenced by var_RMSystemInfo. |
|
gets the string of a particular named attribute in an entity. Get the string value of a particular named attribute in a particular entity. The data type must be 'char *'.
Definition at line 1172 of file rmClient.cpp. References subagentBase::getString, RMAttribute, and RMEntity. |
|
returns the integer value of a particular name in a particular entity. Get the value of a particular named attribute in a particular entity. The data type must be 'unsigned long', or a 32 bit unsigned integer in this case.
Definition at line 945 of file rmClient.cpp. References subagentBase::getUnsigned, RMAttribute, and RMEntity. |
|
returns the unsigned integer value of a particular name in a particular entity. Get the value of a particular named attribute in a particular entity. The data type must be 'unsigned long long', or a 64 bit unsigned integer in this case.
Definition at line 1003 of file rmClient.cpp. References subagentBase::getUnsigned64, RMAttribute, and RMEntity. |
|
returns the UUID of a particular name in an entity. Get the value of a particular named attribute in a particular entity. The data type must be 'uuid_t'. rmClient library provides two ways of retreving a uuid.
Definition at line 1114 of file rmClient.cpp. References subagentBase::getUUID, RMAttribute, and RMEntity. |
|
returns the UUID (in string format) of a particular name in an entity. Get the value of a particular named attribute in a particular entity. The data type must be 'uuid_t'. rmClient library provides two ways of retreving a uuid.
Definition at line 1074 of file rmClient.cpp. References subagentBase::getUUIDString, RMAttribute, and RMEntity. |
|
Initialized the rmclient library by creating all the data tables and filling the appriate entries.
|
|
initializes all the system information from ResourceMonitor Daemon.
Definition at line 826 of file rmClient.cpp. References subagentBase::init. Referenced by main. |
|
create a new entry in an entity. Create a new entry in the specified entity table using the id value.
Definition at line 1221 of file rmClient.cpp. References subagentBase::newEntry, and RMEntity. |
|
process all the ResourceMonitor events in the queue. Process all the events in the ResourceMonitor event queue.
Definition at line 1372 of file rmClient.cpp. References subagentBase::processEvents. Referenced by main. |
|
sets the integer value of a particular name in a particular entity. Set the value of a particular named attribute in a particular entity. The data type must be 'long', or a 32 bit integer in this case.
Definition at line 916 of file rmClient.cpp. References RMAttribute, RMEntity, and subagentBase::setInteger32. |
|
gets the string of a particular named attribute in an entity. Set the string value of a particular named attribute in a particular entity. The data type must be 'char *'.
Definition at line 1197 of file rmClient.cpp. References RMAttribute, RMEntity, and subagentBase::setString. |
|
sets the integer value of a particular name in a particular entity. Set the value of a particular named attribute in a particular entity. The data type must be 'unsigned long', or a 32 bit unsigned integer in this case.
Definition at line 974 of file rmClient.cpp. References RMAttribute, RMEntity, and subagentBase::setUnsigned. |
|
sets the unsigned integer value of a particular name in a particular entity. Set the value of a particular named attribute in a particular entity. The data type must be 'unsigned long long', or a 64 bit unsigned integer in this case.
Definition at line 1032 of file rmClient.cpp. References RMAttribute, RMEntity, and subagentBase::setUnsigned64. |
|
sets the UUID of a particular name in an entity. Set the value of a particular named attribute in a particular entity. The data type must be 'uuid_t'.
Definition at line 1145 of file rmClient.cpp. References RMAttribute, RMEntity, and subagentBase::setUUIDString. |
|
Shutdown the ResourceMonitor Client by destructing all the tables and the event queue that the client used.
Definition at line 842 of file rmClient.cpp. References subagentBase::shutdown. Referenced by main. |
|
Definition at line 26 of file rmClient.cpp. |
|
Definition at line 27 of file rmClient.cpp. |