vSphere 5.1 Update 1 was just released last week and one of the things that caught my eye while reading through the release notes for ESXi 5.1 Update 1 was a new enhancement to hostd logging:
- Component-based logging and advanced configurations added to hostd log level
- To avoid difficulties in getting appropriate logs during an issue, this release introduces component-based logging by dividing the loggers into different groups and prefixing them. Also, new advanced configuration allows you to change hostd log’s log level without restarting.
Though this enhancement is targeted for troubleshooting purposes and will most likely be used when working with GSS. I thought I would walk you through on how this feature works as there were not much detail in the release notes.
Prior to vSphere 5.1 Update 1, log level for hostd was controlled globally using the ESXi Advanced Setting called "Config.HostAgent.log.level" which can be seen in the vSphere Web Client or vSphere C# Client:
However, if you take a look at hostd's log under /var/log/hostd.log you will see there are actually multiple sub-components that log within hostd. In the example below, we can see there are three sub-components currently logging: cimsvc, vimsvc and hostsvc
From a troubleshooting perspective, we may want to increase the verbosity for some of these sub-components depending on the issue we are looking into. With the enhancement in vSphere 5.1 Update 1, you now have the ability to configure granular log level for each of the sub-components within hostd. In addition to the global hostd log level configuration, there are eight additional component log levels that can now be configured:
These new configurations can be see in both the vSphere Web Client and vSphere C# Client:
The supported log level values for each of these configurations are the following: none, quiet, panic, error, warning, info, verbose and trivia. If an individual sub-component is not configured, then it will inherit from the global configuration which by default is configured to verbose.
Since these configurations will most likely be used during troubleshooting, you can either set them in the vSphere Web Client/vSphere C# Client or through the ESXi Shell using the vim-cmd interface.
To view the current log level for a given component, you will run the following command (substitute the name of the component you wish to view) :
vim-cmd hostsvc/advopt/view Config.HostAgent.log.level
Here is a screenshot of viewing the default hostd log level as well as the Vmsc component:
vim-cmd hostsvc/advopt/update Config.HostAgent.level[Vmsvc].logLevel string warning
Here is a screenshot of configuring the Vmsvc component log level to "warning":
As noted in the release notes, these changes will go into effect immediately and do not require any service restarts. With default global hostd log level configured to verbose, it should be sufficient for out of the box troubleshooting and you should not have to worry about these settings unless you have been instructed to do so by VMware GSS.
Get notification of new blog postings and more by following lamw on Twitter: @lamw