my @devices = `kudzu -qps -c HD | grep device: | cut -d" " -f2 | sort | uniq`;
-if ( $querry[0] =~ "sd?" || $querry[0] =~ "hd?" ){
+if ( $querry[0] =~ "sd?" || $querry[0] =~ "hd?" || $querry[0] =~ "xvd??"){
print "Content-type: image/png\n\n";
binmode(STDOUT);
&Header::openbox('100%', 'center', $Lang::tr{'disk usage'});
print "<table width='95%' cellspacing='5'>\n";
- open(DF,'/bin/df -B M -x rootfs|');
+ open(DF,'/bin/df -P -B M -x rootfs|');
while(<DF>){
if ($_ =~ m/^Filesystem/ ){
print <<END
close DF;
print "<tr><td colspan='7'> \n<tr><td colspan='7'><h3>Inodes</h3>\n";
- open(DF,'/bin/df -i -x rootfs|');
+ open(DF,'/bin/df -P -i -x rootfs|');
while(<DF>){
if ($_ =~ m/^Filesystem/ ){
print <<END
my $disk = $_[0];
chomp $disk;
my @status;
- if (-e "/tmp/hddstatus"){
- open(DATEI, "</tmp/hddstatus") || die "Datei nicht gefunden";
+ if (-e "/var/run/hddstatus"){
+ open(DATEI, "</var/run/hddstatus") || die "Datei nicht gefunden";
my @diskstate = <DATEI>;
close(DATEI);
}
if ( $status[1]=~/standby/){
- my $ftime = localtime((stat("/tmp/hddshutdown-$disk"))[9]);
+ my $ftime = localtime((stat("/var/run/hddshutdown-$disk"))[9]);
print"<B>Disk $disk status:<font color=#FF0000>".$status[1]."</font></B> (since $ftime)";
}else{
print"<B>Disk $disk status:<font color=#00FF00>".$status[1]."</font></B>";