When managing HP server storage arrays, monitoring physical disk health is crucial. The HP Array Configuration Utility CLI (hpacucli.exe) provides powerful commands to extract this information for scripting purposes.
The fundamental command to list all physical disks is:
hpacucli ctrl all show config detail
This outputs detailed information about all controllers and their physical disks.
To capture the output to a file for later analysis:
hpacucli ctrl all show config detail > disk_status.txt
For parsing-friendly output, use:
hpacucli ctrl all show config detail | find "physicaldrive" > physical_drives.txt
To check only failed or failing drives:
hpacucli ctrl all show config detail | findstr /C:"Failed" /C:"Failure" > alert_drives.txt
Here's a PowerShell script that logs disk status with timestamps:
$timestamp = Get-Date -Format "yyyyMMdd-HHmmss" $outputFile = "DiskStatus_$timestamp.log" hpacucli ctrl all show config detail | Out-File -FilePath $outputFile
- OK: Healthy disk
- Failed: Complete disk failure
- Failure predicted: SMART error detected
- Rebuilding: Disk being reconstructed
- Missing: Physically absent disk
Create a scheduled task in Windows to run daily checks:
schtasks /create /tn "Daily Disk Check" /tr "hpacucli ctrl all show config detail > C:\logs\diskcheck.log" /sc daily /st 23:00
The HP Array Configuration Utility Command Line Interface (hpacucli.exe) is a powerful tool for managing RAID configurations on HP servers. One common task is extracting physical disk status information for monitoring or troubleshooting purposes. Here's how to accomplish this efficiently.
The simplest way to get physical disk information is:
hpacucli ctrl all show config detail
This command displays detailed information about all controllers and their connected physical disks.
To capture the output to a file for later analysis:
hpacucli ctrl all show config detail > disk_status.txt
For more structured output that's easier to parse:
hpacucli ctrl all show config detail | find "physicaldrive" > disk_status_filtered.txt
To specifically check disk health status:
hpacucli ctrl all show config | find "physicaldrive" | find /i "failure"
This will show only disks with failure-related statuses.
Here's a batch script example to log disk status with timestamps:
@echo off
set LOGFILE=disk_monitor_%date:~-4,4%%date:~-10,2%%date:~-7,2%.log
echo %date% %time% >> %LOGFILE%
hpacucli ctrl all show config detail >> %LOGFILE%
echo. >> %LOGFILE%
Key status messages to look for:
- OK: Disk functioning normally
- Failed: Disk has failed and needs replacement
- Failure predicted: SMART errors detected, failure likely
- Rebuilding: Disk is being rebuilt in the array
- Missing: Disk not detected by controller
For more advanced processing, use PowerShell:
$output = & "hpacucli.exe" "ctrl all show config detail"
$output | Out-File -FilePath "disk_status_$(Get-Date -Format 'yyyyMMdd').txt"
If you encounter "No controllers detected", ensure:
- The HP ACU service is running
- You're running as Administrator
- The server has HP Smart Array controllers