Skip to content

Commit 19aa3b6

Browse files
authored
Merge pull request #177 from DMTF/Fix176-SEL-Tool
Added 'rf_sel.py' script to simplify the ability for a user to find the SEL on a service
2 parents 3aa4421 + 7df58a0 commit 19aa3b6

File tree

6 files changed

+317
-95
lines changed

6 files changed

+317
-95
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,15 @@ You may install the external modules by running:
6161
* [Sensor List (rf_sensor_list.py)](https://github.com/DMTF/Redfish-Tacklebox/blob/main/docs/rf_sensor_list.md)
6262
* [System Inventory (rf_sys_inventory.py)](https://github.com/DMTF/Redfish-Tacklebox/blob/main/docs/rf_sys_inventory.md)
6363
* [Logs (rf_logs.py)](https://github.com/DMTF/Redfish-Tacklebox/blob/main/docs/rf_logs.md)
64+
* [SEL (rf_sel.py)](https://github.com/DMTF/Redfish-Tacklebox/blob/main/docs/rf_sel.md)
6465
* [Power/Reset (rf_power_reset.py)](https://github.com/DMTF/Redfish-Tacklebox/blob/main/docs/rf_power_reset.md)
6566
* [Boot Override (rf_boot_override.py)](https://github.com/DMTF/Redfish-Tacklebox/blob/main/docs/rf_boot_override.md)
6667
* [Virtual Media (rf_virtual_media.py)](https://github.com/DMTF/Redfish-Tacklebox/blob/main/docs/rf_virtual_media.md)
6768
* [BIOS Settings (rf_bios_settings.py)](https://github.com/DMTF/Redfish-Tacklebox/blob/main/docs/rf_bios_settings.md)
6869
* [Manager Configuration (rf_manager_config.py)](https://github.com/DMTF/Redfish-Tacklebox/blob/main/docs/rf_manager_config.md)
6970
* [Accounts (rf_accounts.py)](https://github.com/DMTF/Redfish-Tacklebox/blob/main/docs/rf_accounts.md)
7071
* [Update (rf_update.py)](https://github.com/DMTF/Redfish-Tacklebox/blob/main/docs/rf_update.md)
72+
* [Firmware Inventory (rf_firmware_inventory.py)](https://github.com/DMTF/Redfish-Tacklebox/blob/main/docs/rf_firmware_inventory.md)
7173
* [Event Service (rf_event_service.py)](https://github.com/DMTF/Redfish-Tacklebox/blob/main/docs/rf_event_service.md)
7274
* [Licenses (rf_licenses.py)](https://github.com/DMTF/Redfish-Tacklebox/blob/main/docs/rf_licenses.md)
7375
* [Certificates (rf_certificates.py)](https://github.com/DMTF/Redfish-Tacklebox/blob/main/docs/rf_certificates.md)

docs/rf_sel.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# SEL (rf_sel.py)
2+
3+
Copyright 2019-2025 DMTF. All rights reserved.
4+
5+
## About
6+
7+
A tool to manage the SEL on a Redfish service.
8+
9+
## Usage
10+
11+
```
12+
usage: rf_sel.py [-h] --user USER --password PASSWORD --rhost RHOST
13+
[--details] [--clear] [--debug]
14+
15+
A tool to manage the SEL on a Redfish service
16+
17+
required arguments:
18+
--user USER, -u USER The user name for authentication
19+
--password PASSWORD, -p PASSWORD
20+
The password for authentication
21+
--rhost RHOST, -r RHOST
22+
The address of the Redfish service (with scheme)
23+
24+
optional arguments:
25+
-h, --help show this help message and exit
26+
--details, -details Indicates details to be shown for each log entry
27+
--clear, -clear Indicates if the log should be cleared
28+
--debug Creates debug file showing HTTP traces and exceptions
29+
```
30+
31+
The tool will log into the service specified by the *rhost* argument using the credentials provided by the *user* and *password* arguments.
32+
It will then attempt to locate the SEL via the following logic:
33+
34+
* It will iterate through each log service found in each manager and each system.
35+
* The first log service found where `LogEntryType` contains `SEL` is considered the SEL for the service.
36+
37+
Once the SEL is found, the tool will either perform the `ClearLog` action if *clear* is provided, or read and display the log entries.
38+
39+
Example:
40+
41+
```
42+
$ rf_sel.py -u root -p root -r https://192.168.1.100
43+
Id | Timestamp | Message
44+
1 | 2012-03-07T14:44:00Z | System May be Melting
45+
```

redfish_utilities/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
from .licenses import delete_license
3434
from .logs import log_container
3535
from .logs import diagnostic_data_types
36+
from .logs import get_log_service_ids
37+
from .logs import get_log_service
3638
from .logs import get_log_entries
3739
from .logs import print_log_entries
3840
from .logs import clear_log_entries
@@ -138,6 +140,8 @@
138140
"delete_license",
139141
"log_container",
140142
"diagnostic_data_types",
143+
"get_log_service_ids",
144+
"get_log_service",
141145
"get_log_entries",
142146
"print_log_entries",
143147
"clear_log_entries",

0 commit comments

Comments
 (0)