6.5
Table Of Contents
- vSphere Command-Line Interface Concepts and Examples
- Contents
- About This Book
- vSphere CLI Command Overviews
- Introduction
- List of Available Host Management Commands
- Targets and Protocols for vCLI Host Management Commands
- Supported Platforms for vCLI Commands
- Commands with an esxcfg Prefix
- ESXCLI Commands Available on Different ESXi Hosts
- Trust Relationship Requirement for ESXCLI Commands
- Using ESXCLI Output
- Connection Options for vCLI Host Management Commands
- Connection Options for DCLI Commands
- vCLI Host Management Commands and Lockdown Mode
- Managing Hosts
- Managing Files
- Managing Storage
- Introduction to Storage
- Examining LUNs
- Detach a Device and Remove a LUN
- Reattach a Device
- Working with Permanent Device Loss
- Managing Paths
- Managing Path Policies
- Scheduling Queues for Virtual Machine I/O
- Managing NFS/NAS Datastores
- Monitor and Manage FibreChannel SAN Storage
- Monitoring and Managing Virtual SAN Storage
- Monitoring vSphere Flash Read Cache
- Monitoring and Managing Virtual Volumes
- Migrating Virtual Machines with svmotion
- Configuring FCoE Adapters
- Scanning Storage Adapters
- Retrieving SMART Information
- Managing iSCSI Storage
- iSCSI Storage Overview
- Protecting an iSCSI SAN
- Command Syntax for esxcli iscsi and vicfg-iscsi
- iSCSI Storage Setup with ESXCLI
- iSCSI Storage Setup with vicfg-iscsi
- Listing and Setting iSCSI Options
- Listing and Setting iSCSI Parameters
- Enabling iSCSI Authentication
- Set Up Ports for iSCSI Multipathing
- Managing iSCSI Sessions
- Managing Third-Party Storage Arrays
- Managing Users
- Managing Virtual Machines
- Managing vSphere Networking
- Introduction to vSphere Networking
- Retrieving Basic Networking Information
- Troubleshoot a Networking Setup
- Setting Up vSphere Networking with vSphere Standard Switches
- Setting Up Virtual Switches and Associating a Switch with a Network Interface
- Retrieving Information About Virtual Switches
- Adding and Deleting Virtual Switches
- Checking, Adding, and Removing Port Groups
- Managing Uplinks and Port Groups
- Setting the Port Group VLAN ID
- Managing Uplink Adapters
- Adding and Modifying VMkernel Network Interfaces
- Managing VMkernel Network Interfaces with ESXCLI
- Add and Configure an IPv4 VMkernel Network Interface with ESXCLI
- Add and Configure an IPv6 VMkernel Network Interface with ESXCLI
- Managing VMkernel Network Interfaces with vicfg-vmknic
- Add and Configure an IPv4 VMkernel Network Interface with vicfg-vmknic
- Add and Configure an IPv6 VMkernel Network Interface with vicfg-vmknic
- Setting Up vSphere Networking with vSphere Distributed Switch
- Managing Standard Networking Services in the vSphere Environment
- Setting the DNS Configuration
- Manage an NTP Server
- Manage the IP Gateway
- Setting Up IPsec
- Manage the ESXi Firewall
- Monitor VXLAN
- Monitoring ESXi Hosts
- Index
n
Log rotation policies - Sets maximum log size and the number of archives to keep. You can specify
policies both globally, and for individual subloggers. For example, you can set a larger size limit for the
vmkernel log.
I The esxcli system syslog command is the only supported command for changing ESXi 5.0
and later logging conguration. The vicfg-syslog command and editing conguration les is not supported
for ESXi 5.0 and can result in errors.
After making conguration changes, restart the vmsyslogd syslog service by running esxcli system syslog
reload.
The esxcli system syslog command allows you to congure the logging behavior of your ESXi system.
With vSphere 5.0, you can manage the top-level logger and subloggers. The command has the following
options.
Option Description
mark
Marks all logs with the specied string.
reload
Reloads the conguration, and updates any changed conguration values.
config get
Retrieves the current conguration.
config set
Sets the conguration. Use one of the following options.
n
--logdir=<path> – Saves logs to a given path.
n
--loghost=<host> – Sends logs to a given host.
n
--logdir-unique=<true|false> – Species whether the log should go to a unique
subdirectory of the directory specied in logdir.
n
--default-rotate=<int> – Default number of log rotations to keep.
n
--default-size=<int> – Size before rotating logs, in KB.
config logger list
Shows currently congured subloggers.
config logger set
Sets conguration options for a specic sublogger. Use one of the following options.
n
--id=<str> – ID of the logger to congure. Required.
n
--reset=<str> – Resets values to default.
n
--rotate=<long> – Number of rotated logs to keep for a specic logger. Requires --id.
n
--size=<long> – Size of logs before rotation for a specic logger, in KB. Requires --id.
Example: esxcli system syslog Usage
The following workow illustrates how you might use esxcli system syslog for log conguration. Specify
one of the options listed in “Connection Options for vCLI Host Management Commands,” on page 19 in
place of <conn_options>.
1 Show conguration options.
esxcli <conn_options> system syslog config get
Default Rotation Size: 1024
Default Rotations: 8
Log Output: /scratch/log
Logto Unique Subdirectory: false
Remote Host: <none>
2 Set all logs to keep twenty rotations before overwriting the oldest log.
esxcli <conn_options> system syslog config set --default-rotate=20
3 Set the rotation policy for VMkernel logs to 10 rotations, rotating at 2 MB.
esxcli <conn_options> system syslog config logger --id=vmkernel --size=2048 --rotate=10
Chapter 10 Monitoring ESXi Hosts
VMware, Inc. 165