New esxcli namespaces (incl. SMART disk monitoring)

With ESXi 5.1 there were several enhancements to the esxcli command that you can use in an ESXi shell, but also remotely, to get and set system configuration parameters.

You can now e.g.
  • configure VMkernel IPv4 and IPv6 network routes (esxcli network ip route ...)
  • configure SNMP (esxcli system snmp ...)
  • enter maintenance mode (esxcli system maintenanceMode) and shutdown/reboot the host (esxcli system shutdown)
  • check network core dump settings (esxcli system coredump network check) without actually forcing a core dump
  • configure the various VMkernel traffic types (management, vmotion, faultTolerance, iSCSI) (esxcli network ip interface tag)
Newly introduced esxcli namespaces allow to display
  • network statistics at the NIC, VLAN and VM port level (esxcli network nic statsesxcli network nic vlan statsesxcli network vm port stats)
  • storage adapter statistics for various protocols (esxcli storage san | fcoe | iscsi | sas)
And there is one new feature that is very interesting for home users that are concerned about the health of their SATA hard disks. ESXi 5.1 supports SAS and SATA disk monitoring via S.M.A.R.T. (Self-Monitoring, Alerting and Reporting Technology). This is primarily meant for SAS-/SATA-attached SSD disks, but also works with regular hard disks.

Here is how to display the S.M.A.R.T. counters with esxcli:
  1. Determine the device name(s) of your SATA hard disks (or SSDs) with
       esxcli storage core device list | grep Device
    The device names usually start with "t10.ATA__..."
  2. Now run
       esxcli storage core device smart get -d "t10.ATA__..."
    to display the counters for a specific disk.
Please note that you can also use esxcli commands remotely through PowerCLI. The following cmd-lets will do the trick:
# Connect to host (will prompt for username/password)
Connect-VIServer hostname

# Create EsxCli object
$esxcli = Get-EsxCLi

# List and format device list
$ | select Device,DeviceType | ft -AutoSize

# Get SMART counters for specific disk

# Disconnect from host
Disconnect-VIServer -Confirm:$false
All information provided here was taken from the VMworld 2012 session What’s New with vSphere 5.1 - ESXCLI & PowerCLI.

No comments:

Post a Comment

***** All comments will be moderated! *****
- Please post only comments or questions that are related to this post's contents!
- Advertising and link spamming will not be tolerated!