PracticeDev/study_perl/rrdtool/first.pl

9 lines
282 B
Perl
Raw Permalink Normal View History

2022-12-20 17:31:11 +08:00
use RRDp;
RRDp::start "/usr/local/bin/rrdtool";
RRDp::cmd qw(create demo.rrd --step 100
DS:in:GAUGE:100:U:U
RRA:AVERAGE:0.5:1:10);
$answer = RRDp::read;
print $$answer;
($usertime,$systemtime,$realtime) = ($RRDp::user,$RRDp::sys,$RRDp::real);