Red Hat Bugzilla – Bug 472226
argument list too long when trying to cat lots of log files
Last modified: 2008-11-27 08:11:12 EST
Description of problem:
Here is the error I get:
Can't exec "/bin/sh": Argument list too long at /etc/cron.daily/0logwatch line 980.
system cat /var/log/samba/log.t42 <SNIP LONG LIST OF SAMBA LOGFILES> /var/log/samba/log.0.0.0.0.old /var/log/samba/log.0.0.0.0 | /usr/bin/perl /usr/share/logwatch/scripts/logfiles/samba/applydate| /usr/bin/perl /usr/share/logwatch/scripts/logfiles/samba/removeheaders>/var/cache/logwatch/logwatch.RGnerkUu/samba failed: -1 at /etc/cron.daily/0logwatch line 980.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Create a lot of log files in /var/log/samba/. logwatch will try to run a command line that's too long for sh.
the above error.
successfull logwatch run
Although this hits samba because it will create a lot of log files, I imagine this could hit other logs that do the same thing.
I'm not sure whether this problem could be fixed - I will ask logwatch upstream about their opinion, but I don't think there is the possibility to change/improve this behavior.