summaryrefslogtreecommitdiffstats
path: root/plugins-scripts
diff options
context:
space:
mode:
Diffstat (limited to 'plugins-scripts')
-rwxr-xr-xplugins-scripts/check_disk_smb.pl6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins-scripts/check_disk_smb.pl b/plugins-scripts/check_disk_smb.pl
index 43841c3..b547615 100755
--- a/plugins-scripts/check_disk_smb.pl
+++ b/plugins-scripts/check_disk_smb.pl
@@ -176,7 +176,7 @@ $SIG{'ALRM'} = sub {
176}; 176};
177alarm($TIMEOUT); 177alarm($TIMEOUT);
178 178
179# Execute an "ls" on the share using smbclient program 179# Execute a "du" on the share using smbclient program
180# get the results into $res 180# get the results into $res
181my @cmd = ( 181my @cmd = (
182 $smbclient, 182 $smbclient,
@@ -185,7 +185,7 @@ my @cmd = (
185 defined($workgroup) ? ("-W", $workgroup) : (), 185 defined($workgroup) ? ("-W", $workgroup) : (),
186 defined($address) ? ("-I", $address) : (), 186 defined($address) ? ("-I", $address) : (),
187 defined($opt_P) ? ("-p", $opt_P) : (), 187 defined($opt_P) ? ("-p", $opt_P) : (),
188 "-c", "ls" 188 "-c", "du"
189); 189);
190 190
191print join(" ", @cmd) . "\n" if ($verbose); 191print join(" ", @cmd) . "\n" if ($verbose);
@@ -198,7 +198,7 @@ alarm(0);
198@lines = split /\n/, $res; 198@lines = split /\n/, $res;
199 199
200#Get the last line into $_ 200#Get the last line into $_
201$_ = $lines[$#lines]; 201$_ = $lines[$#lines-1];
202#print "$_\n"; 202#print "$_\n";
203 203
204#Process the last line to get free space. 204#Process the last line to get free space.