smadmin is responsible for keeping a summary of usages each month, deleting old or duplicate entries in certain tables and determining which topups are still available for use for each new month. smadmin must be set up to run monthly, on the first day of the new month (crontab).

# Usage:
./smadmin [args]

--config=/path/file Configuration file

--debug Put into debug mode

--cleanup Cleanup database records

Several modules have functions that smadmin calls.

Topups that have been depleted are marked so. Partially used topups, if they are still valid, are added to the topups_summary table.

A sum of all records from the previous month are added to the accounting_summary table with a period key in datetime format.