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.

One thought on “Using filters on Cisco WLC

  1. Woah! I’m really loving the template/theme of this blog.
    It’s simple, yet effective. A lot of times it’s difficult to get
    that “perfect balance” between superb usability and visual appeal.
    I must say you’ve done a superb job with this. Additionally, the blog loads very quick for me on Opera.

    Outstanding Blog!

Leave a Reply

Your email address will not be published. Required fields are marked *