Hinzugefuegt:
[people/pmueller/ipfire-2.x.git] / config / cron / minutely / loadstat
1 #!/usr/bin/perl
2
3 use RRDs;
4 my $LOAD = '';
5 my $CMD = "awk '{print \$1\":\"\$2\":\"\$3}' < /proc/loadavg";
6 $LOAD=`$CMD`;
7 chomp($LOAD);
8 RRDs::update ("/var/log/rrd/load.rrd",
9 "-t", "load1:load5:load15",
10 "N:$LOAD");
11
12 my $ERROR = RRDs::error;
13 print "$ERROR\n" if $ERROR;