[PLUG] Determining Why Perl Script Fails

Rich Shepard rshepard at appl-ecosys.com
Wed Aug 6 20:32:05 UTC 2014


On Wed, 6 Aug 2014, Eric Wilhelm wrote:

> If you're getting no error output and not the expected results, you might
> look for unchecked exit code on system() or backtick/qx{}. Those bits
> might also be in your strace output. `grep sendmail`?

Eric,

   Nice thought. Here's what I find:

$ grep sendmail logwatch-strace.log 
stat64("/usr/share/logwatch/default.conf/services/sendmail-largeboxes.conf",
{st_mode=S_IFREG|0644, st_size=1374, ...}) = 0
stat64("/usr/share/logwatch/default.conf/services/sendmail.conf",
{st_mode=S_IFREG|0644, st_size=6692, ...}) = 0
stat64("/usr/share/logwatch/default.conf/services/sendmail-largeboxes.conf",
{st_mode=S_IFREG|0644, st_size=1374, ...}) = 0
open("/usr/share/logwatch/default.conf/services/sendmail-largeboxes.conf",
O_RDONLY|O_LARGEFILE) = 3
stat64("/usr/share/logwatch/dist.conf/services/sendmail-largeboxes.conf",
0x9ef6180) = -1 ENOENT (No such file or directory)
stat64("/etc/logwatch/conf/services/sendmail-largeboxes.conf", 0x9ef6180) =
-1 ENOENT (No such file or directory)
stat64("/usr/share/logwatch/default.conf/services/sendmail.conf",
- {st_mode=S_IFREG|0644, st_size=6692, ...}) = 0
open("/usr/share/logwatch/default.conf/services/sendmail.conf",
- O_RDONLY|O_LARGEFILE) = 3
stat64("/usr/share/logwatch/dist.conf/services/sendmail.conf", 0x9ef6180) =
- -1 ENOENT (No such file or directory)
stat64("/etc/logwatch/conf/services/sendmail.conf", 0x9ef6180) = -1 ENOENT
(No such file or directory)
stat64("/etc/logwatch/scripts/services/sendmail", 0x9ef6180) = -1 ENOENT (No
such file or directory)
stat64("/usr/share/logwatch/scripts/services/sendmail",
{st_mode=S_IFREG|0755, st_size=89580, ...}) = 0
stat64("/etc/logwatch/scripts/services/sendmail-largeboxes", 0x9ef6180) = -1
ENOENT (No such file or directory)
stat64("/usr/share/logwatch/scripts/services/sendmail-largeboxes",
{st_mode=S_IFREG|0755, st_size=2616, ...}) = 0

   While there is nothing in /etc/logwatch/conf/services/ the file sought is
in /usr/share/logwatch/scripts/services/.

Rich



More information about the PLUG mailing list