Skip to content

fboss2: add show reboot-cause and show reboot-cause history commands#1142

Open
arajeev-ARISTA wants to merge 1 commit into
facebook:mainfrom
arajeev-ARISTA:show-reboot-cause
Open

fboss2: add show reboot-cause and show reboot-cause history commands#1142
arajeev-ARISTA wants to merge 1 commit into
facebook:mainfrom
arajeev-ARISTA:show-reboot-cause

Conversation

@arajeev-ARISTA

@arajeev-ARISTA arajeev-ARISTA commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Pre-submission checklist

  • I've ran the linters locally and fixed lint errors related to the files I modified in this PR. You can install the linters by running pip install -r requirements-dev.txt && pre-commit install
  • pre-commit run

Summary

  • Adds fboss2 CLI commands to query the reboot_cause_service (port 5974):
    • show reboot-cause: displays the last reboot cause investigation result
    • show reboot-cause history: displays all persisted reboot cause results
  • Includes model.thrift for display types, command handlers, CmdList registration, and CliFboss2.cmake build wiring

Dependency: #1141 — platform: add reboot cause service with persistent history; required for the CLI commands to function

Test Plan

Verified fboss2 show reboot-cause and fboss2 show reboot-cause history outputs:

[root@vpr428 ~]# fboss2 show reboot-cause
PSU AC Loss [Provider: MERU800BIA_SMB_CPLD, Time: 04-29-2026 06:16:55.000]
[root@vpr428 ~]#
[root@vpr428 ~]# fboss2 show reboot-cause history
Collection Time         Description                     Provider                Cause Time
----------------------------------------------------------------------------------------
04-29-2026 06:22:12     PSU AC Loss                     MERU800BIA_SMB_CPLD     04-29-2026 06:16:55.000
04-29-2026 06:15:08     PSU AC Loss                     MERU800BIA_SMB_CPLD     04-29-2026 06:06:03.000
Adds fboss2 CLI commands to query the reboot_cause_service (port 5974):
  - `show reboot-cause`: displays the last reboot cause investigation result
  - `show reboot-cause history`: displays all persisted reboot cause results

Includes model.thrift for display types, command handlers, CmdList
registration, and CliFboss2.cmake build wiring.

Change-Id: I331d56613a240561201da920c9906210b5fee40e
@arajeev-ARISTA arajeev-ARISTA requested review from a team as code owners April 29, 2026 14:44
@meta-cla meta-cla Bot added the CLA Signed label Apr 29, 2026
@meta-codesync

meta-codesync Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

@somasun has imported this pull request. If you are a Meta employee, you can view this in D109752077.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

1 participant