fix mount point output for linux
This commit is contained in:
parent
45c468f324
commit
ff796b48bf
1 changed files with 2 additions and 1 deletions
|
@ -1091,11 +1091,11 @@ sub get_os_release {
|
|||
|
||||
sub get_fs_info() {
|
||||
my @sinfo = `df -P | grep '%'`;
|
||||
shift @sinfo;
|
||||
my @iinfo = `df -Pi| grep '%'`;
|
||||
shift @iinfo;
|
||||
map { s/.*\s(\d+)%\s+(.*)/$1\t$2/g } @sinfo;
|
||||
foreach my $info (@sinfo) {
|
||||
next if $info =~ m{(\d+)\t/(run|dev|sys|proc)($|/)};
|
||||
if ( $info =~ /(\d+)\t(.*)/ ) {
|
||||
if ( $1 > 85 ) {
|
||||
badprint "mount point $2 is using $1 % total space";
|
||||
|
@ -1109,6 +1109,7 @@ sub get_fs_info() {
|
|||
|
||||
map { s/.*\s(\d+)%\s+(.*)/$1\t$2/g } @iinfo;
|
||||
foreach my $info (@iinfo) {
|
||||
next if $info =~ m{(\d+)\t/(run|dev|sys|proc)($|/)};
|
||||
if ( $info =~ /(\d+)\t(.*)/ ) {
|
||||
if ( $1 > 85 ) {
|
||||
badprint "mount point $2 is using $1 % of max allowed inodes";
|
||||
|
|
Loading…
Reference in a new issue