Checking Application Availability

Another hot issue is the availability of applications. You can perform certain tasks to see whether an application is offering its services; of these options, the good old ps aux (or ps -ef) commands (both do more or less the same) is the best way to start. Especially in combination with grep, they are pretty powerful. For example, ps aux | grep dhcp checks whether that DHCP server is really running. Sometimes, however, it is not that easy. For example, you might not know for sure what the exact name of the application is.

If you don't know the name of the application but you do know what port it is supposed to listen at, you can try netstat. As its name suggests, netstat displays statistics about network usage. If you use the netstat -patune command, you'll see a complete list of all open ports and sockets. In combination with grep, this is a useful command; use, for example, netstat -patune | grep 123 to see whether something is listening at port 123.

If your application is a service that should be started automatically when you boot your server but it doesn't seem to do that, the chkconfig command may prove useful. With chkconfig -l you'll get a complete overview of all the services that are started automatically when booting your server (see Figure 34-2 for a partial result of this command). If your service isn't listed there and if it does have a start-up script in /etc/init.d, you can add it with the insserv command. For example, insserv dhcpd would add your DHCP server to its default runlevels and make sure it is started automatically the next time you start your server.

File Edit View Te(mma1 Tads He Ip

splash

0

off

1

on

on

splash early

0

off

1

off

squid

0

off

1

off

2

off

sshd

0

off

1

off

2

off

svcgssd

0

off

1

off

2

off

syslog

0

off

1

off

sysstat

0

off

1

off

2

off

vmware-tools

0

off

1

off

on

winbind

0

off

1

off

2

off

xdm

0

off

1

off

2

off

xend

0

off

1

off

2

off

xendomains

0

off

1

off

2

off

xf s

0

off

1

off

2

off

xinetd

0

off

1

off

2

off

ypbind

0

off

1

off

2

off

zebra

0

off

1

off

2

off

xinetd based services:

3: off 3; off 3: off 3: off chargen: chargen-udp: cups-lpd: cvs:

daytime: daytime-udp: echo: echo-udp: f dm:

netstat: pure-ftpd: rsync: servers: services: swat: systat: time: time-udp: vnc:

off off off off off off off off off off off off off off off off off off off

4:

: off

6:

: off

4:

: off

5

6

: off

4:

: off

5:

: off

6:

: off

4:

: off

: oil

6

: off

4:

: off

5:

: off

6

: off

4:

: off

Lon

6

: off

4:

: off

5:

: off

6:

: off

4:

: off

ion

6

: off

4:

: off

5:

: off

6

: off

4:

: off

6

: off

4:

: off

6:

: off

4:

: off

6

: off

4:

: off

5:

: off

6:

: off

4:

: off

5:

: off

6

: off

4:

: off

5:

: off

6:

: off

4:

: off

5:

: off

6

: off

Figure 34-2. Partial result ofthe chkconfig -l command

Was this article helpful?

0 0

Post a comment