How to use the Windows OneCLI to clear UEFI logs on a remote server
How to use the Windows OneCLI to clear UEFI logs on a remote server.
How to use the Windows OneCLI to clear UEFI logs on a remote server.
Description
This article will document how to use the Lenovo XClarity Essentials OneCLI to clear the UEFI event logs on a remote server. The UEFI event log or system event log will be filled up and stop recording with 512 entries. It is necessary from time to time to clear the logs depending on if the system has had any events or errors.
Applicable Systems
- ThinkSystem (Except HR330A, HR350A, HR630X,HR650X)
- ThinkServer
- System x
Requirements
- Users must have administrator or root privileges to run the XClarity Essentials OneCLI commands. XClarity Essentials OneCLI will not check user privileges while running, but some functions might not work correctly if the user is not an administrator or root.
- Workstation/Laptop with direct network access to the XCC/BMC/IMM/TSM on the server.
Solution
- Download the OneCLI utility from the following link: https://datacentersupport.lenovo.com/documents/LNVO-TCLI.
- Scroll down to find the appropriate operating system section for your environment.
- If using Windows, copy the .zip to a directory on the local hard drive.
- Extract the .zip file to a specified folder, OneCli.exe, and other package files will be extracted.
- Enter the OneCLI directory, and run the OneCli.exe command from the command line.
- Use administrator privileges to open a command prompt window. Press Windows key ==> type in CMD ==> Right-click on the Command Prompt Application and select Run As Administrator.
- Navigate to the directory where you extracted the OneCli Utility.(i.e. C:\XOneCli)
- logmgr command- Use the logmgr commands to display and clear the system event log and the IMM event log. The logmgr commands support in-band and out-of-band mode.
logmgr command syntax
- Command list:
showsel - Show System Event Logs
showbmclog - Show Baseboard Management Controller(BMC) Logs.
clearsel - Clear System Event Logs.
clearbmclog - Clear Baseboard Management Controller(BMC) Logs.
clearall - Clear Baseboard Management Controller(BMC) Logs and System Event Logs. - Options: Each logmr command has a few options to choose from; you can type --help to view them
--help - Displays help information for commands and then exits without executing the command.
- Connection options
--bmc - Specifies the BMC connection information. User credential and IP of Baseboard Management Controller(BMC). Usage: --bmc user:password@host[:port] or user@host[:port]
- You will need the following information to complete the OneCLI command on a remote system.
- Remote BMC IP Address
- Remote BMC Userid
- Remote BMC Password
In our example, we will use the Remote BMC IP Address 10.10.0.2, the Remote UserID USERID, and the Remote BMC Password PASSW0RD.
Note: Before running the clear command; it is recommended to run the logmgr showsel command and document any errors that may be present.
- To clear logs use the following command:
Example Output
c:\onecli>OneCli.exe misc logmgr clearsel --bmc USERID:PASSW0RD@10.10.0.2 Lenovo XClarity Essentials OneCLI lxce_onecli01a-2.4.1 Licensed Materials - Property of Lenovo (C) Copyright Lenovo Corp. 2013-2018 All Rights Reserved OneCLI License Agreement and OneCLI Legal Information can be found at the following location: "c:\onecli\Lic" If the parameters you input includes password, please Note that: * The password must consist of a sequence of characters from `0-9a-zA-Z_-+.$%@!^&*()=` set * Use "" to quote when password parameters include special characters * Do not use reserved characters in path name when parameter contains path start to clear SEL from system clear SEL Successfully!