计费在线表补丁指令:
先升级
/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 | |
+-----------------+--------------+------+-----+---------+-------+