February 2007

Find Number of Running HTTPD Processes

by damonp on February 28, 2007

in SysAdmin

All HTTPD processes:

lsof -i :80 | wc -l

Only HTTPD processes currently connected to a remote client:

lsof -i :80 | grep ESTABLISHED | wc -l

Popularity: 1%

{ 0 comments }

I look at a lot of servers throughout the day. When taking a first look at a server it’s always helpful to know what versions of Apache, PHP and MySQL installed. I use Versions.sh to get the low down on one screen.

[root@servername root]# versions.sh
Linux <em>servername</em> 2.4.21-27.ELsmp #1 SMP Wed Dec 1 21:59:02 EST 2004 i686 i686 i386 GNU/Linux

Redhat Version:
Red Hat Enterprise Linux ES release 3 (Taroon Update 4)

Apache:
Server version: Apache/2.0.46
Server built:   Jul  8 2005 14:05:56
PHP 4.4.0 (cgi) (built: Jul 12 2005 02:09:00)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

MySQL:
mysql  Ver 11.18 Distrib 3.23.58, for redhat-linux-gnu (i386)

Security:
OpenSSH_3.6.1p2, SSH protocols 1.5/2.0, OpenSSL 0x0090701f
OpenSSL 0.9.7a Feb 19 2003

Download versions.sh

I usually check out ifconfig too for IP information. Any other information, just add at the bottom of the script.

Popularity: 1%

{ 2 comments }

PHP Error – Parse error: syntax error, unexpected $end in

23 February 2007

Parse error: syntax error, unexpected $end in … on line … Don’t you love it when the line number indicated for an error message is the last line in the file which obviously has no error? I spent twenty minutes on this one last night. Check for unmatched braces, brackets, parentheses or PHP tags. Nope. [...]

Read the full article →

Qmhandle Short Display Option

12 February 2007

Qmhandle is a Perl tool to aid in the management of the Qmail mailer daemon and queue. I sometimes use it to flush the queue, restart Qmail (or Apache, MySQL and several other major server daemons) with my mobile phone and MidpSSH. When clearing the queue, Qmhandle lists information for each message as it processes [...]

Read the full article →

Tango Pictures

7 February 2007

A couple of summers ago, I was lucky enough to travel through Venezuela and Argentina for a few months. I took a lot of interesting photographs of the landscape, wildlife and people. I was recently contacted by Miles, a fellow freelancer to use one of my photos for a project of his at TangoBliss.com. I [...]

Read the full article →