How do I know whether a service is online?

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat How do I know whether a service is online?
# 1  
Old 10-21-2012
Question How do I know whether a service is online?

Hi!

I'm a Solaris admin. I don't know how to check whether a service is online or not in Linux.

example:i've started a service using
Code:
#service named start
#service http start

How can i verify that these services are in running mode?

Last edited by Scott; 10-21-2012 at 11:56 AM.. Reason: Cleanup
# 2  
Old 10-21-2012
Code:
service httpd status

Check also the manual page for chkconfig.
# 3  
Old 04-19-2013
You can check by following command:

service httpd status

or you can check it by

Code:
chkconfig -list | grep apache2
apache2                   0:off  1:off  2:on   3:on   4:on   5:on   6:off


It will show the service started at boot time or not. 0-6 are runlevels which says it is on at boottime if you login by that run level.

Moderator's Comments:
Mod Comment Do not spam the board with links to your blog.


---------- Post updated at 12:52 PM ---------- Previous update was at 12:50 PM ----------

in above reply, Smileys are reflecting due to : and o letter ...

Moderator's Comments:
Mod Comment Use code tags and there will be no problems with smilies - Follow forum rules.
# 4  
Old 04-19-2013
Hi
Besides

Code:
service NAME status

you can use netstat
Code:
netstat -tulnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name
tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN      2402/mysqld
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      1187/sshd

mysql and ssh is running
# 5  
Old 04-22-2013
Server services online

There are various methods to confirm this.. My usual way is to check first whether the service is active on the corresponding port with help of telnet.

In the case of web service

HTML Code:
#telnet localhost 80
Or we can use

HTML Code:
#service httpd status
HTML Code:
#pidof httpd
HTML Code:
#ps -e | grep httpd
Always confirm from the Client end also if the service is a critical one.
# 6  
Old 04-23-2013
# ps -aux | grep httpd

Or

#service httpd status
Login or Register to Ask a Question

Previous Thread | Next Thread

4 More Discussions You Might Find Interesting

1. Solaris

Unable to bring iscsitgt service to online

this is samiulla in my vmware solaris 11 i installed iscsitgt pakage but it goes to maintenance and i am unable to bring into online with svcadm clear iscsitgt how can i forcefully online iscsitgt service. (1 Reply)
Discussion started by: samiulla
1 Replies

2. Solaris

DNS service is in maintenance mode. How to bring it back to online mode?

:confused: when i tried to look the status of DNS-client, it is in maintenance mode..... Please tell me how to bring it back to online mode...PLEASE TELL ME STEP BY STEP.... PLEASE... :wall: (2 Replies)
Discussion started by: vamshigvk475
2 Replies

3. UNIX for Advanced & Expert Users

Solaris: Fault Management Service toggles online, offline

I have two Solaris 10 T2000 systems. Platform sun8 has newer firmware than sun7. sun8/user$ prtdiag -v | grep OBP OBP 4.30.4.b 2010/07/09 13:48 sun7/user$ prtdiag -v | grep OBP OBP 4.30.4.a 2010/01/06 14:56 The platform (sun8) with the newer firmware (OBP 4.30.4.b) has a Fault... (2 Replies)
Discussion started by: DavidHalko
2 Replies

4. Solaris

All dependicies of nfs service is online but nfs is offline

Hi all in my server all nfs dependices are online but nfs client is offline root@BIWAPP1 # svcs -a|grep nfs disabled Sep_05 svc:/network/nfs/server:default online Sep_05 svc:/network/nfs/rquota:default online Sep_05 svc:/network/nfs/mapid:default online ... (9 Replies)
Discussion started by: spandhan
9 Replies
Login or Register to Ask a Question