LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-25-2012, 10:06 AM   #1
gabriot
LQ Newbie
 
Registered: Jun 2012
Posts: 12

Rep: Reputation: Disabled
What are the risks involved in restarting crond?


Basically I'm seeing that crond has some very long running processes that are taking up CPU on a total of 4 servers. I restarted crond on the server that had what looked to be the least important "stuff" in the crontab, and it completely fixed the CPU issue. However, before I restart crond on the other servers, I just want to make sure that I am not potentially borking the system by doing so... I assume whatever operations that crond are set to perform in the crontab will resume when I restart it correct?
 
Old 06-25-2012, 10:26 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
crond is a scheduler. If you stop it and it isn't currently in the middle of a process it hurts nothing. When you restart it then it runs things as scheduled as it doesn't care which invocation you did.

Note however that "at" jobs (vs. "cron" jobs) are submitted on the fly but controlled by crond - if you have any "at" jobs you might need to verity they're still there after the restart with "at -l" and if not resubmit them.
 
Old 06-25-2012, 10:33 AM   #3
gabriot
LQ Newbie
 
Registered: Jun 2012
Posts: 12

Original Poster
Rep: Reputation: Disabled
Thanks for the quick response!

So apologies for my noob-ness, but if I run "at -l" and it says command not found, is it safe to assume i don't have any "at" jobs?
 
Old 06-25-2012, 10:49 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by MensaWater View Post
at" jobs (vs. "cron" jobs) are submitted on the fly but controlled by crond
At jobs are run and controlled by the at daemon.


Quote:
Originally Posted by gabriot View Post
is it safe to assume i don't have any "at" jobs?
Don't assume but run 'atq' to see if you have any at jobs or look in /var/spool/at.
 
Old 06-25-2012, 10:55 AM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
*BTW the problem with your previous thread (http://www.linuxquestions.org/questi...ly-4175412544/) is that the cause for resource hogging was never identified. In this thread you speak about "very long running processes" but without being specific. In some cases you might be able to assign a task to a specific CPU, nice the job or ionice it but it depends. Some jobs just require much resources.
 
Old 06-25-2012, 11:30 AM   #6
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Quote:
Originally Posted by unSpawn View Post
At jobs are run and controlled by the at daemon.
Not on all *NIX systems.
 
Old 06-25-2012, 05:56 PM   #7
gabriot
LQ Newbie
 
Registered: Jun 2012
Posts: 12

Original Poster
Rep: Reputation: Disabled
Thanks for the information everyone! I had to "do it live" bill o'reilly style and went ahead and restarted crond, and it looks to be ok. It resolved the CPU on all the servers except one, I'm going to have to start a separate thread since it looks to be a different issue that is also over my head.
 
Old 06-25-2012, 06:55 PM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by MensaWater View Post
Not on all *NIX systems.
It would be interested to know which Linux distributions (not other Operating Systems, after all this question was asked in the Linux Newbie forum) still use a cron job atrun entry (which basically runs atd anyway) and not for backward compatibility reasons?
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
TorK weaknesses and risks pgonzamailcn Linux - Software 3 12-23-2009 10:17 PM
Security risks using talk Bendude Linux - Security 20 07-29-2008 05:55 AM
/sbin/service crond unable to start - gives permission error on /usr/sbin/crond mgervacio Linux - Newbie 6 07-16-2008 01:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration