tripplehelix, (edited )
@tripplehelix@fosstodon.org avatar

On the #Linux #Terminal, is there a way to list all #systemctl issues? For example, show the number of and which #services have issues, the same way cockpit does in the web interface?


Answer via @kura

systemctl list-units --state failed

You can find all states with

systemctl list-units --state help

or via @luap

systemctl --failed

kura,
@kura@noc.social avatar

@tripplehelix

systemctl list-units --state failed

tripplehelix,
@tripplehelix@fosstodon.org avatar

@kura I should just message you with any questions lol!

kura,
@kura@noc.social avatar

@tripplehelix FYI you can ask it for any of systemd's states. A list of states can be seen with;

systemctl list-units --state help

tripplehelix,
@tripplehelix@fosstodon.org avatar

@kura First thing I tried after you answered, very useful to know.

I'm quite new to manipulating systemd via the command line, I understand viewing logs via journal, statuses, stopping, starting, restarting. Recently converted my crontab to systemd timers. Decided to learn how to find issues today.

kura,
@kura@noc.social avatar

@tripplehelix fair. Systemd has a lot of functionality, some of it I'd consider pretty good like timers and I really like journald. It's also so much simpler to write a program that is run by systemd and logs to journald.

We use it for a ton of stuff at work so had to get good at debugging it.

tripplehelix,
@tripplehelix@fosstodon.org avatar

@kura It's very confusing at first. It's like git, once you know how it all fits together and what commands to use it's quite simple.

kura,
@kura@noc.social avatar

@tripplehelix I still find some of the stuff confusing, like how it all fits together.

I had a DNS issue with a local machine a while back where resolv.conf was pointing at systemd, but systemd had no DNS configuration that I could find. I forget what it was in the end but it took me ages to figure it out.

tripplehelix,
@tripplehelix@fosstodon.org avatar

@kura Oh gosh, networking is all over the place. First thing you've got to figure out is what your system is using for its network stack. Raspberry Pi OS used to be simple, it was all in wpa_supplicant.conf, then they changed it to be more inline with Debian in their latest release. Never install cockpit-* as it'll switch your network stack if it's not inline with fedoras.

Then audio configuration is a disaster!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • linux
  • GTA5RPClips
  • DreamBathrooms
  • InstantRegret
  • magazineikmin
  • thenastyranch
  • ngwrru68w68
  • Youngstown
  • everett
  • slotface
  • rosin
  • ethstaker
  • Durango
  • kavyap
  • cubers
  • provamag3
  • modclub
  • mdbf
  • khanakhh
  • vwfavf
  • osvaldo12
  • cisconetworking
  • tester
  • Leos
  • tacticalgear
  • anitta
  • normalnudes
  • megavids
  • JUstTest
  • All magazines