summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 790f2cf)
raw | patch | inline | side by side (parent: 790f2cf)
author | Ton Voon <tonvoon@users.sourceforge.net> | |
Mon, 15 Sep 2003 14:26:54 +0000 (14:26 +0000) | ||
committer | Ton Voon <tonvoon@users.sourceforge.net> | |
Mon, 15 Sep 2003 14:26:54 +0000 (14:26 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@723 f882894a-f735-0410-b71e-b25c423dba1c
plugins-scripts/check_disk_smb.pl | patch | blob | history |
index b4eee38b88633d4ff030d358a61b412dd9746569..3358f6a139d19c657b39a852cf9d5c58c7c2625e 100755 (executable)
use POSIX;
use strict;
use Getopt::Long;
-use vars qw($opt_V $opt_h $opt_H $opt_s $opt_W $opt_u $opt_p $opt_w $opt_c $verbose);
+use vars qw($opt_P $opt_V $opt_h $opt_H $opt_s $opt_W $opt_u $opt_p $opt_w $opt_c $verbose);
use vars qw($PROGNAME);
use lib utils.pm ;
use utils qw($TIMEOUT %ERRORS &print_revision &support &usage);
Getopt::Long::Configure('bundling');
GetOptions
("v" => \$verbose, "verbose" => \$verbose,
+ "P=s" => \$opt_P, "port=s" => \$opt_P,
"V" => \$opt_V, "version" => \$opt_V,
"h" => \$opt_h, "help" => \$opt_h,
"w=s" => \$opt_w, "warning=s" => \$opt_w,
if ($opt_h) {print_help(); exit $ERRORS{'OK'};}
my $smbclient= "$utils::PATH_TO_SMBCLIENT " ;
-my $smbclientoptions="";
+my $smbclientoptions= $opt_P ? "-p $opt_P " : "";
# Options checking
sub print_usage () {
print "Usage: $PROGNAME -H <host> -s <share> -u <user> -p <password>
- -w <warn> -c <crit> [-W <workgroup>]\n";
+ -w <warn> -c <crit> [-W <workgroup>] [-P <port>]\n";
}
sub print_help () {
-c, --critical=INTEGER or INTEGER[kMG]
Percent of used space at which a critical will be generated (Defaults: 95%)
+-P, --port=INTEGER
+ Port to be used to connect to. Some Windows boxes use 139, others 445 (Defaults to smbclient default)
If thresholds are followed by either a k, M, or G then check to see if that
much disk space is available (kilobytes, Megabytes, Gigabytes)