Changeset e1db9954cbea6017aba56ec8ad0fd13e0d607208
- Timestamp:
- 12/29/07 14:48:18
(5 years ago)
- Author:
- Brian Holcomb <holcomb@omniti.com>
- git-committer:
- Brian Holcomb <holcomb@omniti.com> 1198939698 +0000
- git-parent:
[ce65f3a2497dc3e397249ce0721ff283be8b603e]
- git-author:
- Brian Holcomb <holcomb@omniti.com> 1198939698 +0000
- Message:
linux df needs posix option
git-svn-id: https://labs.omniti.com/resmon/trunk@63 8c0face9-b7db-6ec6-c4b3-d5f7145c7d55
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r3869a70 |
re1db995 |
|
| 91 | 91 | @ISA = qw/Resmon::Module/; |
|---|
| 92 | 92 | |
|---|
| | 93 | my $dfcmd = ($^O eq 'linux') ? 'df -kP' : 'df -k'; |
|---|
| | 94 | |
|---|
| 93 | 95 | sub handler { |
|---|
| 94 | 96 | my $arg = shift; |
|---|
| … | … | |
| 96 | 98 | return $os if $os; |
|---|
| 97 | 99 | my $devorpart = $arg->{'object'}; |
|---|
| 98 | | my $output = cache_command("df -k", 120); |
|---|
| | 100 | my $output = cache_command("$dfcmd", 120); |
|---|
| 99 | 101 | my ($line) = grep(/$devorpart\s*/, split(/\n/, $output)); |
|---|
| 100 | 102 | if($line =~ /(\d+)%/) { |
|---|