Monday 2 February 2015

Using filters on Cisco WLC

The WLC outputs makes me crazy when you have to search for a specific entry in the logs. Recently I came across the filter option available on the Cisco WLCs. Not sure which code version it has been supported from, but it is awesome..

You can now use the ‘grep’ command to get the specific match. This is especially useful when the output of any commands is lengthy and you have to scroll down to get to the information that you are looking for. Lets take some examples and the related syntax.


(WLC-Primary) >grep ?

include        Include lines that match.
exclude        Exclude lines that match.

(WLC-Primary) >grep include ?

<pattern>      Pattern to be searched.


(WLC-Primary) >grep include uptime ?

<command>      Enter complete show command in double quotes.



Lets try to find the uptime of the WLC:

(WLC-Primary) >grep include ime "show sysinfo"
Press yes to continue(y)y
System Up Time................................... 0 days 5 hrs 47 mins 57 secs
System Timezone Location......................... (GMT +5:30) Colombo, New Delhi, Chennai, Kolkata
System Stats Realtime Interval................... 5

There are 3 lines matching the pattern ime



Since this is case sensitive I searched for the value "ime".


Lets see another example, let suppose I want to see all APs except a specific AP.


(WLC-Primary) >show ap summary

Number of APs.................................... 3

Global AP User Name.............................. gce-apac
Global AP Dot1x User Name........................ Not Configured

AP Name             Slots  AP Model              Ethernet MAC       Location          Country  IP Address       Clients
------------------  -----  --------------------  -----------------  ----------------  -------  ---------------  -------
L3500-3              2     AIR-CAP3502I-E-K9     40:55:39:ca:8a:99  default location  AE       10.105.132.249   0
TEST-AP-1            2     AIR-CAP2602E-A-K9     6c:41:6a:78:d8:32  default location  US       10.105.132.247   0
AP-3602AP-1          2     AIR-CAP3602I-A-K9     e4:d3:f1:c9:04:ca  default location  US       10.105.132.251   0


We will use the option exclude this time.


(WLC-Primary) >grep exclude "L3500-3" "show ap summary"

Press yes to continue(y)y


Number of APs.................................... 3

Global AP User Name.............................. gce-apac
Global AP Dot1x User Name........................ Not Configured

AP Name             Slots  AP Model              Ethernet MAC       Location          Country  IP Address       Clients
------------------  -----  --------------------  -----------------  ----------------  -------  ---------------  -------
TEST-AP-1            2     AIR-CAP2602E-A-K9     6c:41:6a:78:d8:32  default location  US       10.105.132.247   0
AP-3602AP-1          2     AIR-CAP3602I-A-K9     e4:d3:f1:c9:04:ca  default location  US       10.105.132.251   0

There are 12 lines not matching the pattern L3500-3





Hope this was informational.

Labels:

15 Comments:

At 28 April 2017 at 01:50 , Blogger Unknown said...

Thank you for sharing the information bharath , this is very helpful tip :)

 
At 25 July 2017 at 20:04 , Anonymous Anonymous said...

Is there a way to use both (include/exclude)? I'm trying to filter AP "BC" from AP "ABC". Using grep include "BC" list both APs. Or is there any other way to do this? TIA.

 
At 25 July 2017 at 20:22 , Anonymous Anonymous said...

This comment has been removed by a blog administrator.

 
At 13 September 2017 at 05:25 , Anonymous Anonymous said...

Thanks Mate..
your article helped in my script

 
At 16 September 2017 at 03:25 , Blogger koka seo said...

Filter Air Terbaik Di Yogyakarta Dari Kran Langsung Minum
http://filter-air-jogja.blogspot.co.id/2017/09/filter-air-terbaik-di-yogyakarta-dari.html

 
At 15 December 2017 at 02:59 , Blogger Unknown said...

This comment has been removed by a blog administrator.

 
At 28 May 2018 at 05:35 , Blogger cavin straut said...


If you need any assistance during registration or activation of your pogo account, then contact the Pogo Support Number on 1-833-442-7444 pogo support number . It is acceptable to encounter with some unknown error while signing-up for an account, therefore we have brought to you this Telephone number, which will directly connect you with the Pogo Support and get you necessary help. For More Info>>> pogo games not loading

 
At 21 November 2018 at 19:04 , Anonymous Anonymous said...

Fantastic tip Bharat. Thanks

 
At 26 April 2019 at 15:04 , Blogger aholland1 said...

A colleague recently discovered this nugget (wish I could take credit!):
grep exclude 1000 "show ap stats ethernet summary"

With config paging disable, this will dump a list of APs connecting at 100Mb which is super handy deploying hundreds of APs and since the WLC doesn't allow you to filter for LESS THAN 1000 ONLY; what's up with that?

 
At 20 May 2019 at 09:00 , Blogger SanchezSite said...

Great! Very helpful! I ran it on a small controller and I found a few at 100.
I changed the command to read:
grep include " 100 " "show ap stats ethernet summary"

Using 'exclude 1000' picked up the second interface on the output. Having " 100 " did the job well.

 
At 20 August 2019 at 15:39 , Blogger Unknown said...

Well Explained sir....

 
At 16 September 2019 at 16:29 , Blogger Unknown said...

nice one. the space BEFORE the 100 did the trick!

 
At 26 February 2020 at 22:57 , Blogger Email-Helpline-Number-UK said...

If it is about resolving account errors on Gmail then in that case, the user should check the account settings and should make changes there if needed; the user can easily check the settings by conducting a simple comparison of the application settings with the Email account settings. If needed then for further information the user should get connected with the certified Gmail technicians.

 
At 5 October 2020 at 01:00 , Blogger Email-Helpline-Number-UK said...

Gmail is the best email service and it comes with excellent features to enhance the experience if the users. It sometimes gets you stuck when you are not able to operate it on your browser. In such a case, it is advisable to update your operating system and browser. Also, clear cookies and cache from the browser because heavy traffic on the browser will restrict Gmail from signing in. Call on +44-800-368-9067 to get connected with the technical experts for any help.
Gmail Helpline Number UK.
Gmail Support Number UK.

 
At 21 September 2021 at 05:07 , Blogger Techy Guy said...

Thanks for give us valuable information
Cisco Support
Cisco Australia

 

Post a Comment

Subscribe to Post Comments [Atom]

<< Home