Controlling the size and number of vmkernel logs in ESX hosts
search cancel

Controlling the size and number of vmkernel logs in ESX hosts

book

Article ID: 307330

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

This article provides steps to modify the number and size of vmkernel logs retained in /var/log directory of ESX hosts.

Symptoms:


support-bundle-log-files-esx vm-support-esx-logs

Environment

VMware ESX Server 3.5.x
VMware ESX 4.0.x
VMware ESX 4.1.x

Resolution

To modify the number and size of vmkernel logs retained in the /var/log directory of the ESX host:

  1. Open the /etc/logrotate.d/vmkernel file using a text editor. The default file appears similar to:

    /var/log/vmkernel{
    create 0600 root root
    missingok
    nocompress
    # keep a history over 3 years.
    monthly
    rotate 36
    # max log size of 200k (thus limiting total disk usage to under 8megs)
    size 200k
    sharedscripts
    postrotate
    /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
    endscript
    }

    Where:

    • The rotate attribute indicates the number of vmkernel log files that are retained before the oldest file is overwritten. In this example, 36 vmkernel log files are retained before the oldest file is overwritten.
    • The size attribute indicates that the vmkernel log file will rotate to the next file when the size reaches the specified value. In this example, the vmkernel log file will rotate to the next file when the file size reaches 200KB.

  2. Modify the rotate and size attributes to a desired value.
  3. Save the file and exit the text editor.
  4. Run this command to restart the syslog service:
service syslog restart


Additional Information

For information about increasing the size and number of the hostd, vpxa, and vpxd logs, see Increasing vCenter Server and ESX logging levels (1004795).
ESX ホストにおける vmkernel ログのサイズと数の制御