Ran into a reoccurring issue with Dell servers showing amber lights on the systems. When using Dell Server Administrator to research the errors it was found the Hardware logs were full. The only way we know how to get rid of the alert and clear the logs was by using Dell Server Administrator interface and manually clearing the log. This got me thinking on how can we automate this to occur manually on a monthly basis using a scheduled task.
With a bit of digging on Dell’s support site I came across Dell Server Administrator 6.5 Command Line PDF.
OpenManage Server Administrator supports:
- Displaying and configuring BIOS settings for all supported platforms
- Latest version of vendor libraries
- Configuring boot order and adding or removing devices from the boot list using CLI
- SHA 256 certificate authentication
- Installing OMSA on Linux with specific packages, according to its distribution, version, or architecture
- Trusted Cryptographic Module (TCM)
- Power management of physical disks attached to the controller
- Writing the encryption parameters of the controller
- Displaying vFlash type and available size in vFlash media details
- Displaying Network Interface Controller (NIC) Team interface properties in omreport chassis command
- Displaying slot details in omreport controller command
For this post I am only addressing the omconfig command to clear the logs to address the issue. Since finding the command and the capabilities I will be looking at automating more and configuring servers.
To get more information on the command and the syntax open a command prompt and type omconfig /? which will display command level 1. Expand the help by typing omconfig system /? for help on the next command level.
C:\>omconfig /? omconfig Configures component properties. The available command(s) are: Command Description about Product and version properties. preferences Set system preferences. system Set system properties. chassis Set chassis component properties. storage Set storage component properties. Usage: omconfig [name=value...] ... [option...] Valid command line options are: -? Print available command(s) or command help. -fmt Format for output results, default is lst. Where: lst List format. xml Raw XML format. -outc Redirect output to file, delete old if exists. OR -outa Redirect output to file, append to old if exists. OR Output may also be redirected using Operating System facilities (e.g. |more).
The command 2 piece that holds logs is system. The three logs Hardware (esmlog), Alerts (alertlog) and Command (cmdlog) are contained within this command reference. Running omconfig system esmlog /? shows action=clear as a valid parameter for clearing the log. This holds true to the other two logs, so our end command is:
omconfig system esmlog action=clear
omconfig system alertlog action=clear
omconfig system cmdlog action=clear
To complete the automation take the commands and open Notepad or your favorite editor and save it in a location as a cmd file. Create a scheduled task to run the cmd file on a monthly basis and you will have one less amber light.