Don t display advice for tcp slot if /proc/sys/sunrpc file doesn t exist #230

This commit is contained in:
root 2016-08-10 11:48:41 +02:00
parent 2aac89e89c
commit 24f1c722d3

View file

@ -1255,6 +1255,7 @@ sub get_kernel_info() {
infoprint "Swappiness is < 10."; infoprint "Swappiness is < 10.";
} }
# only if /proc/sys/sunrpc exists
my $tcp_slot_entries=`sysctl -n sunrpc.tcp_slot_table_entries 2>/dev/null`; my $tcp_slot_entries=`sysctl -n sunrpc.tcp_slot_table_entries 2>/dev/null`;
if ( -f "/proc/sys/sunrpc" and $tcp_slot_entries eq '' or $tcp_slot_entries < 100 ) { if ( -f "/proc/sys/sunrpc" and $tcp_slot_entries eq '' or $tcp_slot_entries < 100 ) {
badprint badprint