Difference between revisions of "show interface statistics for up interfaces only"

From cpwiki.net
Jump to: navigation, search
Check Point Profressional Services
(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...")
 
 
(7 intermediate revisions by one user not shown)
Line 1: Line 1:
 +
gaia
 +
 +
from bash shell
 +
 +
show IPs/masks
 +
 +
<source lang="bash">
 +
# clish -c "show interfaces all" | grep -B 1 "state on" | grep Interface | grep -v " lo" | awk '{print $2}' | while read line; do printf "$line "; clish -c "show interface $line ipv4-address"; done
 +
</source>
 +
 +
show speeds
 +
<source lang="bash">
 +
# clish -c "show interfaces all" | grep -B 1 "state on" | grep Interface | grep -v " lo" | awk '{print $2}' | while read line; do printf "$line "; clish -c "show interface $line speed"; done
 +
</source>
 +
 +
interface statistics
 +
<source lang="bash">
 +
# clish -c "show interfaces" | while read LINE; do echo; echo $LINE; clish -c "show interface $LINE statistics" |\
 +
grep -v ^$; done
 +
</source>
 +
 +
 
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
 
  
[[category:nokia]]
+
old ipso...
[[category:ipso]]
+
 
 +
[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

Latest revision as of 03:56, 3 December 2017

gaia

from bash shell

show IPs/masks

# clish -c "show interfaces all" | grep -B 1 "state on" | grep Interface | grep -v " lo" | awk '{print $2}' | while read line; do printf "$line "; clish -c "show interface $line ipv4-address"; done

show speeds

# clish -c "show interfaces all" | grep -B 1 "state on" | grep Interface | grep -v " lo" | awk '{print $2}' | while read line; do printf "$line "; clish -c "show interface $line speed"; done

interface statistics

 # 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.

old ipso...

[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