[NBLUG/talk] Apache Logs..

ME dugan at passwall.com
Wed Apr 2 18:38:02 PST 2003


For apache, the "normal" way to start/stop it is with "apachectl" or on
some systems with the /etc/init.d/apache script.

Many program will accept the sighup signal and save their state/flush
their changes, and some will even re-read config files, or do other
cleanup including quit (sometimes.)

If this is logrotate, then it may just not be apache-educated. To see how
apache is expected to be started/stopped, check out apachectl (should be a
script on many systems)

If you want to educate logrotate on how to gracefully stop apache, then
you can send a SIGTERM to the parent process for apache and that should
stop apache. As an alternative, you may be able to educate logrotate on
how to use apachectl and pass it the arg "stop" and start for a graceful
shutdown.

You probably want to avoid a sigkill ;-)

-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS/CM$/IT$/LS$/S/O$ !d--(++) !s !a+++(-----) C++$(++++) U++++$(+$) P+$>+++
L+++$(++) E W+++$(+) N+ o K w+$>++>+++ O-@ M+$ V-$>- !PS !PE Y+ PGP++
t at -(++) 5+@ X@ R- tv- b++ DI+++ D+ G--@ e+>++>++++ h(++)>+ r*>? z?
------END GEEK CODE BLOCK------
decode: http://www.ebb.org/ungeek/ about: http://www.geekcode.com/geek.html
  Campus IT(/OS Security): Operating Systems Support Specialist Assistant


Christopher Wagner said:

> I'm sorry, my original question wasn't clear..  I'm aware that it's a log
> rotation thing, it just occurs to me that these processes should be dying
> politely and not require a kill -9.  Am I wrong in this?  Thanks everyone
> for the help. :)
>
> - Christopher Wagner
> chrisw at pacaids.com
>
> Packaging Aids Corporation - Information Systems
> P.O. Box 9144
> San Rafael, CA 94912-9144
> http://www.pacaids.com/
> (415) 454-4868 x116
>
>
> -----Original Message-----
> From: talk-admin at nblug.org [mailto:talk-admin at nblug.org]On Behalf Of
> Mark Street
> Sent: Wednesday, April 02, 2003 11:48 AM
> To: talk at nblug.org
> Subject: Re: [NBLUG/talk] Apache Logs..
>
>
> logrotate is doing this.
>
> check the file /etc/logrotate.d/httpd RH8-9 OR "apache" on RH7.2 for
> reference.
>
> the script portion of logrotate restarts the httpd server to generate new
> log
> files.
>
> On my RH9 box which should be very similar to yours, it reads;
>
> /var/log/httpd/*log {
>     missingok
>     notifempty
>     sharedscripts
>     postrotate
>         /bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null
> ||
> true
>     endscript
> }
>
>
>
> On Wednesday 02 April 2003 11:15, Christopher Wagner wrote:
>> I'm getting these every day in my /var/log/httpd/error_log when my daily
>> cron cycle happens.  This box is a production box running Redhat 7.2 and
>> Apache 1.3.27.  Any ideas?  The machine seems to be running fine
>> otherwise.. I noticed when I was looking through the logs laughing at
>> all
>> the silly IIS exploit attempts (I get about 3-6 each day).  :)
>>
>> [Wed Apr  2 04:02:27 2003] [warn] child process 9401 did not exit,
>> sending
>> another SIGHUP
>> [Wed Apr  2 04:02:28 2003] [warn] child process 9402 did not exit,
>> sending
>
>
> --
> Mark Street, D.C.
> Red Hat Certified Engineer
> Cert# 807302251406074
> --
> Key fingerprint = 3949 39E4 6317 7C3C 023E  2B1F 6FB3 06E7 D109 56C0
> GPG key http://www.streetchiro.com/pubkey.asc
>
> _______________________________________________
> talk mailing list
> talk at nblug.org
> http://nblug.org/mailman/listinfo/talk
> _______________________________________________
> talk mailing list
> talk at nblug.org
> http://nblug.org/mailman/listinfo/talk
>
>




More information about the talk mailing list