mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Warn if inodes are running now
This commit is contained in:
@@ -359,7 +359,7 @@ foreach my $m (@mounted) {
|
||||
($t, $f) = @$zp;
|
||||
}
|
||||
else {
|
||||
($t, $f) = &mount::disk_space($m->[2], $m->[0]);
|
||||
($t, $f) = &disk_space($m->[2], $m->[0]);
|
||||
}
|
||||
if (($m->[2] eq "simfs" || $m->[2] eq "vzfs" ||
|
||||
$m->[0] eq "/dev/vzfs" ||
|
||||
@@ -370,8 +370,14 @@ foreach my $m (@mounted) {
|
||||
}
|
||||
$total += $t*1024;
|
||||
$free += $f*1024;
|
||||
my ($it, $if);
|
||||
if (defined(&inode_space)) {
|
||||
($it, $if) = &inode_space($m->[2], $m->[0]);
|
||||
}
|
||||
push(@fs, { 'total' => $t*1024,
|
||||
'free' => $f*1024,
|
||||
'itotal' => $it,
|
||||
'ifree' => $if,
|
||||
'dir' => $m->[0],
|
||||
'device' => $m->[1],
|
||||
'type' => $m->[2] });
|
||||
|
||||
@@ -24,6 +24,8 @@ right_used2=$2 used, $1 guaranteed, $3 burstable
|
||||
right_out=$1 of $2
|
||||
right_fsfull=Warning! The $2 filesystem mounted at $1 has no free disk space!
|
||||
right_fsnearly=Warning! The $2 filesystem mounted at $1 has only $3 of free disk space
|
||||
right_ifsfull=Warning! The filesystem mounted at $1 has no free inodes out of $2!
|
||||
right_ifsnearly=Warning! The filesystem mounted at $1 has only $3 of free inodes out of $2
|
||||
right_quota=Disk usage and quota
|
||||
right_header5=Account Information
|
||||
right_uquota=Disk quota and usage
|
||||
|
||||
@@ -223,6 +223,24 @@ if ($info->{'disk_fs'} && &show_section('disk')) {
|
||||
'level' => 'warn',
|
||||
'warning' => $msg });
|
||||
}
|
||||
next if (!$fs->{'itotal'});
|
||||
if ($fs->{'ifree'} == 0) {
|
||||
my $msg = &text('right_ifsfull',
|
||||
"<tt>$fs->{'dir'}</tt>",
|
||||
$fs->{'itotal'});
|
||||
push(@rv, { 'type' => 'warning',
|
||||
'level' => 'danger',
|
||||
'warning' => $msg });
|
||||
}
|
||||
elsif ($fs->{'free'}*1.0 / $fs->{'total'} < 0.01) {
|
||||
my $msg = &text('right_ifsnearly',
|
||||
"<tt>$fs->{'dir'}</tt>",
|
||||
$fs->{'itotal'},
|
||||
$fs->{'ifree'});
|
||||
push(@rv, { 'type' => 'warning',
|
||||
'level' => 'warn',
|
||||
'warning' => $msg });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user