Menu

#5 Addition of some CDP info

open
nobody
None
5
2009-11-04
2009-11-04
Anonymous
No

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/[ ]/\&amp;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.

Discussion

  • Kenneth C. Mazie

    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.

     
  • Kenneth C. Mazie

    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.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.