How to check a particular service is running on Linux?


 
Thread Tools Search this Thread
Operating Systems Linux How to check a particular service is running on Linux?
# 1  
Old 10-17-2013
How to check a particular service is running on Linux?

We are using TeamSite application. Its a content management system application.
How can I check if TeamSite service is running or not using ksh onn Linux platform ? On Windows its easy, I can do services.msc and entire list will come up. How to check it in Linux ?
I tried using 'ps -ef', it gives me a long list. I can not find the services that I am looking for. Some of the lines are too long and out of screen width. I can not see, whats there in the line because there is no scroll bar on cmd window. How can I search on ksh command window ? I am using ctrl+f and it types on cmd line.

Thanks
# 2  
Old 10-17-2013
If it's configured as a service:
Code:
service <servicename> status

It might vary by OS, so please say which Linux distribution you are using.
# 3  
Old 10-17-2013
Try
Code:
ps -ef | grep team

What that command does is pipe the output of ps -ef and look for the word team in all the lines returned by that command (you may want to think of it as a filter).

EDIT: Or, as Scott wisely pointed out, if you happen to know the exact name of the service TeamSite is running under, do what he says Smilie.
# 4  
Old 10-17-2013
Run ps -ef|less which will enable you to scroll horizontically and vertically.
There might be a status request command, depending on your init control system, e.g. initctl status (job) or initctl list.
# 5  
Old 10-17-2013
Pretty much depends on your system, ps beeing system-'independant'.
Of course, ps -e |grep -i teamviewer could work as well, if the service is named teamviewer...

Scott's example (servce status name.service) is for initD systems.
This one's for SysV (eg: Fedora uses that): systemctl status NAME.service
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Checking to see if windows service is running

Hi I have created a PowerShell script which successfully checks whether windows service pgsql-9.2 is running. I have tried to call that PowerShell script with a shell/bash script within a LINUX machine but have been unsuccessful. Is there a way of a shell/Perl script to check whether a... (5 Replies)
Discussion started by: simpsa27
5 Replies

2. Solaris

Error when running starting server service

Hi I have installed using tar a program called rabbitmq, and when I try to start it according to documentation, I get the following error: /usr/local/sbin/rabbitmq_server-3.6.14/sbin# ./rabbitmq-server ./rabbitmq-server: .: local: not found ... (7 Replies)
Discussion started by: fretagi
7 Replies

3. Solaris

Checking if service is running

Hi, For audit reasons, I need to stop the web server service in some Solaris servers. The port that is listening for this service is port 10000. This is the output that shows the port 10000 is open in the server : # netstat -an | grep 10000 10.70.21.144.10000 10.70.21.133.58130 49640... (6 Replies)
Discussion started by: anaigini45
6 Replies

4. Red Hat

How a service is always running ?

Hi How ssh service at all levels always running in her file /etc/inittab? vi /etc/inittab 10::respawn:/etc/init.d/sshd I added this line & save run init q But it did not (6 Replies)
Discussion started by: mnnn
6 Replies

5. Red Hat

Service restart and check if running

Hello, I'l like to create a script that restart a service (/etc/init.d/httpd restart) and also check if after restart the service is actually running. Sometimes it happen that at the first try the service fails to restart. Thanks (2 Replies)
Discussion started by: bazzola
2 Replies

6. UNIX for Advanced & Expert Users

How to check number of threads running per processor in Linux machine?

I have a machine which has 32 processor but i am really not sure how many threads are running. It has hyperthreading enabled. Is there a way i can find that all 32 processors are being used and how many threads are there in my linux box. Its a 64 bit processor. I am having very high load average... (3 Replies)
Discussion started by: Moon1234
3 Replies

7. UNIX for Dummies Questions & Answers

check service is running at boot

dears am having solaris 10, and i would like to know if the NTP service is running when the OS staritng?on the other hand how can i make it start at the boot up?note the ntp is managed by the SMF in solaris 10. thanks a lot (2 Replies)
Discussion started by: thehero
2 Replies

8. HP-UX

Found service running during audit

Hello all! During a network audit, I came across a host running a service on a high port (34604). Not recognizing the port, I used a tool called 'amap' (THC-AMAP - fast and reliable application fingerprint mapper) to fingerprint it. This tool also did not fingerprint it correctly, but did... (2 Replies)
Discussion started by: dan.king
2 Replies

9. Solaris

How to be sure the dns service is running ?

Well, i changed my lan card and finally i got it up and running, i have /etc/resolv.conf with domain xxx.xxx nameserver xxx.xxx.xxx.xxx and it was working with me earlier with the old lan card, with the new one i added it ip using auto-dhcp and its received an ip from my dhcp and it can ping... (4 Replies)
Discussion started by: XP_2600
4 Replies

10. UNIX for Dummies Questions & Answers

How to check both the processores running or not in redhat linux

Hi, We have dual processor dell machine loaded with redhat linux 7.2. It was working fine without any problem but recently power went off so suddenly system switched off. From then onwards system is running very slow. My suspect is on processor. How to check both the processors running properly or... (8 Replies)
Discussion started by: bache_gowda
8 Replies
Login or Register to Ask a Question