hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : Help with small sh/cron script
Reply

Forum Jump

Help with small sh/cron script

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 10-24-2001, 01:47 PM
ReliableServers ReliableServers is offline
Web Hosting Master
 
Join Date: Apr 2001
Posts: 1,044

Help with small sh/cron script


Hi everyone. I use webalizer for stats on my domains. I currently have each one listed in the cronjob. I tried to setup a sh script that would run one then run the next etc...putting each on its own line. What happends is some of them loop and dont exit to the next webalizer to be run. Any ideas?

Thanks



Sponsored Links
  #2  
Old 10-25-2001, 05:02 AM
jks jks is offline
Web Hosting Master
 
Join Date: Apr 2001
Location: Denmark, Europe
Posts: 614
Re: Help with small sh/cron script

Quote:
Originally posted by Dilhole
Hi everyone. I use webalizer for stats on my domains. I currently have each one listed in the cronjob. I tried to setup a sh script that would run one then run the next etc...putting each on its own line. What happends is some of them loop and dont exit to the next webalizer to be run. Any ideas?
Are you _absolutely_ sure that they loop? - I.e. they could just be taking long time to run to completion. Try letting it wait a few hours and see if it completes it.

The larger logfiles you have, the longer time it takes to run Webalizer.

Remember:

1. It's a very bad idea to use Webalizer in crontabs when using logrotation.

2. You probably have a list of sites somewhere - so it's a good idea to use that, instead of having to add a line for each site for webalizer. Somewhere along the road you're bound to forget to add a domain or two to that file.

__________________
Jens Kristian Søgaard, Mermaid Consulting ApS,
jens@mermaidconsulting.dk,
http://www.mermaidconsulting.com/

  #3  
Old 10-26-2001, 02:58 AM
ReliableServers ReliableServers is offline
Web Hosting Master
 
Join Date: Apr 2001
Posts: 1,044
I ran it in verbose so I could see everything, and it would go thru 5 domains and start at the top again. It never exited or continued on to the next 10 domains. And no I dont use a logrotator, I copy the logfiles to a temp file and then truncate the main logfile(so apache doesnt have to be restarted) process the temp file then its deleted. Any ideas?

Thanks

Sponsored Links
  #4  
Old 10-26-2001, 06:59 PM
Gunzour Gunzour is offline
Junior Guru Wannabe
 
Join Date: Aug 2001
Location: Maryland
Posts: 35
Can you post your shell script?

BTW, if you restart apache gracefully you don't drop any connections or have any down time, and you don't lose any log entries if you are restarting for log rotation. Something like this works:

mv access_log access_log_DATE
mv error_log error_log_DATE
/usr/local/apache/bin/apachectl graceful

When you rename the files with the mv, apache continues logging to that file even though the name has been changed (because it already has the logfile open). When you do a graceful restart, new log files are created and apache will start logging to the new log files instead of the renamed files.

The only problem with copying the log file then zeroing it out is that there is a brief period of time after you have copied the logfile and before you zero it out, and anything logged in that time would be lost.

Doug

Reply

Related posts from TheWhir.com
Title Type Date Posted
Web Hosting Sales and Promos Roundup - December 6, 2013 Web Hosting News 2013-12-06 15:09:54
Third Party Data Center Provider Budgets See Growth: Uptime Institute Survey Web Hosting News 2013-08-08 12:31:45
OpenStack and the AWS API Debate Web Hosting News 2013-07-30 14:21:54
Jelastic Launches Version 1.9.1 of Java and PHP Hosting Platform Web Hosting News 2013-05-21 09:39:09
Pingdom Talks Top Web Hosting Cities and Countries Web Hosting News 2013-03-27 18:49:54


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?