Hi,
I've added a few lines to my version of the script, and I think it is something that would be useful for everyone to use.
my_cdpinfo=` vmware-vim-cmd hostsvc/net/query_networkhint | grep "device =\|devId =\|portId =" | tr -d '\n' | sed 's/device =/\n/g' | awk -F\" {'print $2" "$4" "$6'} | sed 's/^ //g' | sed 's/ / No CDP information available/g' | sed 's/$/<br\/>/' | sed 's/[ ]/\&nbsp;/g'`
printout "List CDP info" "${my_cdpinfo}"
Quite basic, but something that REALLY helps speed up investigations in relation to network problems.
Cheers,
Carson.
I'll test this on the vShphere version of the script (if I ever get some time that is) and include it when I get a new release prepped.
Seems to work OK but i get no output on my system. I no longer have ESX 3 to test against. I needed to remove the quote after 'awk /F' to make things work. I added it to my new revision and am trying to get a release prepped which will include it.