Forums

Username:

Password:

User accounts

Register new account
Forgot password

Forum stats

List of members

Search the forums


Advanced search

Recent discussions

- Archive 27:3 has landed (News:)
- WROCC December 2024 talk o...- Andrew Rawnsley (R-Comp) (News:)
- RISC OS 'Advent' Calendar 2024 - David Pitt (News:)
- Elsear brings super-fast Networking to Risc PC/A7000/A7000+ (News:)
- November 2024 News Summary (News:1)
- Latest hardware upgrade from RISCOSbits (News:)
- WROCC November 2024 talk o...ay - Andrew Rawnsley (ROD) (News:3)
- Accessing old floppy disks (Gen:3)
- November developer 'fireside' chat on saturday night (News:)
- RISCOSbits releases a new laptop solution (News:4)

Latest postings RSS Feeds

RSS 2.0 | 1.0 | 0.9
Atom 0.3
Misc RDF | CDF
 
View on Mastodon
@www.iconbar.com@rss-parrot.net

Site Search

 
Article archives
The Icon Bar: Site Comments: Check stats and logs
 
  Check stats and logs
  rich (11:10 2/7/2006)
 
Richard Goodwin Message #77262, posted by rich at 11:10, 2/7/2006
Rich
Dictator for life
Posts: 6828
Woo to folks with web sites hosted here,

One of the things that bugged me about the server was that, when it rotated the logs, it basically made the web server unavailable for about half an hour. Now true, this is about 4:30am on a Sunday morning, but hardly optimal, and a bit scary when you see "Server down!" emails for the fist time.

The problem was that this is the default web log rotation as set up when I installed the server:
/virtual/www.acornarcade.com/weblogs/access_log /virtual/www.acornarcade.com/weblogs/error_log {
missingok
weekly
prerotate
ADVXctl closelogs
endscript
postrotate
ADVXctl closelogs
endscript
}
...which I just copied for each of the virtual hosts (of which there are now many). ADVXctl seems to be the same as apachectl, and closelogs restarted apache.

I took a look at the man pages, and came up with this:

/virtual/www.*/weblogs/*_log {
missingok
weekly
rotate 5
copytruncate
delaycompress
sharedscripts
prerotate
date
endscript
postrotate
apachectl graceful
date
endscript
}

...which should do all the websites in one go, and only restart the server once.

The "date" commands were to give me a new timing for how long the process takes. This appears to have reduced it from about half an hour to... 21 seconds. Now true, this week it didn't do any compression (there are now four compressed logs, and one - the latest backup - is uncompressed), but that seems like a scarily large difference.

So, now would be the time to let me know if you see any problems with you stats, or bizarre log problems.
________
RichGCheers,
Rich.
  ^[ Log in to reply ]
 

The Icon Bar: Site Comments: Check stats and logs

© Copyright One Point Nought 2000 - 2024.About | Staff | Contact us | Privacy policy