Simple OpenVPN Server Statistics

Ever wondered what the status of your OpenVPN server is, or wanted some simple stats ?

Here is a really simple script to give you some info. The output looks like this:

greg@leonis:~$ vpnstatus
Common Name   Virtual Address    Real Address          Sent      Received             Connected Since
greg.vpn      10.8.142.6         196.9.23.59        1.11 MB     282.50 KB    Thu Jul 16 09:07:15 2009

Firstly, ensure your server is actually saving the stats somewhere (/etc/openvpn/openvpn.status in my example):

greg@leonis:~$ grep status /etc/openvpn/server.conf
status openvpn.status

Once that is happening, drop this code into a file and make it executable.

Gregory Armer avatar
About Gregory Armer
Sometimes I just want to give it all up and become a handsome billionaire.
comments powered by Disqus