How to use the Linux OneCLI to clear UEFI logs on a remote server
How to use the Linux OneCLI to clear UEFI logs on a remote server
How to use the Linux OneCLI to clear UEFI logs on a remote server
Description
This article will introduce 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
- ThinkServer
- SystemX (Except HR330A, HR350A, HR630X,HR650X)
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
Complete the following steps to download, install, and use the OneCLI utility:
- 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.
Linux
The procedure to install the XClarity Essentials OneCLI for Linux is as follows:
- Copy the TGZ file to a directory on the local hard drive.
- Unzip and extract the OneCLI utility using the below command:
"tar zxvf [XClarity Essentials OneCLI distribution].tgz -C ", where [XClarity Essentials OneCLI distribution] .tgz is the downloaded .tgz, and -C is the folder where all the files will be extracted. Please ensure that sure that the target folder already exists, or you will need to create it.
- Once extraction is complete, navigate to where the utility was extracted and run the ./OneCli commands from the command line.
Note: It is required that users have root privilege to run the XClarity Essentials OneCLI commands. The XClarity Essentials OneCLI will not check the user privilege while running, some functions may not work correctly if the user is not root.
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 modes.
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).
user:password@host[:port] or user@host[:port]
- You will need the following information need to complete the OneCLI command on a remote system.
- Remote BMC IP Address
- Remote BMC Userid
- Remote BMC Password
In our example we will be using the Remote BMC IP Address of 10.10.0.2, the Remote Userid of USERID, and Remote BMC Password of PASSW0RD.
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 of the logmgr clearsel command output
Lenovo XClarity Essentials OneCLI lxce_onecli01v-2.5.0
(C) Lenovo 2013-2019 All Rights Reserved
OneCLI License Agreement and OneCLI Legal Information can be found at the following location:
"/LXCE/Lic"
start to clear SEL from system
clear SEL Successfully!
Success.