michael@176: #! @l_prefix@/bin/perl michael@136: ## michael@136: ## uptime.pl: provide formatted uptime(1) information michael@136: ## michael@136: michael@138: $null = 0; michael@136: $uptime = `uptime`; michael@138: $hostname = `hostname`; michael@136: michael@136: $uptime =~ /up (.*?) day/; michael@136: $up = int($1); michael@136: michael@160: # According to http://oss.oetiker.ch/mrtg/doc/mrtg-reference.en.html michael@160: # 'the external command must return 4 lines of output.' michael@138: print "$up\n"; michael@138: print "$up\n"; michael@138: print "$null\n"; michael@160: print "$null\n"; michael@136: