·
Port
number
·
Switch
name
·
MAC
Address
· Client port status of ports associated with switch
·
Client
port stats of ports associated with switch
·
Client
name
·
Client
port type e.g. 3 (vmkernel), 4 (PNIC) or 5 (virtual NIC)
·
Tx
and Rx of packets associated to ports related to individual switches.
·
Dropped
packets associated with them.
With following script you can easily get all of these information in one go:
net-stats -l;echo "";for switch in $(net-stats -l | awk '{print $4}' | grep -vi switchname | uniq);do echo "For this switch: $switch:========================";for port in $(net-stats -l | awk '{print $1}' | grep -vi portnum); do echo ""; echo Switch $switch and port $port:;echo "Status :";vsish -e cat /net/portsets/$switch/ports/$port/status 2>/dev/null | grep -i client ;echo "";echo "Stats :";vsish -e cat /net/portsets/$switch/ports/$port/stats 2>/dev/null | grep -iv "packet stats";done;done
Output:
Ports which are not associated to given switch will not have any info against port stats and port status.
The last part of this series will be containing another useful script that can dig the nic driver related information, ring buffer associated, default ring configuration and getting advanced module parameters for given NIC drivers.
Stay tuned....till then.
Thanks for reading, be social and share it in your circle if found useful.
Link to Page - vSphere
No comments:
Post a Comment