Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

/root/resourcemonitord/resourcemonitord/ResourceMonitorTypes.h File Reference

#include <sys/types.h>
#include <unistd.h>
#include <time.h>
#include "ResourceMonitorErrno.h"
#include <uuid/uuid.h>
#include <iostream>
#include <posix_evlog.h>

Go to the source code of this file.

Compounds

struct  rmLeakyBucketConfiguration
struct  rmLeakyBucketControl
struct  rmLeakyBucketState
struct  rmMonitorConfiguration
struct  rmMonitorControl
struct  rmMonitorInfo
struct  rmMonitorState
struct  rmResourceInfo
struct  rmStatisticInfo
struct  rmStatisticKey
struct  rmStatisticValue
struct  rmSubsystemInfo
struct  rmThresholdConfiguration
struct  rmThresholdControl
struct  rmThresholdState
class  RMuid
union  rmValue
struct  rmWatermarkConfiguration
struct  rmWatermarkState

Defines

#define MAX_GUID_STRLEN   (sizeof(uuid_t)*2+6)
#define RESOURCE_MONITOR_VERSION_1   1
#define RESOURCE_MONITOR_VERSION_15   105
#define RESOURCE_MONITOR_VERSION   RESOURCE_MONITOR_VERSION_15
#define rmPsuedoResourceID   0xffffffff
#define RMThresholdTolerance   typeControl.threshold.tolerance
#define RMThresholdSamples   typeControl.threshold.samples
#define RMThresholdLoggingRate   typeControl.threshold.loggingRate
#define RMLeakyBucketLoggingRate   typeControl.leakyBucket.loggingRate
#define clearMonitorUID(c)   (uuid_clear((c).uid))
 macro to clear rmUID uid.
See also:
rmMonitorControl.
More...


#define setMonitorUID(c, str)   (uuid_parse((char *)(str), (c).uid);
 macro to set rmUID uid with a uuid string.
See also:
rmMonitorControl.
More...


#define clearDataCapture(c)   (uuid_clear((c).dataCapture))
 macro to clear rmUID dataCapture.
See also:
rmMonitorControl TextDataCapture.
More...


#define setDataCapture(c, str)   (uuid_parse((char *)(str), (c).dataCapture))
 macro to set rmUID dataCapture with a uuid string.
See also:
rmMonitorControl TextDataCapture.
More...


#define RMThresholdType   typeConfiguration.threshold.type
#define RMThresholdValue   typeConfiguration.threshold.thresholdValue
#define RMThresholdCondition   typeConfiguration.threshold.condition
#define RMThresholdPrecondition   typeConfiguration.threshold.precondition
#define RMThresholdEventSeverity   typeConfiguration.threshold.eventSeverity
#define RMThresholdCancelEventSeverity   typeConfiguration.threshold.cancelEventSeverity
#define RMbucketSize   typeConfiguration.leakyBucket.bucketSize
#define RMfillValue   typeConfiguration.leakyBucket.fillValue
#define RMleakyBucketEventSeverity   typeConfiguration.leakyBucket.eventSeverity
#define RMWatermarkType   typeConfiguration.watermark.type
#define RMThresholdLastEventTime   typeState.threshold.LastEventTime
#define RMWatermarkHigh   typeState.watermark.highWatermark
#define RMWatermarkLow   typeState.watermark.lowWatermark
#define RMWatermarkHighTime   typeState.watermark.highTime
#define RMWatermarkLowTime   typeState.watermark.lowTime
#define RMLeakyBucketLevel   typeState.leakyBucket.bucketLevel
#define RMLeakyBucketLastEventTime   typeState.leakyBucket.LastEventTime

Typedefs

typedef char rmChar
 data type for name, description, and unit characters provided by a subsystem. More...

typedef uuid_t rmUID
 data type for a unique ID for the subsystem or created monitor. More...

typedef u_int32_t rmID
 data type for ids of resources and statistics assigned by a subsystem to each of these entities. More...

typedef rmCharrmString
 data type for name, description, and unit strings provided by a subsystem. More...

typedef void* rmHandle
 data type for accessing created monitors. More...

typedef time_t rmTimeStamp
 The maximum time resolution is seconds. More...

typedef time_t rmTimeInterval
 Interval of time in seconds. More...

typedef long rmMicroTimeInterval
 Interval of time in microseconds. More...

typedef rmStatisticKey rmStatisticId

Enumerations

enum  rmDescriptions { rmShortDescription = 1, rmLongDescription, rmUnitsDescription, rmDescriptionsEnd }
enum  rmStatisticType { rmCounter = 1, rmGauge, rmStatisticTypeEnd }
enum  rmStatisticSize {
  rmSizeU32 = 1, rmSizeS32, rmSizeU64, rmSizeS64,
  rmStatisticSizeEnd
}
enum  rmStatisticScale {
  rmScaleNone = 1, rmScaleByte, rmScaleKilobyte, rmScaleMegabyte,
  rmScaleGigabyte, rmScaleTerabyte, rmScalePages, rmScaleJiffies,
  rmScaleNanosec, rmScaleMicrosec, rmScaleMillisec, rmScaleSec,
  rmScaleMin, rmScaleHour, rmScaleDay, rmScaleWeek,
  rmScaleMonth, rmScaleYear, rmStatisticScaleEnd
}
enum  rmMonitorType { rmThresholding = 1, rmWatermarking, rmLeakyBucket, rmMonitorTypeEnd }
enum  rmMonitorLocation { rmInLine = 1, rmDaemon, rmInLineDaemon, rmMonitorLocationEnd }
enum  rmStatisticTransform {
  rmNone = 1, rmChange, rmPercent, rmPercentChange,
  rmStatisticTransformEnd
}
 Statistic value transformations prior to the monitor test. More...

enum  rmThresholdType { rmThreshold = 1, rmBiDirectionalThreshold, rmThresholdTypeEnd }
 Bidirectional monitors generate a "cancel" event whenever a reading fails the test condition after reading values that did meet the test condition and generated a threshold event or events. The "cancel" event for a bidirectional monitor is generated only one time. More...

enum  rmThresholdTestCondition {
  rmValueIsAbove = 1, rmValueIsAtOrAbove, rmValueIsAt, rmValueIsAtOrBelow,
  rmValueIsBelow, rmValueIsNotAt, rmThresholdTestConditionEnd
}
 The test conditions a thresold monitor implements. More...

enum  rmThresholdPrecondition { rmNoPrecondition = 1, rmObserveGoodValue, rmThresholdPreconditionEnd }
enum  rmWatermarkType { rmHighWatermark = 1, rmLowWatermark, rmDualWatermark, rmWatermarkTypeEnd }
enum  rmMonitorStatus {
  rmAvailable = 1, rmConfigured, rmActive, rmStopped,
  rmInactive, rmUnavailableResource, rmMonitorStatusEnd
}


Detailed Description


Define Documentation

#define MAX_GUID_STRLEN   (sizeof(uuid_t)*2+6)
 

#define RESOURCE_MONITOR_VERSION   RESOURCE_MONITOR_VERSION_15
 

#define RESOURCE_MONITOR_VERSION_1   1
 

#define RESOURCE_MONITOR_VERSION_15   105
 

#define RMLeakyBucketLastEventTime   typeState.leakyBucket.LastEventTime
 

#define RMLeakyBucketLevel   typeState.leakyBucket.bucketLevel
 

#define RMLeakyBucketLoggingRate   typeControl.leakyBucket.loggingRate
 

#define RMThresholdCancelEventSeverity   typeConfiguration.threshold.cancelEventSeverity
 

#define RMThresholdCondition   typeConfiguration.threshold.condition
 

#define RMThresholdEventSeverity   typeConfiguration.threshold.eventSeverity
 

#define RMThresholdLastEventTime   typeState.threshold.LastEventTime
 

#define RMThresholdLoggingRate   typeControl.threshold.loggingRate
 

#define RMThresholdPrecondition   typeConfiguration.threshold.precondition
 

#define RMThresholdSamples   typeControl.threshold.samples
 

#define RMThresholdTolerance   typeControl.threshold.tolerance
 

#define RMThresholdType   typeConfiguration.threshold.type
 

#define RMThresholdValue   typeConfiguration.threshold.thresholdValue
 

#define RMWatermarkHigh   typeState.watermark.highWatermark
 

#define RMWatermarkHighTime   typeState.watermark.highTime
 

#define RMWatermarkLow   typeState.watermark.lowWatermark
 

#define RMWatermarkLowTime   typeState.watermark.lowTime
 

#define RMWatermarkType   typeConfiguration.watermark.type
 

#define RMbucketSize   typeConfiguration.leakyBucket.bucketSize
 

#define RMfillValue   typeConfiguration.leakyBucket.fillValue
 

#define RMleakyBucketEventSeverity   typeConfiguration.leakyBucket.eventSeverity
 

#define clearDataCapture( c )   (uuid_clear((c).dataCapture))
 

macro to clear rmUID dataCapture.

See also:
rmMonitorControl TextDataCapture.

#define clearMonitorUID( c )   (uuid_clear((c).uid))
 

macro to clear rmUID uid.

See also:
rmMonitorControl.

#define rmPsuedoResourceID   0xffffffff
 

A resource id of rmPsuedoResourceID indicates the rmResourceInfo structure represents all resources available in the subsystem. When this id is used by the subsystem, the actual number of resources available can not be determined. The subsystem only reports one resource available with an id of rmPsuedoResourceID. How real resource ids are obtained for use in a rmStatisticKey is defined by the subsystem.

See also:
rmResourceInfo rmStatisticKey

#define setDataCapture( c, str )   (uuid_parse((char *)(str), (c).dataCapture))
 

macro to set rmUID dataCapture with a uuid string.

See also:
rmMonitorControl TextDataCapture.

#define setMonitorUID( c, str )   (uuid_parse((char *)(str), (c).uid);
 

macro to set rmUID uid with a uuid string.

See also:
rmMonitorControl.


Typedef Documentation

typedef char rmChar
 

data type for name, description, and unit characters provided by a subsystem.

typedef void * rmHandle
 

data type for accessing created monitors.

typedef u_int32_t rmID
 

data type for ids of resources and statistics assigned by a subsystem to each of these entities.

typedef long rmMicroTimeInterval
 

Interval of time in microseconds.

typedef rmStatisticKey rmStatisticId
 

typedef rmChar * rmString
 

data type for name, description, and unit strings provided by a subsystem.

typedef time_t rmTimeInterval
 

Interval of time in seconds.

typedef time_t rmTimeStamp
 

The maximum time resolution is seconds.

typedef uuid_t rmUID
 

data type for a unique ID for the subsystem or created monitor.


Enumeration Type Documentation

enum rmDescriptions
 

enumeration of description types supported by the resource monitoring facility

Enumeration values:
rmShortDescription   typically a name.
rmLongDescription   detailed description of a resource monitor entity.
rmUnitsDescription   a statistic's unit description.
rmDescriptionsEnd   enum end.

enum rmMonitorLocation
 

There are two locations where monitoring can occur, in the daemon process or in the line of execution where the statistic is maintained.

Enumeration values:
rmInLine   monitor created where the statistic is maintained.
rmDaemon   monitor created in the resource monitor facility's daemon process.
rmInLineDaemon   an inline monitor if permitted and configuration is supported, else daemon monitor will be created.
rmMonitorLocationEnd   enum end.

enum rmMonitorStatus
 

Resource monitor states: Transition events and resulting state:

  • monitor creation request
    1. rmAvailable - monitor registry entry is created (internal daemon state)
    2. rmConfigured - monitor class is created with configuration, state parameters initialized
  • start monitor request
    • rmActive - monitoring is initiated
  • monitor reset request
    1. rmStopped - If rmActive, monitor is stopped
    2. rmConfigured - state parameters reinitialized
  • stop monitor request, monitoring interval expires, or delete monitor request
    • rmStopped - not monitoring
  • restore active monitor
    1. rmInactive - monitor class being recreated (internal daemon state)
    2. rmActive - monitoring is reinitiated
  • resource becomes unavailable
    • rmUnavailableResource - resource has been removed or deleted, monitoring has stopped
  • error reading statistic
    1. rmStopped - discontinue monitoring
    2. rmUnavailableResource - resource now considered unavailable
Enumeration values:
rmAvailable   created monitor registry entry (internal daemon state).
rmConfigured   configured and ready to be started.
rmActive   currently monitoring.
rmStopped   not monitoring.
rmInactive   monitor being recreated (internal daemon state).
rmUnavailableResource   resource has been removed or deleted, monitoring has stopped.
rmMonitorStatusEnd   enum end.

enum rmMonitorType
 

monitor types supported by the resource monitoring facility.

Enumeration values:
rmThresholding   generates an event when a level is exceeded.
rmWatermarking   records the highest and/or lowest value observed.
rmLeakyBucket   generates an event when a counter exceeds a rate of increase.
rmMonitorTypeEnd   enum end.

enum rmStatisticScale
 

enumeration of statistic scales supported by the resource monitoring facility

Enumeration values:
rmScaleNone   No units specified.
rmScaleByte   Bytes.
rmScaleKilobyte   Kilobytes (1024).
rmScaleMegabyte   Megabytes (1024^2).
rmScaleGigabyte   Gigabytes (1024^3).
rmScaleTerabyte   Terabytes (1024^4).
rmScalePages   pages.
rmScaleJiffies   jiffies.
rmScaleNanosec   nanoseconds.
rmScaleMicrosec   microseconds.
rmScaleMillisec   milliseconds.
rmScaleSec   seconds.
rmScaleMin   minutes.
rmScaleHour   hours.
rmScaleDay   days.
rmScaleWeek   weeks.
rmScaleMonth   months.
rmScaleYear   years.
rmStatisticScaleEnd   enum end.

enum rmStatisticSize
 

enumeration of statistic sizes supported by the resource monitoring facility

Enumeration values:
rmSizeU32   unsigned 32-bit value.
rmSizeS32   signed 32-bit value.
rmSizeU64   unsigned 64-bit value.
rmSizeS64   signed 64-bit value.
rmStatisticSizeEnd   enum end.

enum rmStatisticTransform
 

Statistic value transformations prior to the monitor test.

rmNone monitors the current value of the statistic provided by the subsystem. rmChange monitors the change in a statistic value from one reading to the next. rmPercent monitors the percentage of the statistic when an upper bound is available. rmPercent monitors can not be created for statistics when no upper bound is available. rmPercentChange monitors the percent change in a statistic value from one reading to the next.

See also:
ResourceMonitor::rmGetUpperBound.
Note:
Since statistic transforms effectively turn any statistic into a guage, the Leaky Bucket monitor should no be used with transforms because it only works predictably with counters.
Enumeration values:
rmNone   monitor the raw statistic value.
rmChange   monitor the change in a counter or gauge statistic value.
rmPercent   monitor the percentage of the gauge statistic.
rmPercentChange   monitor the precent change in a counter or gauge statistic value.
rmStatisticTransformEnd   enum end.

enum rmStatisticType
 

enumeration of statistic types supported by the resource monitoring facility

Enumeration values:
rmCounter   counter - increases or decreases only.
rmGauge   gauge - increases and decreases, usually has upper and lower bounds as in a percentage.
rmStatisticTypeEnd   enum end.

enum rmThresholdPrecondition
 

Enumeration values:
rmNoPrecondition   no preconditions must be met before testing for a condition.
rmObserveGoodValue   must observe a good value before logging a threshold event.
rmThresholdPreconditionEnd   enum end.

enum rmThresholdTestCondition
 

The test conditions a thresold monitor implements.

See also:
rmThresholdConfiguration
Enumeration values:
rmValueIsAbove   condition is true if the observed value is greater than the threshold value.
rmValueIsAtOrAbove   condition is true if the observed value is greater than or equal to the threshold value.
rmValueIsAt   condition is true if the observed value is equal to or within the tolerance the threshold value.
See also:
rmThresholdControl.
rmValueIsAtOrBelow   condition is true if the observed value is less than or equal to the threshold value.
rmValueIsBelow   condition is true if the observed value is less than the threshold value.
rmValueIsNotAt   condition is true if the observed value is not equal to or not within the tolerance the threshold value.
See also:
rmThresholdControl.
rmThresholdTestConditionEnd   enum end.

enum rmThresholdType
 

Bidirectional monitors generate a "cancel" event whenever a reading fails the test condition after reading values that did meet the test condition and generated a threshold event or events. The "cancel" event for a bidirectional monitor is generated only one time.

See also:
rmThresholdConfiguration
Enumeration values:
rmThreshold   generates an event when the test condition is met.
rmBiDirectionalThreshold   also generates a single event when the test condition ceases to be met and resets notificationPaused. ResourceMonitor::rmResetNotification.
rmThresholdTypeEnd   enum end.

enum rmWatermarkType
 

Enumeration values:
rmHighWatermark   records the highest observed value over the monitoring interval.
rmLowWatermark   records the lowest observed value over the monitoring interval.
rmDualWatermark   records both the highest and lowest observed values over the monitoring interval.
rmWatermarkTypeEnd   enum end.


Generated at Sat Sep 7 21:21:07 2002 for Resource Monitoring Facility by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001