CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
problem with df command

 



digioleg54
User

Mar 22, 2017, 2:03 PM

Post #1 of 8 (3833 views)
problem with df command Can't Post

I am trying to use
use Filesys::Df;

my $dsk_spc = df(.);

print "disk $dsk_spc{per}"

But the message says
Can't locate Filesys/Df.pm in @INC (@INC contains: /applications/ua3/perl-lib /applications/ua3/perl /export/applications/ibm6000/CPAN/64-5.8.8-vac8-aix5.3/lib/perl5/5.8.8/aix-thread-multi-64all /export/applications/ibm6000/CPAN/64-5.8.8-vac8-aix5.3/lib/perl5/5.8.8 /export/applications/ibm6000/CPAN/64-5.8.8-vac8-aix5.3/lib/perl5/site_perl/5.8.8/aix-thread-multi-64all /export/applications/ibm6000/CPAN/64-5.8.8-vac8-aix5.3/lib/perl5/site_perl/5.8.8 /export/applications/ibm6000/CPAN/64-5.8.8-vac8-aix5.3/lib/perl5/site_perl

What can I use instead?


Laurent_R
Veteran / Moderator

Mar 23, 2017, 3:17 AM

Post #2 of 8 (3822 views)
Re: [digioleg54] problem with df command [In reply to] Can't Post

This means that the Filesys::Df module is not installed on your system. Why don't you simply install it?

There are other modules doing similar things, such as Filesys::DiskFree, but it's probably not installed either, so you would have to install it too.

If you can't install these modules, and assuming you're on Linux or Unix, you could possibly run the system df within backticks and retrieve the output.


digioleg54
User

Mar 24, 2017, 9:13 AM

Post #3 of 8 (3805 views)
Re: [Laurent_R] problem with df command [In reply to] Can't Post

Laurent,
It is not my company. It is a huge bank and install something on prod. requires big meeting and preparation job. My question is, how can I do it without this package. Or may be there is another command? I cannot use UNIX command, server doesn't have it


FishMonger
Veteran / Moderator

Mar 24, 2017, 1:00 PM

Post #4 of 8 (3800 views)
Re: [digioleg54] problem with df command [In reply to] Can't Post

I need to double check, but I believe both of those modules are pure perl (just like your script), so if you can install your script on the server, you can install the modules in the same manner.

What OS is the server?


digioleg54
User

Mar 27, 2017, 8:11 AM

Post #5 of 8 (3768 views)
Re: [FishMonger] problem with df command [In reply to] Can't Post

It is appach. I cannot do it myself on QA or prod. Not in this company. How can I use shell command in Perl script?


Laurent_R
Veteran / Moderator

Mar 27, 2017, 9:54 AM

Post #6 of 8 (3764 views)
Re: [digioleg54] problem with df command [In reply to] Can't Post

Apache is not an OS. We really need to know the OS (Linux, Unix, Windows, VMS, Mac, etc.) to have a chance to help you.


digioleg54
User

Mar 27, 2017, 10:22 AM

Post #7 of 8 (3762 views)
Re: [Laurent_R] problem with df command [In reply to] Can't Post

UNIX


Laurent_R
Veteran / Moderator

Mar 28, 2017, 1:27 PM

Post #8 of 8 (3748 views)
Re: [digioleg54] problem with df command [In reply to] Can't Post

Then you should be able to run the df system command within backticks.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives