C# Class dnrrdlib.rrd

Direct bindings to the RRD Library for .NET applications. Uses the PInvoke method of accessing the rrdlib.dll file.
Mostra file Open project: GrumpyOldTroll/rrdtool

Public Methods

Method Description
Create ( string argv ) : int

The create function of RRDtool lets you set up new Round Robin Database (RRD) files. The file is created at its final, full size and filled with *UNKNOWN* data.

Create ( string filename, UInt32 pdp_step, Int32 last_up, string argv ) : int

The create function of RRDtool lets you set up new Round Robin Database (RRD) files. The file is created at its final, full size and filled with *UNKNOWN* data.

Dump ( string argv ) : Int32

Writes the contents of an rrd file to an XML file

Dump ( string filename, string outname ) : Int32

Writes the contents of an rrd file to an XML file

Fetch ( string argv, Int32 &start, Int32 &end, UInt32 &step, UInt32 &ds_cnt, string &ds_namv, IntPtr &data ) : Int32

Returns an array of values for the period specified from a given rrd. Specify your parameters in the argv array and check the referenced parameters for values returned from the rrd

First ( string argv ) : Int32

Returns the timestamp of the first value in the rrd

First ( string filename, int rraindex ) : Int32

Returns the timestamp of the first value in the rrd given the rra index

Get_Error ( ) : string

Returns the latest error from rrdlib

Graph ( string argv ) : Int32

Generate a graph from an RRD file. Specify all the graph options in the string array as you normally would with the command line version.

Info ( string filename ) : rrd_info_t

Returns a linked list of rrd_info_t objects that describe the rrd file.

Info_Print ( rrd_info_t info ) : void

Formats and prints information in the object to the standard output

Last ( string argv ) : Int32

Returns the timestamp of the last value in the rrd

Last ( string filename, int rraindex ) : Int32

Returns the timestamp of the last value in the rrd given the rra index

Last_Update ( string filename, Int32 &ret_last_update, UInt32 &ret_ds_count, string &ret_ds_names, string &ret_last_ds ) : Int32

Finds the timestamp of the last updated value in the rrd

Random ( ) : int

Generates a random number for testing rrdlib

Resize ( string argv ) : Int32

Alters the size of an RRA and creates a new rrd in the dll's directory NOTE: The new rrd may return unexpected results if you are not very careful NOTE: This may crash in version 1.4.3

Restore ( string argv ) : Int32

Creates an rrd from an XML data dump

Tune ( string argv ) : Int32

Modify the characteristics of an rrd

Update ( string argv ) : Int32

The update function feeds new data values into an RRD. The data is time aligned (interpolated) according to the properties of the RRD to which the data is written.

Update ( string filename, string template, string argv ) : Int32

The update function feeds new data values into an RRD. The data is time aligned (interpolated) according to the properties of the RRD to which the data is written.

Update2 ( string argv ) : IntPtr

The update function feeds new data values into an RRD. The data is time aligned (interpolated) according to the properties of the RRD to which the data is written.

Version ( ) : string

Returns a string with the numeric version of the rrdlib build version

Xport ( string argv, Int32 &start, Int32 &end, UInt32 &step, UInt32 &col_cnt, string &leggend_v, IntPtr &data ) : Int32

Grabs the values from an rrd. Similar to fetch but enables merging of multiple rrds and calculations

Private Methods

Method Description
rrd_create ( Int32 argc, string argv ) : Int32
rrd_create_r ( [ filename, UInt32 pdp_step, Int32 last_up, Int32 argc, [ argv ) : Int32
rrd_dump ( Int32 argc, string argv ) : Int32
rrd_dump_r ( string filename, string outname ) : Int32
rrd_fetch ( Int32 argc, string argv, Int32 &start, Int32 &end, UInt32 &step, UInt32 &ds_cnt, string &ds_namv, IntPtr &data ) : Int32
rrd_first ( Int32 argc, string argv ) : Int32
rrd_first_r ( string filename, Int32 rraindex ) : Int32
rrd_get_error ( ) : string
rrd_graph ( Int32 argc, string argv, string &prdata, Int32 &xsize, Int32 &ysize, double &ymin, double &ymax ) : Int32
rrd_graph_v ( Int32 argc, string argv ) : Int32
rrd_info_print ( IntPtr data ) : void
rrd_info_r ( string filename ) : IntPtr
rrd_last ( Int32 argc, string argv ) : Int32
rrd_last_r ( string filename, Int32 rraindex ) : Int32
rrd_lastupdate ( Int32 argc, string argv ) : Int32
rrd_lastupdate_r ( string filename, Int32 &ret_last_update, UInt32 &ret_ds_count, string &ret_ds_names, string &ret_last_ds ) : Int32
rrd_random ( ) : Int32
rrd_resize ( Int32 argc, string argv ) : Int32
rrd_restore ( Int32 argc, string argv ) : Int32
rrd_strversion ( ) : string
rrd_tune ( Int32 argc, string argv ) : Int32
rrd_update ( Int32 argc, string argv ) : Int32
rrd_update_r ( string filename, string template, Int32 argc, string argv ) : Int32
rrd_update_v ( Int32 argc, string argv ) : IntPtr
rrd_xport ( Int32 argc, string argv, Int32 unused, Int32 &start, Int32 &end, UInt32 &step, UInt32 &col_cnt, string &leggend_v, IntPtr &data ) : Int32

Method Details

Create() public static method

The create function of RRDtool lets you set up new Round Robin Database (RRD) files. The file is created at its final, full size and filled with *UNKNOWN* data.
public static Create ( string argv ) : int
argv string String array of command line arguments
return int

Create() public static method

The create function of RRDtool lets you set up new Round Robin Database (RRD) files. The file is created at its final, full size and filled with *UNKNOWN* data.
public static Create ( string filename, UInt32 pdp_step, Int32 last_up, string argv ) : int
filename string A full path to the location where you want the rrd to reside
pdp_step System.UInt32 Specifies the base interval in seconds with which data will be fed into the RRD
last_up System.Int32 Timestamp of the last update
argv string String array of command line arguments
return int

Dump() public static method

Writes the contents of an rrd file to an XML file
public static Dump ( string argv ) : Int32
argv string String array of command line arguments
return System.Int32

Dump() public static method

Writes the contents of an rrd file to an XML file
public static Dump ( string filename, string outname ) : Int32
filename string Full path to the rrd file
outname string Full path to write the XML output
return System.Int32

Fetch() public static method

Returns an array of values for the period specified from a given rrd. Specify your parameters in the argv array and check the referenced parameters for values returned from the rrd
public static Fetch ( string argv, Int32 &start, Int32 &end, UInt32 &step, UInt32 &ds_cnt, string &ds_namv, IntPtr &data ) : Int32
argv string String array of command line arguments (must include the filename)
start System.Int32 Starting timestamp found in the rrd
end System.Int32 Ending timestamp found in the rrd
step System.UInt32 The rrd's step value
ds_cnt System.UInt32 Number of data sources found
ds_namv string Names of data sources found
data System.IntPtr Values found (in double type)
return System.Int32

First() public static method

Returns the timestamp of the first value in the rrd
public static First ( string argv ) : Int32
argv string String array of command line arguments
return System.Int32

First() public static method

Returns the timestamp of the first value in the rrd given the rra index
public static First ( string filename, int rraindex ) : Int32
filename string Full path to the rrd file
rraindex int 0 based index of the rra to get a value for
return System.Int32

Get_Error() public static method

Returns the latest error from rrdlib
public static Get_Error ( ) : string
return string

Graph() public static method

Generate a graph from an RRD file. Specify all the graph options in the string array as you normally would with the command line version.
public static Graph ( string argv ) : Int32
argv string String array of command line arguments
return System.Int32

Info() public static method

Returns a linked list of rrd_info_t objects that describe the rrd file.
public static Info ( string filename ) : rrd_info_t
filename string Full path to the rrd file
return rrd_info_t

Info_Print() public static method

Formats and prints information in the object to the standard output
public static Info_Print ( rrd_info_t info ) : void
info rrd_info_t rrd_info_t object with data to print
return void

Last() public static method

Returns the timestamp of the last value in the rrd
public static Last ( string argv ) : Int32
argv string String array of command line arguments
return System.Int32

Last() public static method

Returns the timestamp of the last value in the rrd given the rra index
public static Last ( string filename, int rraindex ) : Int32
filename string
rraindex int 0 based index of the rra to get a value for
return System.Int32

Last_Update() public static method

Finds the timestamp of the last updated value in the rrd
public static Last_Update ( string filename, Int32 &ret_last_update, UInt32 &ret_ds_count, string &ret_ds_names, string &ret_last_ds ) : Int32
filename string Full path to the rrd file
ret_last_update System.Int32 Unix timestamp of the last update
ret_ds_count System.UInt32 Number of data sources found
ret_ds_names string Names of the data sources found
ret_last_ds string Name of the last data source found
return System.Int32

Random() public static method

Generates a random number for testing rrdlib
public static Random ( ) : int
return int

Resize() public static method

Alters the size of an RRA and creates a new rrd in the dll's directory NOTE: The new rrd may return unexpected results if you are not very careful NOTE: This may crash in version 1.4.3
public static Resize ( string argv ) : Int32
argv string String array of command line arguments
return System.Int32

Restore() public static method

Creates an rrd from an XML data dump
public static Restore ( string argv ) : Int32
argv string String array of command line arguments
return System.Int32

Tune() public static method

Modify the characteristics of an rrd
public static Tune ( string argv ) : Int32
argv string String array of command line arguments
return System.Int32

Update() public static method

The update function feeds new data values into an RRD. The data is time aligned (interpolated) according to the properties of the RRD to which the data is written.
public static Update ( string argv ) : Int32
argv string String array of command line arguments
return System.Int32

Update() public static method

The update function feeds new data values into an RRD. The data is time aligned (interpolated) according to the properties of the RRD to which the data is written.
public static Update ( string filename, string template, string argv ) : Int32
filename string Full path to the rrd to update
template string List of data sources to update and in which order
argv string String array of command line arguments
return System.Int32

Update2() public static method

The update function feeds new data values into an RRD. The data is time aligned (interpolated) according to the properties of the RRD to which the data is written.
public static Update2 ( string argv ) : IntPtr
argv string String array of command line arguments
return System.IntPtr

Version() public static method

Returns a string with the numeric version of the rrdlib build version
public static Version ( ) : string
return string

Xport() public static method

Grabs the values from an rrd. Similar to fetch but enables merging of multiple rrds and calculations
public static Xport ( string argv, Int32 &start, Int32 &end, UInt32 &step, UInt32 &col_cnt, string &leggend_v, IntPtr &data ) : Int32
argv string String array of command line arguments
start System.Int32 Starting timestamp found in the rrd
end System.Int32 Ending timestamp found in the rrd
step System.UInt32 Step size found in the rrd
col_cnt System.UInt32 Number of data sources found in the rrd
leggend_v string Add a legend
data System.IntPtr Values from the rrd as double type
return System.Int32