Difference between revisions of "show interface statistics for up interfaces only"
From cpwiki.net
(Created page with "this will only work from the BASH shell, NOT csh. [root@myfw ~]# clish -c "show interfaces" | grep -B 1 " Up" | grep "Physical Interface" | grep -v -E "loop0|Tunnel" | awk...") |
|||
Line 1: | Line 1: | ||
+ | gaia | ||
+ | |||
+ | from bash shell | ||
+ | [Expert@chkpfw1:0]# clish -c "show interfaces" | while read LINE; do echo; echo $LINE; clish -c "show interface $LINE statistics" | grep -v ^$; done | ||
+ | |||
+ | |||
+ | |||
this will only work from the BASH shell, NOT csh. | this will only work from the BASH shell, NOT csh. | ||
[root@myfw ~]# clish -c "show interfaces" | grep -B 1 " Up" | grep "Physical Interface" | grep -v -E "loop0|Tunnel" | awk '{print $3}' | while read LINE; do clish -c "show interface $LINE statistics"; done | [root@myfw ~]# clish -c "show interfaces" | grep -B 1 " Up" | grep "Physical Interface" | grep -v -E "loop0|Tunnel" | awk '{print $3}' | while read LINE; do clish -c "show interface $LINE statistics"; done | ||
− | |||
− | |||
− |
Revision as of 16:56, 25 February 2015
gaia
from bash shell
[Expert@chkpfw1:0]# clish -c "show interfaces" | while read LINE; do echo; echo $LINE; clish -c "show interface $LINE statistics" | grep -v ^$; done
this will only work from the BASH shell, NOT csh.
[root@myfw ~]# clish -c "show interfaces" | grep -B 1 " Up" | grep "Physical Interface" | grep -v -E "loop0|Tunnel" | awk '{print $3}' | while read LINE; do clish -c "show interface $LINE statistics"; done