Changeset 743
- Timestamp:
- 11/16/08 20:35:05 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DiskUsagePlugin/lib/TWiki/Plugins/DiskUsagePlugin.pm
r529 r743 109 109 110 110 sub diskusage { 111 my $sandbox = $TWiki::sharedSandbox || $TWiki::sandbox; 111 112 my $web = TWiki::Func::extractNameValuePair( @_, "web" ); 112 113 $web =~ s/\W//go; … … 114 115 my $datadir = $TWiki::cfg{DataDir}; 115 116 my $cmd = "/usr/bin/du -b $datadir/$web/*.txt 2>&1"; 116 my @lines = `$cmd`; 117 my ( $result, $code ) = $sandbox->sysCommand( $cmd ); 118 my @lines = split m#$/#, $result; 117 119 my %usageByTopic; 118 120 … … 127 129 my $pubdir = $TWiki::cfg{PubDir}; 128 130 $cmd = "/usr/bin/du -b $pubdir/$web/* 2>&1"; 129 130 @lines = `$cmd`; 131 ( $result, $code ) = $sandbox->sysCommand( $cmd ); 132 @lines = split m#$/#, $result; 133 131 134 my %pubByTopic; 132 135 … … 158 161 sub quotaData { 159 162 my $cmd = "/usr/bin/quota -v 2>&1"; 160 161 my @lines = `$cmd`; 163 my $sandbox = $TWiki::sharedSandbox || $TWiki::sandbox; 164 165 my ( $result, $code ) = $sandbox->sysCommand( $cmd ); 166 my @lines = split m#$/#, $result; 167 162 168 my $lastLine = $lines[$#lines] || ""; 163 169 my @fields = split /\s+/, $lastLine;
Note: See TracChangeset
for help on using the changeset viewer.
