RRDManager¶
This class is a wrap around the rrdtool as it is a command line based tool within this class there are several methods which take in some parameters required by the corresponding rrd command and executes it.
- class DIRAC.FrameworkSystem.private.monitoring.RRDManager.RRDManager(rrdLocation, graphLocation)¶
Bases:
object
- __init__(rrdLocation, graphLocation)¶
Initialize RRDManager
- bucketize(secs, bucketLength)¶
Bucketizes a time (in secs)
- create(type, rrdFile, bucketLength)¶
Creates an rrd file.
- Parameters
rrdFile (string) – name of the rrd file.
bucketLength (int) – The required bucket length.
- Returns
The value dictionary / S_ERROR with a message.
- deleteRRD(rrdFile)¶
This method is used to delete an rrd file.
- Parameters
rrdFile (string) – name of the rrd file.
- existsRRDFile(rrdFile)¶
Checks whether a given rrd file exists or not.
- Parameters
rrdFile (string) – name of the rrd file.
- Returns
bool
- getCurrentBucketTime(bucketLength)¶
Gets current time “bucketized”
- getGraphLocation()¶
Sets the location for graph files
- groupPlot(fromSecs, toSecs, activitiesList, stackActivities, size, graphFilename='')¶
Generates a group plot.
- Parameters
fromSecs (int) – A value in seconds from where to start.
toSecs (int) – A value in seconds for where to end.
activitiesList (list) – A list of activities.
stackActivities (list) – A list of stacked activities.
size (int) – There is a matrix defined for size so here only one of these values go [0, 1, 2, 3].
graphFilename (string) – A name for the graph file.
- Returns
S_OK with the graph filename / The error message.
- plot(fromSecs, toSecs, activity, stackActivities, size, graphFilename='')¶
Generates a non grouped plot.
- Parameters
fromSecs (int) – A value in seconds from where to start.
toSecs (int) – A value in seconds for where to end.
activitiesList (list) – A list of activities.
stackActivities (list) – A list of stacked activities.
size (int) – There is a matrix defined for size so here only one of these values go [0, 1, 2, 3].
graphFilename (string) – A name for the graph file.
- Returns
S_OK with the graph filename / The error message.
- update(type, rrdFile, bucketLength, valuesList, lastUpdate=0)¶
Updates an rrd file.