ps -aux | grep httpd 25297 ? S 0:00 /usr/local/www/bin/ httpd -k start 15874 ? S 0:06 /usr/local/www/bin /httpd -k start 14441 ? S 0:02 /usr/local/www/bin /httpd -k start ... /usr/sbin/lsof | grep httpd |grep IPv httpd 14441 nobody 3u IPv4 136524 TCP www.example.com:http (LISTEN) httpd 25297 root 3u IPv4 136524 TCP www.example.com:http (LISTEN) httpd 30277 nobody 3u IPv4 136524 TCP www.example.com:http (LISTEN) ... netstat -ltnp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 192.168.1.151:80 0.0.0.0: * LISTEN 25297/httpd tcp 0 0 0.0.0.0:22 0.0.0.0: * LISTEN 1038/sshd Sometimes, you may not be able to connect to the server and are therefore unsure of whether the server is running or there is a network problem. In Unix systems, you can use a number of command-line tools to help you find out. The example shows some of them. The ps tool shows whether or not the httpd process is running on the system. The netstat and lsof tools show the port and address on which the Apache server is listening. In Windows systems, you can use the Windows task manager (invoked by pressing CtrlAltDel) to see whether the Apache.exe process is running. Alternatively, you can use the Apache monitor tray application included with recent distributions to check the status of Apache. |