/[james]/archive/sysstats/getdata
ViewVC logotype

Contents of /archive/sysstats/getdata

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9 - (show annotations) (download)
Fri Jan 31 09:06:10 2003 UTC (21 years, 10 months ago) by james
File size: 638 byte(s)
Change time format for ploticus compatibility.

1 #!/usr/bin/perl
2
3 $datetime = `date -u '+%Y%m%d.%H:%M:%S'`;
4 chomp $datetime;
5
6 $sensors = `sensors`;
7 $sensors =~ /SYS Temp: +([+-][0-9.]+)/;
8 $sys = $1;
9 $sensors =~ /CPU Temp: +([+-][0-9.]+)/;
10 $cpu = $1;
11
12 $df = `df -k`;
13 $df =~ m|/dev/hda1\s+[0-9]+\s+([0-9]+)\s+([0-9]+)|;
14 $hda1u = $1; $hda1f = $2;
15 $df =~ m|/dev/hda3\s+[0-9]+\s+([0-9]+)\s+([0-9]+)|;
16 $hda3u = $1; $hda3f = $2;
17 $df =~ m|/dev/hdc1\s+[0-9]+\s+([0-9]+)\s+([0-9]+)|;
18 $hdc1u = $1; $hdc1f = $2;
19
20 $ip = `ip -s -o link show eth0`;
21 $ip =~ /RX:.*?([0-9]+)/;
22 $rx = $1;
23 $ip =~ /TX:.*?([0-9]+)/;
24 $tx = $1;
25
26 print "$datetime $sys $cpu $hda1u $hda1f $hda3u $hda3f $hdc1u $hdc1f $rx $tx\n";

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26