Cron Eating All CPU Cycles

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Cron Eating All CPU Cycles

Postby exrapidshare » Wed Apr 18, 2012 4:47 am

My current Installation running Fine with (10 Agents , recording (All force) , But After 5-7 Hour Cron Starting in Process & taking 95-99% of CPU ,Due to that facing Voice issue until i reboot the server. plz help Me ASAP.
Thanks In Advance.
see this screen shoot .
Image

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
GoAutoDial CE 2.1 | VICIDIAL: 2.4-309a | BUILD: 110430-1642 | Asterisk 1.4.39.1 | Single Server | No Digium/Sangoma Hardware | No Extra Software After Installation |
Kernel Version 2.6.18-238.9.1.el5.goPAE (SMP) | Single Quard Core CPU Model Intel(R) Xeon(R) CPU X3330 @ 2.66GHz | 4 Gig of ram.
exrapidshare
 
Posts: 16
Joined: Tue Jul 19, 2011 11:09 am

Re: Cron Eating All CPU Cycles

Postby williamconley » Wed Apr 18, 2012 8:58 pm

Thanks for posting your specs!

Suggestions:

Use "htop" instead of "top". Then press "t" which will show you a "tree" view which will help you understand what process is running to cause this process (possibly ...) and the parent(s) of the process. For instance: if the ./find process is being run by a specific cron job, it may appear here.

Use "crontab -e" to find the processes that are running during your work hours and move them to NONwork hours if they are necessary.

Use "iftop" to find unauthorized access to your system if you believe someone is hacking you (although they do not ordinarily activate a cron "find" process upon hacking the system so that is highly unlikely).
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Cron Eating All CPU Cycles

Postby exrapidshare » Thu Apr 19, 2012 4:26 am

Thanks for your Suggestion :

I posted the above screen shoot from top -c , i think it is similar to htop .
---------------------------------------------------------------------------------------------------------
I found this entry in crontab:

### remove old vicidial logs and asterisk logs more than 2 days old
28 0 * * * /usr/bin/find /var/log/astguiclient -maxdepth 1 -type f -mtime +2 -print | xargs rm -f
29 0 * * * /usr/bin/find /var/log/asterisk -maxdepth 3 -type f -mtime +2 -print | xargs rm -f
30 0 * * * /usr/bin/find / -maxdepth 1 -name "screenlog.0*" -mtime +4 -print | xargs rm -f
--------------------------------------------------------------------------------------------------------------
If they are responsible how to fix it ?
exrapidshare
 
Posts: 16
Joined: Tue Jul 19, 2011 11:09 am

Re: Cron Eating All CPU Cycles

Postby fibres » Thu Apr 19, 2012 5:36 pm

Hi

Just out of interest what time zone is your system clock set to? Is it set to your local time?

Those three entries are set to run aqt 00:28 00:29 and 00:30 so 28, 29 and 30 mins past midnight.

If your timezone is set wrong it is possible that these are running in the middle of you using the system.

If you run the #date command from the linux command line on your server it will tell you what time the local system time is set to.7

Regards
Vicibox 4.0.3 ISO install.
VERSION: 2.6-393a
BUILD: 130124-1721
Astersik 1.4.44-vici
No Hardware
No other software installed
fibres
 
Posts: 313
Joined: Sun May 20, 2007 3:12 pm
Location: UK

Re: Cron Eating All CPU Cycles

Postby exrapidshare » Fri Apr 20, 2012 4:22 am

Hi

My time zone is set to +5:30 IST and according to local time it is right .

what are the correct values in crontab for me ?

thanks in advance :)
exrapidshare
 
Posts: 16
Joined: Tue Jul 19, 2011 11:09 am

Re: Cron Eating All CPU Cycles

Postby IslandCabby » Mon Apr 23, 2012 12:41 am

exprapidshare,

If your server time zone is set to your local time (run "date" from your command line to make sure) then your cron settings for those tasks are fine, you'd be looking for the cron process that runs while you're having the issue and then move that process to a different time (cron settings are : minute hour date month dayoftheweek i.e your process "29 0 *** /usr/bin/find /var/log/asterisk -maxdepth 3 -type f -mtime +2 -print | xargs rm -f" is set to run at the 29th minute "29" after the midnight hour "0" everydate "*" of every month "*" of every day of the week "*". Try williamconley's suggestion to use htop in tree view to determine what's running when the cpu actually spikes.
IslandCabby
 
Posts: 11
Joined: Wed Apr 18, 2012 6:57 pm


Return to Support

Who is online

Users browsing this forum: No registered users and 133 guests