Ronnie has asked for the wisdom of the Perl Monks concerning the following question:
Sorry if this is a really dumb question but the documentation I've found on this subject is a bit sketchy and or beyond my experience. I want to replicate the UNIX (spit) df -k command so that I can monitor the utilisation of certain disc slices. After a bit of investigation I settled on the Filesys::DiskFree module. The problem is I can't get anything out of this script. I would have expected the following code to return a list of disc slices on the supplied disc name -
#!/usr/bin/perl -w # use Filesys::DiskFree; # $disc = '/dev/vx/dsk/var' ; new Filesys::DiskFree ; $handle->avail($disc) ;
I get the error message - Can't call method "avail" on an undefined value. Am I being particularily stupid here? Where do the returned values (if any - and there should be about 12) go to? I'm not very familiar with modules/methods so I won't be offended if this request is treated with disdain as long as my understanding of it improves.
Cheers,the ever so humble Ronnie Cruickshank
20040304 Edit by Corion: Added code tags around code
20040305 Edit by castaway: Changed title from 'Filesys::DiskFree'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problems using Filesys::DiskFree
by Happy-the-monk (Canon) on Mar 04, 2004 at 15:16 UTC | |
by Ronnie (Scribe) on Mar 04, 2004 at 15:36 UTC | |
|
Re: Problems using Filesys::DiskFree
by talexb (Chancellor) on Mar 04, 2004 at 14:41 UTC | |
by Ronnie (Scribe) on Mar 04, 2004 at 14:48 UTC | |
|
Re: Problems using Filesys::DiskFree
by blue_cowdawg (Monsignor) on Mar 04, 2004 at 15:12 UTC | |
|
Re: Filesys::DiskFree (or Filesys::Df)
by grinder (Bishop) on Mar 04, 2004 at 15:20 UTC | |
|
Re: Problems using Filesys::DiskFree
by tachyon (Chancellor) on Mar 04, 2004 at 17:43 UTC | |
by Ronnie (Scribe) on Mar 05, 2004 at 10:50 UTC | |
by tachyon (Chancellor) on Mar 05, 2004 at 16:18 UTC |