mrtg/uptime.pl

Mon, 17 Sep 2012 19:10:10 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 17 Sep 2012 19:10:10 +0200
changeset 689
9fe04d4d4e5a
parent 160
1a36468e720c
permissions
-rw-r--r--

Update to new version of vendor software although Oracle fails to deliver.
More specifically, newer db(3) patch revisions exist but Oracle has
removed them from the canonical download server URI for Berkely DB.

     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 # According to http://oss.oetiker.ch/mrtg/doc/mrtg-reference.en.html
    14 # 'the external command must return 4 lines of output.'
    15 print "$up\n";
    16 print "$up\n";
    17 print "$null\n";
    18 print "$null\n";

mercurial