mrtg/uptime.pl

Sat, 04 Apr 2009 23:05:27 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 04 Apr 2009 23:05:27 +0200
changeset 138
3603322c3b20
parent 136
ca197d884ebd
child 160
1a36468e720c
permissions
-rw-r--r--

Correct interface logic of uptime(1) formatting script.

     1 #!@l_prefix@/bin/perl
     2 ##
     3 ##  uptime.pl: provide formatted uptime(1) information
     4 ##
     6 $null = 0;
     7 $uptime = `uptime`;
     8 $hostname = `hostname`;
    10 $uptime =~ /up (.*?) day/;
    11 $up = int($1);
    13 print "$up\n";
    14 print "$up\n";
    15 print "$null\n";

mercurial