Operating System - Linux
1830935 Members
2272 Online
110017 Solutions
New Discussion

Re: how to monitor the vsftpd and apache servers

 
SOLVED
Go to solution
Maaz
Valued Contributor

how to monitor the vsftpd and apache servers

Dear Gurus
how can I check, that how many users are connected to vsftpd and apache server, and what they(users/client) did ? i.e. in short how can i monitor my servers ?

Thanks in advance
Regards
Maaz
3 REPLIES 3
Steven E. Protter
Exalted Contributor
Solution

Re: how to monitor the vsftpd and apache servers

service httpd status
rc=$?

if [ $rc -ne 0 ]
then
echo "httpd server is down"
service httpd start
fi

For users:

httpd_users=$(ps -ef | grep httpd | wc -l)
# This will get you a rough count of how many users are on, though you may need to manipulate the numbers based on how many spare processes you allocate to the apache server in httpd.conf


Same thing would probably work for ftpd

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Andrius
Advisor

Re: how to monitor the vsftpd and apache servers

Hi,

for more detailed info about what apache is doing - read about apache module called server-status in apache manual.
Stanimir
Trusted Contributor

Re: how to monitor the vsftpd and apache servers

Simply:

#ps -ef | grep httpd

#ps -ef | grep vsftp

Regards.