org.jrobin.cmd
public class RrdCommander extends Object
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. |
Parameters: 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
...
Returns: Result of specific RRDTool command. It is guaranteed that the result of any
successfully executed command will be always different from null.
Unsuccessfully executed commands will always throw
an exception, so you need not check for null results.
Exact type of the result depends from the
type of executed RRDTool command:
Throws: IOException thrown in case of I/O error RrdException thrown for all other errors (parsing errors, unknown RRDTool syntax/command/option, internal RRD errors...)
Returns: true if the pool is used, false otherwise
true
.
Returns: true, if the output will be visible on the standard output device; false, otherwise.
Parameters: args Not used
Throws: IOException
Parameters: rrdDbPoolUsed true, to force pool usage, false otherwise.
Parameters: standardOutUsed true
if the output should be visible on the
standard output device, false
otherwise.