Re: Logrotate appends extra numbers to logfiles




Bill Marcum wrote:
On 28 Jul 2006 11:28:54 -0700, jplee3@xxxxxxxxx
<jplee3@xxxxxxxxx> wrote:

Thanks for all the help.
Well, the other big problem we're having is that the server keeps going
down - it's gone down like 4 times in the past week. It usually goes
down around 4am, the same time that the cron.daily (including the
logrotate script), runs. One of my coworkers and I have a hunch that
something is conflicting there - perhaps with another script that's
trying to run:

0anacron logrotate prelink tmpwatch
0logwatch makewhatis.cron rpm yum.cron
cups mlocate.cron tetex.cron

Have you tried running top around 4 am? It could be mlocate building an
index of those exponentially multiplying log files. Or maybe your
server gets a lot of clients at that time, but you probably would have
seen that in the server logs.



--
In just seven days, I can make you a man!
-- The Rocky Horror Picture Show

Ok guys, I think we figured the server-crash portion out. The sysadmin
commented out the /wtmp entry and instead put in his own entry:

"create 0755 root utmp" - basically, it looks like this overwrites
utmp, which belongs to /wtmp - I'm not sure why, in detail, this would
cause everything to crash, but the server's been up ever since we
commented out that entire entry :)


And regarding the exponential growth of numbers (thanks unruh!):

"Anyway, someone stupidly put something like
/var/log/syslog* into their logrotate rules. That means rotate syslog,
syslog.1, syslog.1.1"

- I believe I've found the cause. The sysadmin edited the syslog script
in the same manner (his intention was to use the asterisk to grab all
files in the nt directory; of course, it didn't turn out to work that
way):

/var/log/nt/* /var/log/messages /var/log/secure /var/log/maillog
/var/log/spoole
r /var/log/boot.log /var/log/cron {
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2>
/dev/null || t
rue
endscript
}
/etc/logrotate.d/syslog

.



Relevant Pages

  • Re: Same Internal Server Error from last two days
    ... I am trying to run a Hello World Perl Script in Apache 2.2. ... But its constantly giving me Internal Server Error.The script ... # have to place corresponding `LoadModule' lines at this location so the ...
    (perl.beginners)
  • Re: How to make Apache (2.2.4) less greedy, or Sendmail less polite? [semi-solved]
    ... Then I make an entry in my /etc/hosts.allow file that denies access to all in my hosts.deny file. ... Firstly, I took some measures to figure out where the issues came from, and using Apache's "server-status" handler, I noticed the script that caused Apache to choke up, was a PHP script that shows entries of photographic events that I organise from time to time. ... I then wondered why, as this script never caused trouble before, and while checking the server status I did already notice that the "store comments" script was called very often. ... the machines that were used for this, and I will report them to the proper anti spam authorities, such that they will be blacklisted Internet wide. ...
    (freebsd-questions)
  • Re: Same Internal Server Error from last two days
    ... I am trying to run a Hello World Perl Script in Apache 2.2. ... But its constantly giving me Internal Server Error.The script Runs perfectly fine from the command prompt. ... # This is the main Apache HTTP server configuration file. ... LoadModule actions_module modules/mod_actions.so ...
    (perl.beginners)
  • Same Internal Server Error from last two days
    ... I am trying to run a Hello World Perl Script in Apache 2.2. ... But its constantly giving me Internal Server Error.The script ... # have to place corresponding `LoadModule' lines at this location so the ...
    (perl.beginners)
  • Re: Regarding a selection for mobile code/scripting language
    ... Client Side scripting, so the server can send script commands to the client. ... I decided they should be scripted and mobile code. ...
    (Vuln-Dev)