stopping running scripts / services in Red Hat


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?

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Are the scripts services or just scripts?  

ps will show the running processes.
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


systemctl stop servicename.service
Another source is cron I.e. Scripts running on a schedule

crontab -l

Please be clearer on what is at issue.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

"ps aux" will show all processes from all users

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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.
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.

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.
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.
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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.