To find the status of any single service

To find the status of any single service
# service vsftpd status
vsftpd (pid 5909) is running…

To get the status of all the running services
# service –status-all | grep running

 

acpid (pid 5310) is running…
atd (pid 6528) is running…
auditd (pid 5012) is running…
Avahi daemon is not running
Avahi DNS daemon is not running
The Pegasus CIM Listener is running.
The Pegasus CIM Object Manager is running.
crond (pid 6242) is running…
dcerpcd (pid 5177) is running…
eventlogd (pid 5223) is running…

In case you don’t use grep you will be able to see all the services on your machine
# service –status-all
NetworkManager is stopped
acpid (pid 5310) is running…
anacron is stopped
atd (pid 6528) is running…
auditd (pid 5012) is running…
automount is stopped
Avahi daemon is not running
Avahi DNS daemon is not running
hcid is stopped
sdpd is stopped

You can also check the active ports along with their services using
# netstat -ntlp
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:52961 0.0.0.0:* LISTEN 5223/eventlogd
tcp 0 0 0.0.0.0:5988 0.0.0.0:* LISTEN 6116/cimserver
tcp 0 0 0.0.0.0:5989 0.0.0.0:* LISTEN 6116/cimserver
tcp 0 0 0.0.0.0:678 0.0.0.0:* LISTEN 5160/rpc.statd
tcp 0 0 0.0.0.0:14247 0.0.0.0:* LISTEN 6460/java
tcp 0 0 127.0.0.1:199 0.0.0.0:* LISTEN 5857/snmpd
tcp 0 0 0.0.0.0:135 0.0.0.0:* LISTEN 5177/dcerpcd

Related Articles
How to get a list of open ports in Linux?
What are the s and k scripts in the etc rcx.d directories
How to auto start service after reboot in Linux

Follow the below links for more tutorials:
What is the difference between DNS A record and CNAME record?
Tutorial for Monitoring Tools SAR and KSAR with examples in Linux
How to configure Samba 4 Secondary Domain Controller
RHEL: Kernel will not boot, system freeze at ‘starting udev’
How to secure Apache web server in Linux using password (.htaccess)
How to register Red Hat Linux with RHN (Red Hat Network )
Red hat Enterprise Linux 5.5 Installation Guide (Screenshots)
15 tips to enhance security of your Linux machine
Why is Linux more secure than windows and any other OS
What is the difference between “su” and “su -” in Linux?
What is swappiness and how do we change its value?
How to log iptables messages in different log file
What is virtual memory, paging and swap space?

Newer Post Older Post Home
0 comments:

Post a Comment

SUBSCRIBE FOR MAIL ALERTS

TOTAL PAGEVIEWS

Sparkline 242649
LIKE US ON FACEBOOK FOR ALL UPDATES

POPULAR POSTS

SAMBA 4.1 AS ACTIVE DIRECTORY CONFIGURATION GUIDE
CONFIGURE RED HAT CLUSTER USING VMWARE, QUORUM DISK, GFS2, OPENFILER
HOW TO CONFIGURE SAMBA 4 AS SECONDARY DOMAIN CONTROLLER
HOW TO CREATE USER WITHOUT USERADD COMMAND IN LINUX
CHANGING PASSWORD FOR ADMINISTRATOR IN SAMBA4
CREATE ROAMING PROFILES IN SAMBA4
HOW TO FIX “XLIB: NO PROTOCOL SPECIFIED”
HANGING UP ACTIVE CALLS IN ASTERISK PBX
SAMBA 4 AS ACTIVE DIRECTORY CONFIGURATION GUIDE
CONNECTING TWO IP PBX BOX USING SIP TRUNK