Calculating ASA Throughput
- copy output of command below to the asaThroughput text file:
- show traffic | begin Aggregated Traffic on Physical Interface
- delete all traffic statistics for interfaces with "Internal" word
- Automatically count bytes in all interfaces statistics:
- bytes=$(grep -E "bytes$" asaThroughput | \
- grep -v "0 packets.*0 bytes" | \
- awk '{s=s+$3} END {print s}')
- select the first appearance of the number of seconds of traffic statistics:
- seconds=$(grep -m 1 secs asaThroughput | \
- awk '{print $3}' | \
- cut -d\. -f 1)
- get final result (ASA throughput in Mbps):
- echo $((bytes/seconds*8/1024/1024))
No comments:
Post a Comment