in reply to Re^10: show a message only during the sleep time
in thread show a message only during the sleep time

system `/usr/local/www/cgi-bin/ntop/ntop.sh stop`
Either pick backquotes (because you want to capture the output) or system (because you want to run the child process), but not both. You're taking the output of ntop, and running it as yet another command, ignoring the results.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Replies are listed 'Best First'.
Re^12: show a message only during the sleep time
by cc (Beadle) on Jul 25, 2005 at 19:51 UTC
    thanks, but can you pls give some more details or post a code how should I change that ?

    greetings
    cc
Re^12: show a message only during the sleep time
by cc (Beadle) on Jul 25, 2005 at 21:10 UTC
    you mean ?
    system "(`/usr/local/www/cgi-bin/ntop/ntop.sh stop`)" or die "cannot +stop ntop: $!";
      No. You're confusing backquotes with system again.

      If you want to launch the program as a child process:

      system "/usr/local/www/cgi-bin/ntop/ntop.sh", "stop" and die "... ";
      If you want to capture the output of the ntop command:
      my $output = `/usr/local ...`;
      Don't take the output of ntop, and feed it back to system!

      -- Randal L. Schwartz, Perl hacker
      Be sure to read my standard disclaimer if this is a reply.

        thanks,
        I changed to:
        my $stop = `/usr/local/bin/sudo /usr/local/www/cgi-bin/ntop/ntop.sh st +op` or die "cannot stop ntop: $!";