mrtg/uptime.pl

changeset 138
3603322c3b20
parent 136
ca197d884ebd
child 160
1a36468e720c
     1.1 --- a/mrtg/uptime.pl	Sat Apr 04 22:53:22 2009 +0200
     1.2 +++ b/mrtg/uptime.pl	Sat Apr 04 23:05:27 2009 +0200
     1.3 @@ -3,12 +3,14 @@
     1.4  ##  uptime.pl: provide formatted uptime(1) information
     1.5  ##
     1.6  
     1.7 -$ZERO = 0;
     1.8 +$null = 0;
     1.9  $uptime = `uptime`;
    1.10 +$hostname = `hostname`;
    1.11  
    1.12  $uptime =~ /up (.*?) day/;
    1.13  $up = int($1);
    1.14 -$hostname = `hostname`;
    1.15  
    1.16 -print "$ZERO\n$up\n"
    1.17 +print "$up\n";
    1.18 +print "$up\n";
    1.19 +print "$null\n";
    1.20  

mercurial