To Check Which Service is Running at Present in System what
is the Command?

Answer Posted / shanu

# service --status-all | grep -i "running"
crond (pid  3974) is running...
cupsd (pid  3895) is running...
gpm (pid  3965) is running...
hald (pid 3767) is running...
hidd (pid 3815) is running...
hpiod (pid 3864) is running...
hpssd (pid 3869) is running...

or else

to check if what services are set to run(or on) by default(at system boot)

use the below.
1.check the current run level using
# runlevel
N 5
2.check the list of services set to run at boot time
using
# chkconfig --list > /tmp/service.log

//the output will look like this
yum-updatesd    0:off   1:off   2:on    3:on    4:on    5:on    6:off

3.check the same using awk command according to your current run level
awk  '{if ($5 == "3:on") print $1}' /tmp/service.log

Thanks :)

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is grep command?

596


Explain about gzip filename?

645


What does grep command do?

667


What does umask 077 mean?

641


What is clang space engineers?

637






What is the difference between clang and llvm?

653


Explain the free command.

657


How many types of commands are there in linux?

629


How many interfaces(ethernet cards) are working using single command?

606


What does pwd mean in linux?

649


You wish to print the file vacations with 60 lines to a page. Which of the following commands will accomplish this?

590


What is mkdir m in linux?

618


How do I overclock my cpu?

591


Explain about system and user utilities?

637


Who unix commands?

686