Whats Up Doc

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Austin Godber
Date:  
Subject: Whats Up Doc
George Gambill wrote:
> From the command line (RH8) how do I findout the status (is it installed, is
> it running) of such things as:


There is a command called service that runs the init script status
option (see later discussion). So if you want to see the status of your
httpd service:

> /sbin/service httpd status

httpd (pid 6742 6741 6740 6739 6738 6737 6736 6735 894) is running...

There is a --status-all option that gives you the status of all services
in /etc/init.d

> /sbin/service --status-all

...
Configured devices:
lo eth0 eth1
Currently active devices:
eth1 lo vmnet8
rpc.mountd is stopped
nfsd is stopped
rpc.rquotad is stopped
rpc.statd (pid 701) is running...
nscd is stopped
ntpd (pid 817) is running...
pcscd dead but subsys locked
...

Just look through here to get an idea of what is going on.

There is also a tool called chkconfig:

> chkconfig --list


will show you all of the services and whether they will start up in a
given runlevel. Just look for the service of interest. (man chkconfig
will give you more, e.g. --add --del) All of this info conforms to
links in /etc/rc#.d/ directories where # is the runlevel number (0-6).
The contents of these /etc/rc#.d/ directories are links to scripts in
/etc/init.d/ Most of these take the command line options of start,
stop, restart, status.
This chkconfig will change the default booting action of a service ...
for instance if it shows a service is off in a given runlevel you can
switch it to be on, so in the future when you switch to that runlevel
(i.e. booting again) it will now come up in the on state.

Austin