[j-nsp] Condensing "monitor interface traffic" output to "relevant" interfaces

Daniel Roesen dr at cluenet.de
Fri Nov 6 17:29:32 EST 2009


Hi,

a "picture" tells a thousand words.

BAD:

Interface    Link  Input packets        (pps)     Output packets        (pps)
 lc-0/0/0      Up              0                               0
 xe-0/0/0      Up   767595885234     (159405)      1882675859721     (477909)
 lc-0/1/0      Up              0                               0
 xe-0/1/0      Up    36339553432     (162110)        49465214379     (296154)
 lc-0/2/0      Up              0                               0
 xe-0/2/0      Up    26159490276     (298741)        70033017232     (760989)
 lc-0/3/0      Up              0                               0
 xe-0/3/0      Up  4878653151850     (296197)      4623604917740     (767545)
 lc-1/0/0      Up              0                               0
 xe-1/0/0      Up   713705256153          (0)      1565903701234          (0)
 lc-1/1/0      Up              0                               0
 xe-1/1/0      Up  1654811503035     (587447)      3913475383687     (454637)
 lc-1/2/0      Up              0                               0
 xe-1/2/0      Up  2101375304463     (293563)       144740471930      (25522)
 lc-1/3/0      Up              0                               0
 xe-1/3/0    Down              0          (0)                  0          (0)
 lc-2/0/0      Up              0                               0
 xe-2/0/0      Up  2908710280930     (766683)       913773779857      (40296)
 lc-2/1/0      Up              0                               0
 xe-2/1/0      Up  2681137814213     (391381)        93722272864      (37683)
 lc-2/2/0      Up              0                               0
 xe-2/2/0    Down              0          (0)                  0          (0)
 lc-2/3/0      Up              0                               0
 xe-2/3/0      Up  1866216651220     (294634)       127903437046      (25950)
 lc-3/0/0      Up              0                               0
 xe-3/0/0    Down              0          (0)                  0          (0)
 lc-3/1/0      Up              0                               0
 xe-3/1/0    Down              0          (0)                  0          (0)
 lc-3/2/0      Up              0                               0
 xe-3/2/0    Down              0          (0)                  0          (0)
 lc-3/3/0      Up              0                               0
 xe-3/3/0    Down              0          (0)                  0          (0)

GOOD:

Interface    Link  Input packets        (pps)     Output packets        (pps)
 xe-0/0/0      Up   767595885234     (159405)      1882675859721     (477909)
 xe-0/1/0      Up    36339553432     (162110)        49465214379     (296154)
 xe-0/2/0      Up    26159490276     (298741)        70033017232     (760989)
 xe-0/3/0      Up  4878653151850     (296197)      4623604917740     (767545)
 xe-1/0/0      Up   713705256153          (0)      1565903701234          (0)
 xe-1/1/0      Up  1654811503035     (587447)      3913475383687     (454637)
 xe-1/2/0      Up  2101375304463     (293563)       144740471930      (25522)
 xe-1/3/0    Down              0          (0)                  0          (0)
 xe-2/0/0      Up  2908710280930     (766683)       913773779857      (40296)
 xe-2/1/0      Up  2681137814213     (391381)        93722272864      (37683)
 xe-2/2/0    Down              0          (0)                  0          (0)
 xe-2/3/0      Up  1866216651220     (294634)       127903437046      (25950)
 xe-3/0/0    Down              0          (0)                  0          (0)
 xe-3/1/0    Down              0          (0)                  0          (0)
 xe-3/2/0    Down              0          (0)                  0          (0)
 xe-3/3/0    Down              0          (0)                  0          (0)

It's even worse in "show interfaces terse":

Interface               Admin Link Proto    Local                 Remote
lc-0/0/0                up    up  
lc-0/0/0.32769          up    up   vpls    
xe-0/0/0                up    up  
xe-0/0/0.0              up    up   aenet    --> ae0.0
lc-0/1/0                up    up  
lc-0/1/0.32769          up    up   vpls    
xe-0/1/0                up    up  
xe-0/1/0.0              up    up   aenet    --> ae0.0
lc-0/2/0                up    up  
lc-0/2/0.32769          up    up   vpls    
xe-0/2/0                up    up  
xe-0/2/0.0              up    up   aenet    --> ae9.0
lc-0/3/0                up    up  
lc-0/3/0.32769          up    up   vpls    
xe-0/3/0                up    up  
xe-0/3/0.0              up    up   aenet    --> ae9.0
lc-1/0/0                up    up  
lc-1/0/0.32769          up    up   vpls    
xe-1/0/0                up    up  
lc-1/1/0                up    up  
lc-1/1/0.32769          up    up   vpls    
xe-1/1/0                up    up  
etc...

It would be really nice to not display all those internal interfaces by
default, but only when using a special qualifier, e.g. "monitor interface
traffic all". Of course, with "show" we could filter via regexp, but typing
regexp every time is kinda annoying you know. :-)

I'm trolling about this in public to see wether anyone has already managed
to get an RFE opened on that one so we can hook up on that on our next
multi-trillion EUR purchase. :) Just something to counter the usual "no
customer demand" with proof of the contrary.

Best regards,
Daniel

-- 
CLUE-RIPE -- Jabber: dr at cluenet.de -- dr at IRCnet -- PGP: 0xA85C8AA0


More information about the juniper-nsp mailing list