1 |
#!/usr/bin/perl |
#!/usr/bin/perl -W |
2 |
|
|
3 |
$datetime = `date -u '+%Y%m%d.%H%M%S'`; |
$datetime = `date -u '+%Y%m%d.%H:%M:%S'`; |
4 |
chomp $datetime; |
chomp $datetime; |
5 |
|
|
6 |
$sensors = `sensors`; |
$sensors = `sensors`; |
10 |
$cpu = $1; |
$cpu = $1; |
11 |
|
|
12 |
$df = `df -k`; |
$df = `df -k`; |
13 |
$df =~ m|/dev/hda1\s+[0-9]+\s+([0-9]+)\s+([0-9]+)|; |
$hda1u = $hda1f = $hda3u = $hda3f = $hdc1u = $hdc1f = '-'; |
14 |
$hda1u = $1; $hda1f = $2; |
($hda1u, $hda1f) = ($1, $2) if $df =~ m|/dev/hda1\s+[0-9]+\s+([0-9]+)\s+([0-9]+)|; |
15 |
$df =~ m|/dev/hda3\s+[0-9]+\s+([0-9]+)\s+([0-9]+)|; |
($hda3u, $hda3f) = ($1, $2) if $df =~ m|/dev/hda3\s+[0-9]+\s+([0-9]+)\s+([0-9]+)|; |
16 |
$hda3u = $1; $hda3f = $2; |
($hdc1u, $hdc1f) = ($1, $2) if $df =~ m|/dev/hdc1\s+[0-9]+\s+([0-9]+)\s+([0-9]+)|; |
|
$df =~ m|/dev/hdc1\s+[0-9]+\s+([0-9]+)\s+([0-9]+)|; |
|
|
$hdc1u = $1; $hdc1f = $2; |
|
17 |
|
|
18 |
$ip = `ip -s -o link show eth0`; |
$ip = `ip -s -o link show eth0`; |
19 |
$ip =~ /RX:.*?([0-9]+)/; |
$ip =~ /RX:.*?([0-9]+)/; |