計費在線表補丁指令:
先升級
/opt/toughee/bin/upgrade latest
cd /opt/toughee/
bin/pyrun2.7 radiusctl redotable -name tr_online -c etc/toughee.json
具體執行的就是刪除在線表重建,解決在線會話ID重複的問題
經過mysql客戶端查詢在線表結構,能夠確認 acct_session_id 已是惟一 unique
MariaDB [toughee]> desc tr_online;
+-----------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------------+--------------+------+-----+---------+-------+
| id | varchar(32) | NO | PRI | NULL | |
| account_number | varchar(32) | NO | MUL | NULL | |
| nas_addr | varchar(32) | NO | MUL | NULL | |
| acct_session_id | varchar(64) | NO | UNI | NULL | |
| acct_start_time | varchar(19) | NO | | NULL | |
| framed_ipaddr | varchar(32) | NO | | NULL | |
| mac_addr | varchar(32) | NO | | NULL | |
| nas_port_id | varchar(255) | NO | | NULL | |
| billing_times | int(11) | NO | | NULL | |
| input_total | int(11) | YES | | NULL | |
| output_total | int(11) | YES | | NULL | |
| start_source | smallint(6) | NO | | NULL | |
| sync_ver | varchar(16) | YES | | NULL | |
+-----------------+--------------+------+-----+---------+-------+