How to change ESXi log rotation parameters
search cancel

How to change ESXi log rotation parameters

book

Article ID: 411497

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

This article provides steps to change the number of logs per rotation and the size of the log file before it rotates.

Environment

VMware vSphere ESXi 7.X
VMware vSphere ESXi 8.X

Resolution

To increase the number of logs per rotation and the size of the log file before it rotates using esxcli:

  1. Open an SSH session to the ESXi host. 
  2. List current log files kinds and rotate parameters:
    esxcli system syslog config logger list
  3. Modify the log rotate parameters (The --rotate parameter defines the number of log files to be saved, and the --size parameter defines the size of the log file):
    esxcli system syslog config logger set --id=<logger_name> --rotate=15 --size=10240

    For example:
    Modify the vmkernel log rotate parameters:
    esxcli system syslog config logger set --id=vmkernel --rotate=15 --size=10240

    Modify the hostd log rotate parameters:
    esxcli system syslog config logger set --id=hostd --rotate=15 --size=10240
  4. Apply the new configuration changes.
    esxcli system syslog reload

Additional Information

日本語バージョン: ESXi のログローテーションパラメータを変更する方法