If you are running ESXi on Dell 12th or 13th generation servers, you might want to check the SMART status of your drives to monitor their health. For me, it’s when one of the RAID5 drives failed, and I wonder whether the other drives could fail soon. However, the standard SMART tools won’t work. After some investigation, I found a way to get the SMART raw data with perccli command.

TL, DR:

1
/opt/lsi/perccli/perccli64 /call/eall/sall show smart

This will print the raw SMART data in hex format. I haven’t found a good parser for this, just feed it to ChatGPT along with the drive model, and ask him to parse it for you.

Or, I asked CodeX to tailor smartctl to read from the hex blob and targets WASM. Try it yourself!

The Incident

A few days ago, I received an alert “iDRAC Status”, that says one of my drives had failed. I logged into iDRAC and saw it fell off the bus, then reconnected, and was then rebuilding. The SMART status was OK from the iDRAC web interface, but since the drive had fallen once, I asked now leaders of SAST to find spare drives and replace it soon.

One day later, I received another alert, the same drive failed during rebuild and was marked Failed. Again, I asked them to replace it ASAP. This time, I wanted to check the SMART status of ALL drives to see if any other drives were in danger of failing soon. They are all 10 years old.

The Investigation

iDRAC 8 doesn’t have detailed SMART status for drives, only a bollean value of whether the drive is healthy. ESXi can’t read SMART data from disks behind Dell PERC RAID controller, it can only get HBA disks’ SMART data. I searched and asked ChatGPT, with little progress.

Anyway, I knew there was storcli for LSI controllers, and I searched for ESXi version. (Google “storcli ESXi {version}” and you will find it). I installed it with difficulty (but anyway, I succeeded), but it didn’t work with Dell PERC controllers.

I then tried to use smartctl (sounds promising, right?) with -d megaraid,N option. We use this when we are running a regular Linux distribution. However, it actually didn’t work.

1
2
3
4
/opt/smartmontools/smartctl -a -d megaraid,0 /dev/disks/naa.xxx
smartctl 7.5 2025-04-30 r5714 [x86_64-linux-7.0.3] (local build) Copyright (C) 2002-25, Bruce Allen, Christian Franke, www.smartmontools.org

Smartctl open device: /dev/disks/naa.xxx [megaraid_disk_00] failed: can't get bus number

It looks like the required ioctl to get the bus number is not implemented in ESXi’s tailored kernel.

Then I found perccli, a Dell-specific version of storcli. The installation command looked like

1
esxcli software vib install -d /tmp/VMWare-perccli64_007.1910.zip --no-sig-check

Although the installation process exited with failure, saying that the backup boot bank was corrupt bla bla bla, it actually worked. I ran ln -s /opt/lsi/perccli64/perccli64 /bin/perccli64 so that I could run perccli64 directly.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
[root@esxi:~] perccli64 show
CLI Version = 007.1910.0000.0000 Oct 08, 2021
Operating system = VMkernel 7.0.3
Status Code = 0
Status = Success
Description = None

Number of Controllers = 1
Host Name = esxi.hera.net9.org
Operating System  = VMkernel 7.0.3
StoreLib IT Version = 07.2000.0200.0200
StoreLib IR3 Version = 16.14-0

System Overview :
===============

------------------------------------------------------------------------
Ctl Model        Ports PDs DGs DNOpt VDs VNOpt BBU sPR DS EHS ASOs Hlth
------------------------------------------------------------------------
  0 PERCH730Mini     8   7   3     0   3     0 Opt On  3  N      0 Opt
------------------------------------------------------------------------

Ctl=Controller Index|DGs=Drive groups|VDs=Virtual drives|Fld=Failed
PDs=Physical drives|DNOpt=Array NotOptimal|VNOpt=VD NotOptimal|Opt=Optimal
Msng=Missing|Dgd=Degraded|NdAtn=Need Attention|Unkwn=Unknown
sPR=Scheduled Patrol Read|DS=DimmerSwitch|EHS=Emergency Spare Drive
Y=Yes|N=No|ASOs=Advanced Software Options|BBU=Battery backup unit/CV
Hlth=Health|Safe=Safe-mode boot|CertProv-Certificate Provision mode
Chrg=Charging | MsngCbl=Cable Failure

I wasn’t trying to get SMART data at that time, actually. iDRAC was not responding and I was trying to directly access the PERC controller to get rebuild status. But when I typed perccli64 help, I saw there was a show smart command.

1
2
3
4
5
6
7
8
9
10
[root@esxi:~] perccli64 /c0/e32/s0 show smart
CLI Version = 007.1910.0000.0000 Oct 08, 2021
Operating system = VMkernel 7.0.3
Controller = 0
Status = Success
Description = Show Drive Smart Info Succeeded.

Smart Data Info /c0/e32/s0 =
01 00 05 32 00 64 64 25 00 00 00 00 00 00 09 32
... (512 bytes of hex SMART blob)

The Parser

But the output is raw hex, instead of human-readable, clean table of SMART attributes. I searched for an online parser, unfortunately, I couldn’t find any. I asked ChatGPT to find some, he couldn’t, either. But for now, I’ll list some suggenstions here:

  • Just feed the hex to ChatGPT and ask him to decode it. Optionally provide the drive model so he can find accurate attribute meanings.

  • Ask ChatGPT to generate a Python script to parse the hex blob into SMART attributes. Here’s one ChatGPT generated for me:

  • ChatGPT suggested that we may use skdump to parse the hex blob. It requires a libatasmart format blob. May be able to craft one from the hex data above, but I doubt if it is actually worth the effort.

  • My thoughts: maybe I can adjust smartctl to read from hex blob and print SMART data. Let’s try it with CodeX.

The Webtool

So I forked the smartmontools repo, and asked CodeX to help me modify smartctl to read from the hex blob above. He did this pretty well, and compiled it to WASM. Then I asked him to build a frontend web page to use this modified smartctl to parse the hex blob. The tool is now live at smart.aajax.top. Just paste device data and the hex blob into the textarea, and click “Parse SMART Data”, you will get a clean SMART attribute table.

See this link for an example input.