Adjusting the amount of hostd log files

There was a question posted on the VMware Community Forums regarding the ability to increase the number of hostd log files.  Here is the solution I provided:

To change the max amount of log files for hostd you will need to edit /etc/vmware/hostd/config.xml. In the file you will find the following section:


1
2
3
4
5
6
   <log>
      <directory>/var/log/vmware/</directory>
      <name>hostd</name>
      <outputToConsole>false</outputToConsole>
      <level>verbose</level>
   </log>

You will want to add <maxFileNum>numberLogs</maxFileNum> like so:


1
2
3
4
5
6
7
   &lt;log&gt;
      &lt;directory&gt;/var/log/vmware/&lt;/directory&gt;
      &lt;name&gt;hostd&lt;/name&gt;
      &lt;outputToConsole&gt;false&lt;/outputToConsole&gt;
      &lt;level&gt;verbose&lt;/level&gt;
      &lt;maxFileNum&gt;10&lt;/maxFileNum&gt;
   &lt;/log&gt;

Your logs, however, should have multiple gzipped versions or rotated logs in /var/log/vmware. You will probably see /var/log/vmware/hostd-#.log.gz in there. If you do then you can view those logs with the following command:

# zless /var/log/vmware/hostd-1.log.gz