in reply to Mail me when Firewall Log Files Become Corrupt.

Hmm, this might just be a typo when you created the node, but you're setting $result and testing $cmd1.

I haven't worked with the system you're using, but if I understand your writeup correctly, the fw log command won't stop until explicitly killed (ctrl-C or some such). You want to run it in a script and stop it after you get your output. The backticks won't do that, because they'll wait until the process has exited. You can either play shell games or do explicit fork and exec in your Perl program.

Why I mean by "shell games" is to wrap a small shell script around the program like this:

# Start fw log in background. # Note that all file descriptors are still shared; # you may need to close stdin if "fw log" tries to read it. fw log -n & # Wait 10 seconds. sleep 10 # Kill the child process and exit. kill $!
I've presumed the 10-second sleep and that you're using a shell in which $! is the process ID of the last backgrounded program.

To do it in Perl takes a little more work because you'll need to handle communication to the child process yourself. For ideas, look at the perlipc doc.

Of course, if I've misunderstood how "Checkpoint FW-1 logfiles" work, you can ignore this node entirely. The PSI::ESP module only goes so far....

HTH