mrtg/uptime.pl

Sat, 04 Apr 2009 22:28:28 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 04 Apr 2009 22:28:28 +0200
changeset 135
cd68ee26852b
child 136
ca197d884ebd
permissions
-rw-r--r--

Improve style in config file and add uptime and webstat scripts.

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

mercurial