|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jrobin.cmd.RrdCommander
public class RrdCommander
Class to be used to execute various RRDTool commands (original syntax of RRDTool 1.0.x must be used). Currently supported commands are CREATE, UPDATE, LAST, FETCH, DUMP, RESTORE, XPORT, GRAPH, TUNE, INFO
| Constructor Summary | |
|---|---|
RrdCommander()
|
|
| Method Summary | |
|---|---|
static Object |
execute(String command)
Executes single RRDTool command. |
static boolean |
isRrdDbPoolUsed()
Checks if the class uses RrdDbPool internally while executing
RRDTool commands. |
static boolean |
isStandardOutUsed()
Checks if the output from any RRDTool command will be visible on the standard output device (console). |
static void |
main(String[] args)
A small demo which allows you to pass arbitrary RRDTool commands to JRobin |
static void |
setRrdDbPoolUsed(boolean rrdDbPoolUsed)
Forces or prohibits RrdDbPool usage internally while executing
RRDTool commands |
static void |
setStandardOutUsed(boolean standardOutUsed)
Method used to control access to stdout (System.out, console) for all RRDTool commands. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RrdCommander()
| Method Detail |
|---|
public static boolean isStandardOutUsed()
true.
public static void setStandardOutUsed(boolean standardOutUsed)
standardOutUsed - true if the output should be visible on the
standard output device, false otherwise.public static boolean isRrdDbPoolUsed()
RrdDbPool internally while executing
RRDTool commands.
public static void setRrdDbPoolUsed(boolean rrdDbPoolUsed)
RrdDbPool usage internally while executing
RRDTool commands
rrdDbPoolUsed - true, to force pool usage, false otherwise.
public static Object execute(String command)
throws IOException,
RrdException
command - RRDTool command like:
create test.rrd --start "noon yesterday" --step 300 DS:x:GAUGE:600:U:U RRA:AVERAGE:0.5:5:1000
update test.rrd N:1000
last test.rrd
...
Exact type of the result depends from the type of executed RRDTool command:
FetchData object representing fetched data.
RrdGraphInfo object containing graph info
IOException - thrown in case of I/O error
RrdException - thrown for all other errors (parsing errors,
unknown RRDTool syntax/command/option, internal RRD errors...)
public static void main(String[] args)
throws IOException
args - Not used
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||