[AOLSERVER] Rolling logs in Windows

0 views
Skip to first unread message

Titi Alailima

unread,
May 6, 2008, 3:12:58 PM5/6/08
to AOLS...@listserv.aol.com

Anyone know how to signal nsd in Windows to roll the logs?  Any equivalent of “kill –HUP”?

 

Titi Ala'ilima

Lead Architect

MedTouch LLC

1100 Massachusetts Avenue

Cambridge, MA 02138

617.621.8670 x309

 

-- AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <list...@listserv.aol.com> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.

Tom Jackson

unread,
May 6, 2008, 3:50:21 PM5/6/08
to AOLS...@listserv.aol.com
Does ns_logroll work?

http://rmadilo.com/files/nsapi/ns_logroll.html

tom jackson

On Tuesday 06 May 2008 12:12, Titi Alailima wrote:
> Anyone know how to signal nsd in Windows to roll the logs? Any equivalent

> of "kill -HUP"?

Titi Alailima

unread,
May 6, 2008, 5:18:21 PM5/6/08
to AOLS...@listserv.aol.com
Not quite. I get a permission error renaming the old file. I'm running as a service from the "local System" account. Any ideas why it can't rename the file even though it can create, remove and write to files?

Regardless, I was wondering if there was a way from the OS to send the NS_SIGHUP signal. Doesn't look like it if I read the source correctly.

Titi Ala'ilima
Lead Architect
MedTouch LLC
1100 Massachusetts Avenue
Cambridge, MA 02138
617.621.8670 x309

Titi Alailima

unread,
May 6, 2008, 10:23:43 PM5/6/08
to AOLS...@listserv.aol.com
I think the renaming fails because Windows is picky about not messing with files that are open. Can we close the log file before rolling? Seems like nslog does this for the access log. Just needs to be done similarly in nsd/log.c. That might require copying a bunch of stuff over from nslog.c or putting the common code somewhere else. There's certainly seems to be a lot of redundancy between the two sets of code, a great candidate for streamlining.

Tom Jackson

unread,
May 6, 2008, 10:53:50 PM5/6/08
to AOLS...@listserv.aol.com
On Tuesday 06 May 2008 19:23, Titi Alailima wrote:
> I think the renaming fails because Windows is picky about not messing with
> files that are open. Can we close the log file before rolling? Seems like
> nslog does this for the access log. Just needs to be done similarly in
> nsd/log.c. That might require copying a bunch of stuff over from nslog.c
> or putting the common code somewhere else. There's certainly seems to be a
> lot of redundancy between the two sets of code, a great candidate for
> streamlining.

My guess is that it would be better to keep the two chunks of code distinct. I
seem to remember that they are not that similar anyway. (For one, a single
nsd can have multiple access.log files, but only one server.log file.)

tom jackson

Reply all
Reply to author
Forward
0 new messages