stopping running scripts / services in Red Hat

Hello,

I have few scripts running (collecting info and pushing to outside server). What were the commands to find what services/srcipts are running and what was the command to stop a pirticular service?

Thanks
poposkiAsked:
Who is Participating?
 
matrix8086Commented:
"ps aux" will show all processes from all users
0
 
savoneCommented:
Are the scripts services or just scripts?  

ps will show the running processes.
0
 
savoneCommented:
If it is a service you can stop it with systemctl or service depending on what version of RHEL you are using.

up to RHEL 6:

service <servicename> stop

RHEL 7:

systemctl stop servicename.service
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
arnoldCommented:
Another source is cron I.e. Scripts running on a schedule

crontab -l

Please be clearer on what is at issue.
0
 
Gerwin Jansen, EE MVETopic Advisor Commented:
Once you know which processes/scripts are running (process id's) - you can stop/kill them using:

kill <process id>

You can add multiple id's on the command line, separated by a space. The above command is a 'normal' kill. If you cannot stop/kill them using the aboove command, then you can try adding a -9 right after the kill command. This will force killing the process and should be used as a last resort.
0
 
poposkiAuthor Commented:
How do I find the ID of the script running? What is the command? It's fludding my UDP table.. Can anything alsewehere be causing the this UDP fludding? Maybe a bad disk? I ran check disk and is not showing anything.

I am also running 2 VM instances. 1 is Ubuntu and the other is a VBox. Do you think anything within that you can think of why my UDP table is fludding?  

I had a script implemented (security breach) but was stopped. Now this fludding is on and off.. usually happens at night, not during the day. Mostly on weekends. That's why it's wierd to me. Any ideas you can think of?

This UDP fludding is only on our application server and is stopping our internet in our office.

Thanks
0
 
savoneCommented:
You should not kill a service unless is is doing some harm.  It is always better to stop the service gracefully.

If you give an example of what kind of service you are trying to stop, or is it a script?

The ps aux command mentioned above will show you the processes running on your system.
0
 
Gerwin Jansen, EE MVETopic Advisor Commented:
ps aux | grep -i <script_name>

Then look for the output in the 2nd column (the PID column). The number you see there is the PID of your script.
0
 
poposkiAuthor Commented:
Thanks guys. I found a 'spyboot' that's flooding my UDP tables. You guys helped me a lot. Now I need to find the process that's doing this. But another quest to raise that's some one may help me. But I need to eliminate the ones I know and the ones that I never heard that could be the 3rd party process..

Thanks again.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.