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

Diff of /archive/sysstats/getdata

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 9 by james, Fri Jan 31 09:06:10 2003 UTC revision 20 by james, Thu Feb 13 11:48:06 2003 UTC
# Line 1  Line 1 
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    
# Line 10  $sensors =~ /CPU Temp: +([+-][0-9.]+)/; Line 10  $sensors =~ /CPU Temp: +([+-][0-9.]+)/;
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]+)/;

Legend:
Removed from v.9  
changed lines
  Added in v.20

  ViewVC Help
Powered by ViewVC 1.1.26