Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
I have sar running on my server and it kills it sometimes with using too much memory. Ive deleted the cron job out of /etc/cron.d/sysstat and chmodded the /usr/lib64/sa dir 000. But i still get emails from crond saying it cant run the program. How do i get crond from wanting to look for sa or sar and trying to run it. Its not in any other crons, ive searched all crontab, cron.daily, cron.weekly, cron.monthly, etc...
There is nothing in /var/spool/cron. Here is an example of the emails i keep getting:
Thanks guys but neither one of those helped, the grep -iR 'sa' /etc scrolled 10 million things and nothing really pointed me in the right direction and the man page for sa1, sar and anything related i've already read.
There is nothing sa related in cron, that i can see. If you have any other suggestions please let me know.
No prob aus9, thanks for reposnding so quickly. Running that didnt point me in the right direction. Thanks for trying though. I may give up and just dev/null the emails. But it sure would be nice to know for furture reference what is causing them.
Thanks again aus9. Those didint help but looking again in the /var/log/cron file i see where it tries to run as part of /etc/cron.hourly but looking there i dont see any cron jobs at all. Maybe this info can help find a solution?
I do not run a server....can you stop crond and restart it? I am aware you do not like taking down the server....but on its next scheduled downtime...a full reboot might fix the issue if the restart fails?
What is the time stamp on the emails you're getting? That may provide another clue. Also, although you've checked /var/log/cron it may be worth running crontab -l (that's a lower case "L") as root to see if there is anything being run outside of /etc/cron.*. For example I have a box here with the following in root's crontab:
If you re-read my very first post, ive already deleted that cron job and said there is nothing in /var/log/cron. Thanks for trying though. Actually i found the solution. In ps accounting there is a script that calls sar to run. If you chmod that 000 it will stop crond from trying to run the program.
Aus9, thanks for your help. Restarting crond isnt really a big deal on a server, ive done it several times.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.