Here is some modifications we did on the script check_files.pl, we wanted to share this change with you ;-)
The script can check the size sum of searched files with "-S". It can also returns the biggest
file from a list and with "-H" it can execute ls command remotly on a host using SSH.
Here are the changes:
Added a new argument "-S [warn,crit]" to show the sum of the size of selected
files.
Added a new argument "-s [warn,crit]" to search for selected files which one
is bigger.
Performance data suppport for these new checks.
Added a new argument "-H " to execute the ls command on a remote
host using SSH (used for host that does not have all Perl dependencies). Only
public-key auth is supported.
Examples:
Compute the sum size of files:
$ ./check_files.pl -D /opt/oradata -F"t" -f -S -H "10.224.20.48"
OK - Sum of file sizes is 3897 octet, 2 t files found | 't'=2 size_sum=3897o
Search largest file:
$ ./check_files.pl -D /opt/oradata -F"t" -f -s -H "10.224.20.48"
OK - Largest size file is 3896 octet, 2 t files found | 't'=2 size_largest=3896o size_smallest=1o
Combined:
$ ./check_files.pl -D /opt/oradata -F"t" -f -S -s -H "10.224.20.48"
OK - Largest size file is 3896 octet, Sum of file sizes is 3897 octet, 2 t files found | 't'=2 size_largest=3896o size_smallest=1o size_sum=3897o
Hello,
Here is some modifications we did on the script check_files.pl, we wanted to share this change with you ;-)
The script can check the size sum of searched files with "-S". It can also returns the biggest file from a list and with "-H" it can execute ls command remotly on a host using SSH.
Here are the changes:
Examples:
Compute the sum size of files:
Search largest file:
Combined:
Warning and Critical thresholds can also be set.
Bye, Patrick