Skip to content

Both.org

News, Opinion, Tutorials, and Community for Linux Users and SysAdmins

Primary Menu
  • About Us
  • Computers 101
    • Hardware 101
    • Operating Systems 101
  • End of 10 Events
    • Wake Forest, NC, — 2025-09-20
  • Linux
    • Why I use Linux
    • The real reason we use Linux
  • My Linux Books
    • systemd for Linux SysAdmins
    • Using and Administering Linux – Zero to SysAdmin: 2nd Edition
    • The Linux Philosophy for SysAdmins
    • Linux for Small Business Owners
    • Errata
      • Errata for The Linux Philosophy for SysAdmins
      • Errata for Using and Administering Linux — 1st Edition
      • Errata for Using and Administering Linux — 2nd Edition
  • Open Source Resources
    • What is Open Source?
    • What is Linux?
    • What is Open Source Software?
    • The Open Source Way
  • Write for us
    • Submission and Style guide
    • Advertising statement
  • Downloads
  • Home
  • How I used journalctl to Determine the Source of an Electrical Problem
  • systemd

How I used journalctl to Determine the Source of an Electrical Problem

The journalctl command can extract interesting data from the systemd journals. I never thought it could help with hardware electrical problems - until I tried it.
David Both January 9, 2024 5 minutes read
a computer power supply from inside a desktop or tower PC case

a computer power supply from inside a desktop or tower PC case

Image by: freeimageslive.co.uk CC-by-SA 4.0

The journalctl command can extract interesting data from the systemd journals. I never thought it could help with hardware electrical problems – until I tried it.

I have a home computer lab with an almost constant inventory of 12 computers that includes laptops, towers, and a MasterFrame 700 that keeps all its components in view. With all those computers failures of various types are a fact of life. Of course that’s what we SysAdmins live for – right?

One of my tower systems needed a new 200mm top fan as the old one was making end-of-life rattles. I powered it off and pulled it out of its location on the shelf. I usually make the easy repairs like fan replacement with the computer in-place and connected because it’s less work than disconnecting everything in order to move it to a workbench.

I had replaced the defective fan and restarted the system to do some initial testing but it powered off a few seconds before the startup process was finished.

Problem Determination

Because a couple of the external cables were a bit tight, I removed all except the power cord and then connected the host to one of the testing harnesses connected to my KVM switch. I tried powering on again and – quite surprisingly – it completed startup and just sat there running as if nothing were wrong. So the problem was in one of the external connections.

I needed more information. Knowing how much is available from the systemd journalling system, I decided to check the journal. The failure was during startup so the old dmesg command would have giving me information about the most recent boot but not previous ones. That information is buried in the logs and the systemd journal. Just working my way through the logs or journal could take a significant chunk of time out of my day.

However, the journalctl command gives us an elegant method for locating this information. The command in Figure 1 uses some options that cut down the need to search through thousands of lines of log and journal entries. The -b -1 option tells journalctl to display data from the previous boot and not the current one. The –dmesg option informs the command to display only the messages usually displayed by the dmesg command. Finally, -o short-monotonic, tells journalctl to show the timestamps as seconds from initiation of the startup process.

I did still need to search a bit but the error was in red and easy to find.

root@host:~# journalctl -b -1 --dmesg -o short-monotonic

[  119.859917] host.both.org kernel: usb usb2-port2: over-current condition
[  120.067916] host.both.org kernel: usb usb2-port6: over-current condition
[  120.466905] host.both.org kernel: usb usb1-port6: over-current condition
[  120.593902] host.both.org kernel: usb usb1-port14: over-current condition
[  120.723897] host.both.org kernel: usb usb1-port2: over-current condition

Figure 1: Results from the journalctl command pointed me in the right direction.

This data shows that at about 120 seconds into the Linux startup sequence an over-current condition was detected on one of the USB ports. This is a typical electrical short circuit. The list above shows the source via the USB hubs. I could have followed this using a command like lsusb but it was easiest to start with a check of the external USB cables.

I found that the host had an external USB cable connecting to a small 4-port hub where the keyboard and mouse were plugged in. The connector from the host at the external hub had been pulled from its normal straight configuration into a broken 90-degree configuration and the bare wires were showing. I disconnected that cable and powered up successfully. I was also removing the devices from the hub and connecting it directly into my 16-port KVM switch so that hub was no longer needed in any event. Had I not been doing that a new cable would have solved the problem.

I cut the ends off the defective cable and tossed it into my recycling box.

Conclusion

The amount and type of information that can be provided by systemd via the journal still surprises me. It could have taken me a significant amount of time to locate the source of this problem if the data from the journal had not pointed me in the right direction. This incident has reminded me of the vast amounts of information collected by the systemd journal and that I need to remember to utilize it.

Another thing to note from this is that just because there is a power problem, the power supply is not always at fault. That’s where I would have started looking in the past.

I plan to use longer cables instead of ones at the limits of their length. I most certainly caused the cable damage when I pulled the computer out of its normal location instead of disconnecting it first and connecting it to the KVM cable.

Tags: journalctl Power problem Problem Determination

Post navigation

Previous: Teaching technical writing with open source
Next: A user’s guide to links in the Linux filesystem

Related Stories

systemd-for-SysAdmins-Cover-01
  • Advanced
  • Command Line
  • Linux
  • System Administration
  • systemd

Manage multiple service instances with systemctl

Alan Formy-Duval August 18, 2025
osdc_terminals_0
  • Linux
  • Startup
  • systemd
  • SystemV

About those livesys error messages

David Both July 11, 2025
Network components
  • systemd

5 reasons to love systemd

Seth Kenlon February 14, 2025

Random Quote

Those who don’t understand Unix are condemned to reinvent it, poorly.

— Henry Spencer

Why I’ve Never Used Windows

On February 12 I gave a presentation at the Triangle Linux Users Group (TriLUG) about why I use Linux and why I’ve never used Windows.

Here’s the link to the video: https://www.youtube.com/live/uCK_haOXPFM 

Why there’s no such thing as AI

Last October at All Things Open (ATO) I was interviewed by Jason Hibbits of We Love Open Source. It’s posted in the article “Why today’s AI isn’t intelligent (yet)“.

Technically We Write — Our Partner Site

Our partner site, Technically We Write, has published a number of articles from several contributors to Both.org. Check them out.

Technically We Write is a community of technical writers, technical editors, copyeditors, web content writers, and all other roles in technical communication.

Subscribe to Both.org

To comment on articles, you must have an account.

Send your desired user ID, first and last name, and an email address for login (this must be the same email address used to register) to subscribe@both.org with “Subscribe” as the subject line.

You’ll receive a confirmation of your subscription with your initial password as soon as we are able to process it.

Administration

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

License and AI Statements

Both.org aims to publish everything under a Creative Commons Attribution ShareAlike license. Some items may be published under a different license. You are responsible to verify permissions before reusing content from this website.

The opinions expressed are those of the individual authors, not Both.org.

You may not use this content to train AI.

 

Advertising Statement

Both.org does not sell advertising on this website.


Advertising may keep most websites running—but at Both.org, we’re committed to keeping our corner of the web ad-free. Both.org does not sell advertising on the website. Nor do we offer sponsored articles at this time. We’ll update this page if our position on sponsorships changes.

We want to be open about how the website is funded. Both.org is supported entirely by David Both and a few other dedicated individuals.

 

 

Copyright © All rights reserved. | MoreNews by AF themes.