mrtg/uptime.pl

Tue, 28 Aug 2012 18:29:30 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 28 Aug 2012 18:29:30 +0200
changeset 534
d2d0020cfafa
parent 160
1a36468e720c
permissions
-rw-r--r--

Update from Drupal 6.x to 7.x and introduce several new HTML5 themes. Because
many themes from Drupal 6.x have since been abandoned, left unmaintained, or
not ported to Drupal 7.x, this package has changed in size and utility.

     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