6.0

Table Of Contents
Getting Started with vSphere Command-Line Interfaces
146 VMware, Inc.
Eachtimeyouspecifyatargetwiththiscommand,thesettingsyouspecifyoverwriteallpreviously
specifiedsettings.Tospecifymultipletargets,separatethemwithacomma.
YoucanchangetheportthattheSNMPagentsendsdatatoonthetargetbyusingthe--targetsoption.
ThatportisUDP
162bydefault.
2 (Optional)Specifyaportforlisteningforpollingrequests.
vicfg-snmp <conn_options> -p <port>
3 (Optional)IftheSNMPagentisnotenabled,enableit.
vicfg-snmp <conn_options> --enable
4Runvicfg-snmp --testtovalidatetheconfiguration.
Thefollowingexampleshowshowthecommandsareruninsequence.
vicfg-snmp <conn_options> –c public –t example.com@162/private --enable
# next validate your config by doing these things:
vicfg-snmp <conn_options> -–test
walk –v1 –c public esx-host
Configuring the SNMP Agent for Polling with vicfg-snmp
1Runvicfg-snmp --targetwiththetargetaddress,portnumber,andcommunity.
vicfg-snmp <conn_options> -c public -t target.example.com@163/public
Eachtimeyouspecifyatargetwiththiscommand,thesettingsyouspecifyoverwriteallpreviously
specifiedsettings.Tospecifymultipletargets,separatethemwithacomma.
YoucanchangetheportthattheSNMPagentsendsdatatoonthetargetbyusingthe--targetsoption.
ThatportisUDP162bydefault.
2 (Optional)Specifyaportforlisteningforpollingrequests.
vicfg-snmp <conn_options> -p <port>
3 (Optional)IftheSNMPagentisnotenabled,enableit.
vicfg-snmp <conn_options> --enable
4Runvicfg-snmp --testtovalidatetheconfiguration.
Thefollowingexampleshowshowthecommandsareruninsequence.
vicfg-snmp <conn_options> –c public –t example.com@162/private --enable
# next validate your config by doing these things:
vicfg-snmp <conn_options> -–test
walk –v1 –c public esx-host
Retrieving Hardware Information
CommandsindifferentESXCLInamespacesmightdisplaysomehardwareinformation,buttheesxcli
hardwarenamespaceisspecificallyintendedtogiveyouthatinformation.Thenamespaceincludes
commandsforgettingandsettingCPUproperties,forlistingbootdevices,andforgettingandsettingthe
hardwareclocktime.
Youcanalsouse
theipminamespacetoretrieveIPMIsystemeventlogs(SEL)andsensordatarecords(SDR).
Thecommandsupportsbothget(singlereturnvalue)andlist(multiplereturnvalues)commandsandreturns
rawsensorinformation.
SeethevCLIReferenceortheESXCLIonlinehelpfordetails.