Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

We have a new corporate VPN server running Ipsec (Openswan) + xl2tpd + pppd. When a user connects, pppd runs the /etc/ppp/auth-up script which logs the time and username that has connected to /var/log/pppstats. However, on our older OpenVPN system we were able to finger the OpenVPN daemon to query the number of currently connected users and this is a metric which our management require to be reported via our Zabbix monitoring servers.

It would seem relying on the log file to analyze the number of connected users to be extremely unreliable since if a user shuts down their machine without terminating the connection then we have an eternally connected user. Any ideas on how this metric could be extracted reliably as possible?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

One option would be to check the output of netstat. Even something as simple as this should work (it would probably need updating for the exact service names:

netstat -ano | grep poptop | wc -l
share|improve this answer
    
Actually that helped me find the solution. netstat -i | grep "ppp" | wc -l gives me a count of connected users since pppd creates a new virutal interface for each connected user. Thanks! –  Michelle Feb 16 '11 at 15:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.