From ff796b48bf5681f9be213fb69d9b1e4d17546509 Mon Sep 17 00:00:00 2001 From: Sergei A Mamonov Date: Wed, 30 Mar 2016 15:59:47 +0300 Subject: [PATCH] fix mount point output for linux --- mysqltuner.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mysqltuner.pl b/mysqltuner.pl index 173a43d..77c8e6a 100755 --- a/mysqltuner.pl +++ b/mysqltuner.pl @@ -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";