Introduction
This document describes a scenario related to the discrepancy observed for a StarOS CLI – 'show subscribers summary' output and the recommended syntax for it.
Prerequisites
Requirements
Cisco recommends that you have knowledge of these topics:
Components Used
The information in this document is based on StarOS versions 21.23.12-83034 and 21.23.3-80756.
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, ensure that you understand the potential impact of any command.
Background Information
To display the information related to the subscriber session in the node, the CLI in StarOS – ‘show subscribers summary’ along with some pre-defined filter keywords is used. One such filter keyword is ‘connected-time’ which you can use to check how long the subscriber has been connected to the node/network. The format of the command is:
show subscribers summary apn <apn-name> connected-time [ < | > | greater-than | less-than ] value
Where:
< : Filters output so that only information less than the specified value is displayed.
> : Filters output so that only information greater than the specified value is displayed.
greater-than : Filters output so that only information greater than the specified value is displayed.
less-than : Filters output so that only information less than the specified value is displayed.
value : Used in conjunction with <, >, greater-than, less-than, If no other filtering options are specified only output matching value is displayed. If value is not specified all data is displayed. value must be an integer from 0 through 4294967295.
Problem
A discrepancy was observed for the CLI ‘show subscribers summary’ output when used with the ‘connected-time’ filter keyword more than one time. The output of the CLI did not match with the change in the values and/or sequence of the keyword.
Test Scenarios
- Faced this issue when the ‘connected-time’ filter keyword is used more than once.
- There is no example present in the StarOS admin guide for this specific keyword.
- The same scenario was tested out in the lab with various StarOS builds. Here are the outcomes:
- Initially, a few calls are simulated at different time-intervals with the use of a lab node
[local]LTE_All3_ePDG# show subscribers summary | grep -i "Total Subscribers:"
Total Subscribers: 32
- Then, the ‘show subscribers summary’ CLI is executed with the ‘connected-time’ filter keyword with various arguments/sequences. From these command outputs, you can see that the values change when either the time value or the sequence of the time value is changed or the keyword is used one time.
[local]LTE_All3_ePDG# show subscribers summary apn ipv4.com connected-time < 2000 | grep -i "Total Subscribers:"
Total Subscribers: 30
[local]LTE_All3_ePDG# show subscribers summary apn ipv4.com connected-time > 1000 | grep -i "Total Subscribers:"
Total Subscribers: 8
[local]LTE_All3_ePDG# show subscribers summary apn ipv4.com connected-time > 1000 connected-time < 2000 |grep -i "Total Subscribers:"
Total Subscribers: 30
[local]LTE_All3_ePDG# show subscribers summary apn ipv4.com connected-time < 2000 connected-time > 1000 |grep -i "Total Subscribers:"
Total Subscribers: 10
[local]LTE_All3_ePDG# show subscribers summary apn ipv4.com connected-time > 1000 < 2000 | grep -i "Total Subscribers:"
Total Subscribers: 8
[local]LTE_All3_ePDG# show subscribers summary apn ipv4.com connected-time < 2000 > 1000 | grep -i "Total Subscribers:"
Total Subscribers: 8
- The same test is carried out for other StarOS builds as well, and you get the same discrepancy. So, it is observed for all the StarOS builds.
Solution
The correct syntax to use the command ‘show subscribers summary’ with the keyword ‘connected-time’ is to use the keyword one-time only, in conjunction with greater-than (>) and less-than (<).
For Example:
[local]LTE_All3_ePDG# show subscribers summary apn ipv4.com connected-time > 1000 < 2000 | grep -i "Total Subscribers:"
Total Subscribers: 8
[local]LTE_All3_ePDG# show subscribers summary apn ipv4.com connected-time < 2000 > 1000 | grep -i "Total Subscribers:"
Total Subscribers: 8
[local]LTE_All3_ePDG# show subscribers summary apn ipv4.com connected-time greater-than 1000 less-than 2000 | grep -i "Total Subscribers:"
Total Subscribers: 8
[local]LTE_All3_ePDG# show subscribers summary apn ipv4.com connected-time less-than 2000 greater-than 1000 | grep -i "Total Subscribers:"
Total Subscribers: 8