FastPCRF Management
The following are the fastPCRF commands, so you have to specify the fastPCRF address in the -r argument of the fdpi_cli utility.
Authorization request queue
Authorization request queue - is an internal fastPCRF queue, which is designed to smooth out the peaks of calls to the Radius-server. When fastDPI authorization from fastPCRF, it does not take into account the bandwidth of Radius-server. There are parameters in fastpcrf.conf that set the maximum length and time spent in the queue, but sometimes you need to manually clear the queue or view its statistics.
pcrf auth queue stat
Displays statistics on the internal queue of authorization requests:
fdpi_cli -r <address> pcrf auth queue stat
pcrf auth queue clear
Clears the authorization queue. You can clear the entire queue with the command:
fdpi_cli -r <address> pcrf auth queue clear
or the oldest records by specifying the time = N
parameter, where N is the number of seconds, - records older than the specified number of seconds will be removed from the queue:
fdpi_cli -r <address> pcrf auth queue clear time=60
Persistent reply queue
Persistent queue management commands (fastPCRF response queues for authorization requests)
pcrf persist queue stat
Displays persistent queue statistics for each fastDPI:
> fdpi_cli -r <address> pcrf persist queue stat Statistics of persist queue (pcrf -> fastdpi): FastDPI #0 '127.0.0.1%lo': queue file: /var/spool/dpi/pcrf/pq-127.0.0.1:29000 current: page count=1, item count=0 connected at: 2019/12/04 12:02:52, -25.332764s (13249164373261240 ticks) last sent: n/a (0 ticks) next reconnect: n/a (0 ticks) Statistics: sent: packet=0, bytes=0, error=0 received: bytes=0, error=0 socket: open=1, close=0, buffer overflow (split packet)=0 queue: enqueue packet=0 (0 bytes) drop head=0, push exception=0, clear count=0 FastDPI #1 '10.20.30.41%eth0': queue file: /var/spool/dpi/pcrf/pq-10.20.30.41:29000 current: page count=1, item count=3560 last sent: n/a (0 ticks) next reconnect: 2019/12/04 12:03:18, +0.705613s (13249242490512650 ticks) Statistics: sent: packet=0, bytes=0, error=0 received: bytes=0, error=0 socket: open=0, close=0, buffer overflow (split packet)=0 queue: enqueue packet=0 (0 bytes) drop head=0, push exception=0, clear count=0
pcrf persist queue clear
Clears all queues or only the specified queue. The command response is the queue statistics after clearing.
# clears all queues fdpi_cli -r <address> pcrf persist queue clear # clears a queue by its number # the queue number can be found from the output of the pcrf persist queue stat command fdpi_cli -r <address> pcrf persist queue clear 1 # clears a queue by its name fdpi_cli -r <address> pcrf persist queue clear 127.0.0.1%lo
pcrf persist queue reconnect
Allows you to reconnect to fastDPI without resetting the queue. It can be applied to a specific connection or to all.