I have an OpenVPN server and I want it to log each users bandwidth. I'm looking to log the
bytes_received. This is stored in the OpenVPN
status file, but I can't easily read that file since it's always changing.
I could use a
client-disconnect script, but how would I pass the bandwidth used to it? I'd rather not use this as the bandwidth will only be updated when a client disconnects. What if he just never does so? Right, then he can use as much bandwidth as he likes.
So, how can I log the bandwidth used per client?