09-11-2015 01:43 AM
Hi guys!
I have one question for you.
I need to check the number of subscribers who has the same name of service. For example, I want to know the number of subscribers who has service UNCONTROLLED.:
RP/0/RSP0/CPU0:asr9k_1#show subscriber session filter interface Bundle-Ether1XXXXXXX
Fri Sep 11 11:05:53.657 FET
Interface: Bundle-Ether1XXXXXXXX
Circuit ID: GigabitEthernet0/0/5:XXXXXXXXXX
Remote ID: 3400-a301-7df0
Type: IP: DHCP-trigger
IPv4 State: Up, Thu Sep 10 16:35:59 2015
IPv4 Address: XX.XX.XX.XX, VRF: CLOUD
IPv4 Up helpers: 0x00000040 {IPSUB}
IPv4 Up requestors: 0x00000040 {IPSUB}
Mac Address: e8de.27c4.84ff
Account-Session Id: 0000834a
Nas-Port: 8139068
User name: GigabitEthernet0/0/5:XXXXXXXXXXX
Outer VLAN ID: 316
Inner VLAN ID: 1926
Subscriber Label: 0x0009ec2f
Created: Thu Sep 10 16:35:58 2015
State: Activated
Authentication: unauthenticated
Authorization: authorized
Ifhandle: 0x080b36a0
Session History ID: 1171
Access-interface: Bundle-Ether1.586
Policy Executed:
event Session-Start match-first [at Thu Sep 10 16:35:58 2015]
class type control subscriber DHCP do-until-failure [Succeeded]
10 activate dynamic-template IP_BASIC [cerr: No error][aaa: Success]
20 authorize aaa list default [cerr: No error][aaa: Success]
Session Accounting:
Acct-Session-Id: 0000834a
Method-list: default
Accounting started: Thu Sep 10 16:35:59 2015
Interim accounting: On, interval 180 mins
Last successful update: Fri Sep 11 10:36:00 2015
Next update in: 02:30:06 (dhms)
Last update sent: Fri Sep 11 10:36:00 2015
Updates sent: 6
Updates accepted: 6
Updates rejected: 0
Update send failures: 0
Service Accounting: FR7775
Acct-Session-Id: 00008379
Method-list: default
Accounting started: Thu Sep 10 16:35:59 2015
Interim accounting: On, interval 60 mins
Last successful update: Fri Sep 11 10:36:00 2015
Next update in: 00:30:06 (dhms)
Last update sent: Fri Sep 11 10:36:00 2015
Updates sent: 18
Updates accepted: 18
Updates rejected: 0
Update send failures: 0
Last COA request received: unavailable
User Profile received from AAA:
Attribute List: 0x1000f194
1: service-type len= 4 value= Outbound
2: addr len= 4 value= XX.XX.XX.XX
3: netmask len= 4 value= 255.255.224.0
4: inacl len= 8 value= Rule-Rule
Services:
-------------------------
Name : UNCONTROLLED
Service-ID : 0x4000020
Type : Multi Template
Status : Applied
-------------------------
[Event History]
Sep 10 16:35:57.312 IPv4 Start
Sep 10 16:35:58.080 IPv4 Up
Sep 10 16:35:58.080 SUBDB produce done
I want to know the number of subscribers who has service UNCONTROLLED.
I can use next filter show subs sess all det int | i UNCONTROLLED, but i can't see any statistic.
Could you advice a command for the checking ?
Solved! Go to Solution.
09-11-2015 01:56 AM
If all subscribers who have service "UNCONTROLLED" are uniquely mapped to any of the following entities:
access-interface Filter on local subscriber access interface name
address-family Filter on subscriber address-family
authentication Filter on subscriber authentication state
interface Filter on local subscriber interface name
ipv4-address Filter on subscriber IPv4 address
lac Filter on LAC subscribers
mac-address Filter on subscriber MAC address
state Filter on subscriber session state
username Filter on user name
vrf Filter on subscribers within a particular VRF
you can use the "sh subscriber session filter".
Otherwise, you can extend the pipe and use one of the unix utilties:
RP/0/RSP0/CPU0:IM1#show subs sess all det internal location 0/rSP0/CPU0 | i UNCONTROLLED | utility ?
cut Cut out selected fields of each line of a file
egrep Extended regular expression grep
fgrep Fixed string expression grep
head Show set of lines/characters from the top of a file
less Fixed string pattern matching
more Paging Utility More
script Launch a script for post processing
sort Sort, merge, or sequence-check text files
tail Copy the last part of files
uniq Report or filter out repeated lines in a file
wc Counting lines/words/characters of a file
xargs Construct argument list(s) and invoke a program
Do keep in mind that it will take a long time for the command to complete because the full output of the XR command is presented to the first pipe and the remainder to the 2nd pipe.
regards,
Aleksandar
09-11-2015 01:56 AM
If all subscribers who have service "UNCONTROLLED" are uniquely mapped to any of the following entities:
access-interface Filter on local subscriber access interface name
address-family Filter on subscriber address-family
authentication Filter on subscriber authentication state
interface Filter on local subscriber interface name
ipv4-address Filter on subscriber IPv4 address
lac Filter on LAC subscribers
mac-address Filter on subscriber MAC address
state Filter on subscriber session state
username Filter on user name
vrf Filter on subscribers within a particular VRF
you can use the "sh subscriber session filter".
Otherwise, you can extend the pipe and use one of the unix utilties:
RP/0/RSP0/CPU0:IM1#show subs sess all det internal location 0/rSP0/CPU0 | i UNCONTROLLED | utility ?
cut Cut out selected fields of each line of a file
egrep Extended regular expression grep
fgrep Fixed string expression grep
head Show set of lines/characters from the top of a file
less Fixed string pattern matching
more Paging Utility More
script Launch a script for post processing
sort Sort, merge, or sequence-check text files
tail Copy the last part of files
uniq Report or filter out repeated lines in a file
wc Counting lines/words/characters of a file
xargs Construct argument list(s) and invoke a program
Do keep in mind that it will take a long time for the command to complete because the full output of the XR command is presented to the first pipe and the remainder to the 2nd pipe.
regards,
Aleksandar
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide