Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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 this scheduled task that runs under a certain userid, username's id is 509. Cool. I figured that if i want to stop that task from running on a regular schedule, i should just type crontab -r under that username and the thing would go away. I've been proven wrong. The task keeps running. So, HOW CAN I STOP IT!?
FYI, when i execute crontab -e under that specific username, i get an 'write error to swap' error. Of course, this tells me nothing. On the other hand, when doing this for root, i don't get this error. And also, if you guys now how to get rid of all the history that ps aux displays, that's great, so i can monitor a little bit better if the process is still running.
There's my problem. Please please help me out. I got another problem to solve and perhaps getting this task out of there will stop named from crashing.
if you guys now how to get rid of all the history that ps aux displays, that's be great, so i can monitor a little bit better if the process is still running.
If I understand that correctly...
Code:
ps aux | grep "PROCESS_NAME"
As for the bigger problem, what you are saying sounds like you are wanting to not only stop the scheduled task from running in the future, but shut down the currently running instance of the task as well, am I correct?
If so, then "crontab -r" will remove the scheduling, but if the process is running, you'll need to execute a "killall PROCESS_NAME" to kill the current instance.
As someone else said, removing the cron schedule does not kill any running task that was previously scheduled. Use 'kill', or 'pkill', or 'killall' to get rid of the running task.
Quote:
FYI, when i execute crontab -e under that specific username, i get an 'write error to swap' error. Of course, this tells me nothing.
It tells me you're probably out of disk space.
Quote:
On the other hand, when doing this for root, i don't get this error.
Probably because when you create a filesystem, you can reserve a little extra space that is available to root only. So normal users are out of space, but root is using that extra 5% reserve that is typically set aside. Run "df -h" and see if any of your filesystems are full.
Quote:
And also, if you guys now how to get rid of all the history that ps aux displays, that's be great, so i can monitor a little bit better if the process is still running.
Do you mean get rid of all the other processes that are listed ? (it's not a "history", just other processes)
As was said earlier, you can run "ps -ef | grep <process_name>"
(or "ps aux | grep <process_name>" if you prefer that format)
Alternately, "ps -fp `pgrep <process_name>`" will do the same thing, but leave the column headings displayed (the grep method would have wiped them out).
YOU GUYS ARE GENIOUSES!!! This information has helped me a whole lot. Now, i managed to stop that thing from running, at least that's what i can tell so far. Not sure though. The thing that is hanging up on me now is the disk space thing. This is probably the cause of linux stalling sometimes, and of course, having named stop resolving. And now that you have brought up the subject, how do we clean up some disk space in linux? Of course, silly question, in a sense. But then, i always check log files, like /var/log/messages, and the you've got new mail in /var/spool or something when performing something with root. The real question would be: how can i clear unnecessary info from linux, info that is not put there by me or other users?
I hope you understand what i am asking, and if not, i'll post another thread asking how to do this.
I've been struggling with this server for quite a while now, and i can't go on researching, i got to fix it ASAP.
BTW, i cannot thank you guys enough, keep being smart, you rock!!!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.