C# Class CogMon.Services.RRD.RrdTool

Inheritance: IRrdTool
Show file Open project: lafar6502/cogmon

Public Methods

Method Description
AppendData ( string rrdFile, System.DateTime timestamp, double>.IDictionary values ) : void
AppendData ( string rrdFile, System.DateTime timestamp, double values ) : void
CreateRRDFile ( RrdCreateInfo config, string fileName ) : void
DrawGraph ( GraphDefinition gd, DrawOptions opts, IEnumerable addEvents, string destinationFile ) : RrdImageInfo
DrawGraph ( Lib gd, Lib opts, string destinationFile ) : RrdImageInfo
DrawGraph ( Lib gd, Lib opts, Stream writeImageTo ) : void
ExportGraphData ( GraphDefinition gd, DrawOptions opts ) : TimeSeriesData
FromUnixTime ( int ut ) : System.DateTime
GetGraphXForTime ( int time, int startTime, int endTime, int graphWidth ) : int
GetRrdInfoFromFile ( string fileName ) : RrdFileInfo
RrdTool ( ) : System
SaveGraphFile ( RRDGraphInfo graphConfig, string outputFile ) : void
ToUnixTime ( System.DateTime dt ) : int

Protected Methods

Method Description
BuildRrdGraphCmdline ( GraphDefinition gd, DrawOptions opts, IEnumerable addEvents, string destinationFile, bool asXport ) : string

Private Methods

Method Description
ParseDouble ( string val ) : double
ParseRRDInfo ( TextReader tr, bool dynAsArray ) : object>.Dictionary
ParseRRDInfo ( string txt, bool dynAsArray ) : object>.Dictionary
ParseRrdValue ( string val ) : object
PrepareGraphParams ( GraphDefinition gd, DrawOptions opts ) : object>.Dictionary
RunExeWithCommandline ( string exe, string cmdline ) : string

Runs external command and returns its output text

RunRrdWithCommandline ( string cmdline ) : string
ToString ( double val ) : string

Method Details

AppendData() public method

public AppendData ( string rrdFile, System.DateTime timestamp, double>.IDictionary values ) : void
rrdFile string
timestamp System.DateTime
values double>.IDictionary
return void

AppendData() public method

public AppendData ( string rrdFile, System.DateTime timestamp, double values ) : void
rrdFile string
timestamp System.DateTime
values double
return void

BuildRrdGraphCmdline() protected method

protected BuildRrdGraphCmdline ( GraphDefinition gd, DrawOptions opts, IEnumerable addEvents, string destinationFile, bool asXport ) : string
gd CogMon.Lib.Graph.GraphDefinition
opts CogMon.Lib.Graph.DrawOptions
addEvents IEnumerable
destinationFile string
asXport bool
return string

CreateRRDFile() public method

public CreateRRDFile ( RrdCreateInfo config, string fileName ) : void
config RrdCreateInfo
fileName string
return void

DrawGraph() public method

public DrawGraph ( GraphDefinition gd, DrawOptions opts, IEnumerable addEvents, string destinationFile ) : RrdImageInfo
gd CogMon.Lib.Graph.GraphDefinition
opts CogMon.Lib.Graph.DrawOptions
addEvents IEnumerable
destinationFile string
return CogMon.Lib.Graph.RrdImageInfo

DrawGraph() public method

public DrawGraph ( Lib gd, Lib opts, string destinationFile ) : RrdImageInfo
gd Lib
opts Lib
destinationFile string
return CogMon.Lib.Graph.RrdImageInfo

DrawGraph() public method

public DrawGraph ( Lib gd, Lib opts, Stream writeImageTo ) : void
gd Lib
opts Lib
writeImageTo Stream
return void

ExportGraphData() public method

public ExportGraphData ( GraphDefinition gd, DrawOptions opts ) : TimeSeriesData
gd CogMon.Lib.Graph.GraphDefinition
opts CogMon.Lib.Graph.DrawOptions
return CogMon.Lib.DataSeries.TimeSeriesData

FromUnixTime() public static method

public static FromUnixTime ( int ut ) : System.DateTime
ut int
return System.DateTime

GetGraphXForTime() public static method

public static GetGraphXForTime ( int time, int startTime, int endTime, int graphWidth ) : int
time int
startTime int
endTime int
graphWidth int
return int

GetRrdInfoFromFile() public method

public GetRrdInfoFromFile ( string fileName ) : RrdFileInfo
fileName string
return RrdFileInfo

RrdTool() public method

public RrdTool ( ) : System
return System

SaveGraphFile() public method

public SaveGraphFile ( RRDGraphInfo graphConfig, string outputFile ) : void
graphConfig RRDGraphInfo
outputFile string
return void

ToUnixTime() public static method

public static ToUnixTime ( System.DateTime dt ) : int
dt System.DateTime
return int