Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help diagnose why a machine went down unexpectedly #12947

Open
garrett opened this issue Oct 9, 2019 · 6 comments
Open

Help diagnose why a machine went down unexpectedly #12947

garrett opened this issue Oct 9, 2019 · 6 comments

Comments

@garrett
Copy link
Member

garrett commented Oct 9, 2019

Cockpit should help someone diagnose why a machine unexpectedly went down.

  1. Unclean shutdown happens (system crash, intentional power cycle, power outage, etc.)
  2. Computer boots
  3. User logs into Cockpit
  4. Cockpit shows that the computer was shutdown unexpectedly
  5. Cockpit provides a way to figure out what happened

My initial thought would be to:

  • add a notice about the unexpected shutdown
  • provide a link to the logs page that shows the previous system boot, sorted with the last entries at the top

While this wouldn't outright solve the problem, it would be a good way to at least let someone know that the system crashed and provide a minimal possible way to start debugging the issue.

@garrett
Copy link
Member Author

garrett commented Oct 9, 2019

I think the health area in my recent system overview mockup would be ideal for this.

system-overview

@garrett
Copy link
Member Author

garrett commented Oct 9, 2019

This issue inspired by Nate Willis @ https://mastodon.social/@n8/102926615541596505

After talking with @andreasn about this topic earlier today, he pointed out some somewhat possible relevant links that might let us do even more than just point to last boot's logs:

@martinpitt
Copy link
Member

last -Fxn2 shutdown reboot is actually quite nice for that. Clean boot:

reboot   system boot  6.1.6-200.fc37.x Fri Jan 20 06:27:18 2023   still running
shutdown system down  6.1.6-200.fc37.x Fri Jan 20 05:51:06 2023 - Fri Jan 20 06:27:18 2023  (00:36)

and after reboot -ff:

reboot   system boot  6.1.6-200.fc37.x Fri Jan 20 06:28:59 2023   still running
reboot   system boot  6.1.6-200.fc37.x Fri Jan 20 06:27:18 2023   still running

i.e. we can check if the output has any ^shutdown line. Of course that's just for hard reboots -- if there was some less major trouble during shutdown, that would not show it. Nevertheless this is actually quite easy to implement in the health card, and it could lead to the Logs page for the previous boot.

@martinpitt martinpitt added good-first-issue Appropriate for new contributors page:overview and removed review-2022-12 labels Jan 20, 2023
@garrett
Copy link
Member Author

garrett commented Mar 2, 2023

It could be as something as simple as an entry in the health card.

Icon could be pf-icon-off (circle with vertical line inside, indicating power off). It'd be grey. It's not an error or a warning, necessarily... even though it could be. But it's something that could've happened due to power loss, someone tripping over a cord, or a crash or some other reason, and there's no way to know for sure.

It should probably be dismissable too.

Rough mockup would be something like this:

health-shutdown-unclean excalidraw

@Deeppjp116
Copy link

Hello,

I'm Deep. I'm interested in working on this issue. Could you please explain the problem and guide me on setting up the repository on my computer? I'm eager to contribute and give my best effort to resolve this. This will be my first valuable contribution. Thank you for giving me this opportunity.

@garrett
Copy link
Member Author

garrett commented Jun 12, 2023

This issue is self-explanatory. It's detailed at the top of the issue. Show when a machine was recently shut down unexpectedly (like a crash or a power outage, for example).

Setting up Cockpit for development is detailed on our website:

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

No branches or pull requests

4 participants