109 |
|
my($partition_no) = 0; |
110 |
|
for (my($i) = 0; $i < $#df; $i++) { |
111 |
|
my($line) = $df[$i]; |
112 |
< |
$line =~ /^(\/[^\s]*)\s*([0-9]*)\s*([0-9]*)\s*([0-9]*)\s*[^\s]*\s*(\/[^\s]*)\s*/; |
112 |
> |
$line =~ /^([^\s]*)\s*([0-9]*)\s*([0-9]*)\s*([0-9]*)\s*[^\s]*\s*(\/[^\s]*)\s*/; |
113 |
|
# $4 will not match unless everything before it does... |
114 |
|
if (defined $5) { |
115 |
|
my ($filesystem, $kbytes, $used, $avail, $mount) = ($1, $2, $3, $4, $5); |
322 |
|
|
323 |
|
if ($uptime =~ /day.*,\s+([0-9]+):([0-9]+)/) { |
324 |
|
# normal |
325 |
< |
$uptime =~ /up\s+([0-9]+)\s+.*,\s+([0-9]+):([0-9]+)/; |
325 |
> |
$uptime =~ /up\s+([0-9]+)\s+[^\s]+,\s+([0-9]+):([0-9]+)/; |
326 |
|
$uptime = "$1:$2:$3"; |
327 |
|
} |
328 |
|
else { |
329 |
|
if ($uptime =~ /day/) { |
330 |
|
if ($uptime =~ /hr/) { |
331 |
|
# 0 minutes |
332 |
< |
$uptime =~ /up\s+([0-9]+)\s+.*,\s+([0-9]+)\s+.*,/; |
332 |
> |
$uptime =~ /up\s+([0-9]+)\s+[^\s]+,\s+([0-9]+)\s+[^\s]+,/; |
333 |
|
$uptime = "$1:$2:0"; |
334 |
|
} |
335 |
|
elsif ($uptime =~ /min/) { |
336 |
|
# 0 hours |
337 |
< |
$uptime =~ /up\s+([0-9]+)\s+.*,\s+([0-9]+)\s+.*,/; |
337 |
> |
$uptime =~ /up\s+([0-9]+)\s+[^\s]+,\s+([0-9]+)\s+[^\s]+,/; |
338 |
|
$uptime = "$1:0:$2"; |
339 |
|
} |
340 |
|
else { |