Part 4 - Mikrotik Hotspot & Freeradius -- Create your own user manager

Last time you has made your own script for inserting a new user to radius database. This time we are gonna view and manage user stats with fetching the radact tables in the radius database, but first make sure that there are some user already using their hotspot account before, this important because their login activity will be inserted automatically to the radact tables and we are gonna use that information data this time.

Open your MySQL admin software (i.e phpMyAdmin) the go to radact tables in the radius database.

If you are using phpMyAdmin the tables will be look like the above picture. There are some field that need to mention there is UserName, AcctStartTime, AcctStopTime and AcctSessionTime. This field will give us information about how long their log in activity. If we are need to know their download and upload activity the look at the AcctInputOctets and AcctOutputOctets it will show you.

If you want to resetting the user stats in case that they have using their maximum session time and need to log in again, simply just delete the rows that is related to user account in radact tables.

Next you need to do is write another php script to fetching radact tables and to delete rows for resetting process. I hope this post helpful and good luck.