I want to monitor which user was connected for how long and how much traffic has been used in this time. For this I created a connect script which creates an entry in a database that the user connected and a disconnect script which updates the entry with the disconnect time and traffic volume. The scripts are working totally fine but sadly the disconnect script is sometimes not executed. I have been debugging this for quite some time and I think I found the problem for the disconnect script not beeing executed.
Here is a scenario:
The user connected, the connect script has been called and an entry in the database was created. But then the user seems to get a ping timeout. This is the log from the serverside:
Code: Select all
Thu Jun 9 01:09:42 2016 us=4118 username/*.*.*.*:12946 [username] Inactivity timeout (--ping-restart), restarting Thu Jun 9 01:09:42 2016 us=4217 username/*.*.*.*:12946 SIGUSR1[soft,ping-restart] received, client-instance restarting
Does anybody have an idea how to solve this problem? Or is there a "better" way to monitor which user was connected for how long and to see how much traffic has been used by him?
Thanks for your help.