CentOSThis forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi, so, I have CentOS 6.something, it's old (I can find the exact number if you want but for this question I doubt it matters). I've had it for 8 years.
Every night at 4am it does it's maintence or whatever, and the drive starts crunching. I rarely every use it (it's a lan server I use for development).
So, can I set it to only run that like once a week? I know how to edit crons, but which cron is it?
Hard drive's been acting up lately, so maybe on the way to death soon, so I'll back up, obviously, but anyway, I'd rather not stress it.
It'a a bit hard to say without knowing which job in particular is causing the activity. I don't know of any default job that gets run at 4 AM. The default settings have the jobs in /etc/cron.daily started by anacron at a random time between 0305 and 0350. Most of those files could simply be moved to /etc/cron.weekly, though I'd suggest leaving the "0logwatch" and "logrotate" jobs where they are. Several of those jobs have the potential to cause a lot of activity, but normally don't unless the system has seen a lot of updates since the last run.
Of course any of the jobs in /var/spool/cron could be doing something at 4 AM, but since none of those are part of a standard installation, only you would know what is in there. Other possibilities include /etc/crontab and the files in /etc/cron.d, but again, a standard installation doesn't have anything in there that runs at 4 AM or, for that matter, that causes heavy activity.
As root, then as user, run crontab -l to list any cron jobs. If you find one, run crontab -e and remark them out with a #.
Looks like its only for the current user.
Look in your /var/log/auth.log for something like these lines
Code:
Jan 9 18:39:01 localhost CRON[24263]: pam_unix(cron:session): session opened for user root by (uid=0)
Jan 9 18:39:01 localhost CRON[24263]: pam_unix(cron:session): session closed for user root
Look for something about 4am and make note of the user (bolded)
Then login to that user and run crontab -l and see which ones might be at 4am.
Fixed it- When I read what rknichols said about it not being something in the standard distro, I dug in and found that it was rsnapshot running the daily iteration. A forehead-smacking moment for me.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.