Mittwoch, 21. Januar 2009

Check apache server in Ubuntu


Example using dpkg command to check apache in Ubuntu:

root@mekubui:/var/www# sudo dpkg -l | grep apache
ii apache2 2.2.9-7ubuntu3 Apache HTTP Server metapackage
ii apache2-mpm-prefork 2.2.9-7ubuntu3 Apache HTTP Server - traditional non-threade
ii apache2-utils 2.2.9-7ubuntu3 utility programs for webservers
ii apache2.2-common 2.2.9-7ubuntu3 Apache HTTP Server common files
ii libapache2-mod-php5 5.2.6-2ubuntu4 server-side, HTML-embedded scripting languag
root@mekubui:/var/www#

Example using ps command to check apache service in Ubuntu:

root@mekubui:/var/www# ps aux | grep apache2
root 4530 0.0 1.0 32816 7756 ? Ss 15:16 0:00 /usr/sbin/apache2 -k start
www-data 5352 0.0 1.1 34924 9164 ? S 15:28 0:00 /usr/sbin/apache2 -k start
www-data 5353 0.0 1.1 34848 8588 ? S 15:28 0:00 /usr/sbin/apache2 -k start
www-data 5354 0.0 1.0 33776 8020 ? S 15:28 0:01 /usr/sbin/apache2 -k start
www-data 5355 0.0 1.1 34644 8896 ? S 15:28 0:00 /usr/sbin/apache2 -k start
www-data 5356 0.0 0.8 33312 6356 ? S 15:28 0:00 /usr/sbin/apache2 -k start
www-data 5359 0.0 0.5 32952 4404 ? S 15:28 0:00 /usr/sbin/apache2 -k start
www-data 5361 0.0 1.1 34912 9132 ? S 15:28 0:00 /usr/sbin/apache2 -k start
www-data 5362 0.0 1.0 34148 8364 ? S 15:29 0:00 /usr/sbin/apache2 -k start
www-data 5363 0.2 1.1 34116 8624 ? S 15:29 0:03 /usr/sbin/apache2 -k start
www-data 5364 0.1 1.2 35072 9488 ? S 15:29 0:02 /usr/sbin/apache2 -k start
root 5688 0.0 0.1 3240 816 pts/2 S+ 15:50 0:00 grep apache2
root@mekubui:/var/www#