File: rrd_last.php

package info (click to toggle)
php4-rrdtool 1.04-11
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,168 kB
  • ctags: 85
  • sloc: sh: 9,365; ansic: 356; php: 102; makefile: 72; awk: 43
file content (26 lines) | stat: -rw-r--r-- 549 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?

 ## the following line is only needed if built as a self-contained
 ## extension.  If you build the rrdtool module as an embedded
 ## extension, the rrd_* functions will always be available, so you
 ## do not need the dl() call.
 dl("rrdtool.so");

 ##
 ## demonstration of the rrd_last() command
 ##

 $ret = rrd_last("/some/path/some-router-fe2.rrd");

 if ( $ret != - 1 )
 {
     printf("Last update time:  %s\n", strftime("%m/%d/%Y %H:%M:%S"), $ret);
 }
 else
 {
     $err_msg = rrd_error();
     echo "Error occurred:  $err_msg\n";
 }


?>