frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Ask HN: What are some Linux tools to diagnose a system which keeps hanging?

2•chbkall•7h ago
I have a laptop which runs Ubuntu. After running for a while (sometimes 5-10 mins, sometimes more), the system hangs and stops responding to keyboard or mouse inputs. Before I open the system up or take them to a technician who can look at the hardware issues, I was wondering if there are ways I can diagnose the system using linux tools. Can the issue happen due to bad blocks in the partition? The issue started after I used fdisk on the hard drive? Are there ways to confirm this?

Comments

davydm•6h ago
first, I'd watch dmesg from boot, to see if something useful pops up:

open a console and type

watch -n 1 "dmesg | tail -n 40"

to watch the last 40 lines that are reported by dmesg (some distros will require you by default to be root to do this, so if you get an error, try that)

Also, you may find information in system logs:

A traditional (non-systemd) distro will store text files under /var/log - often /var/log/messages is what you're looking for - you can watch the tail as above:

tail -f -n 40 /var/log/messages

If your system is running systemd, you would do:

journalctl -f -n 40

(again, you may need to be root to do this)

I recently had lockups that seem to have been thermal in nature - there weren't a lot of related messages - just once I saw something about hitting thermal limit, but that was a bit before the lock-up, so I dismissed it as just the behavior of modern cpus which run full-tilt until they reach thermal throttling. The machine was sent in for repair and had liquid metal thermal paste re-applied, and temps are down by about 10 degrees - really not that much, and temps are still sitting in the 90s, but so far, over the last 1.5 days, no lockup, but I'd need to run for a while longer to verify.

Bender•6h ago
- Have you switched to a console screen vs X (control+alt+F1) to see if its actually X that is hanging and not the OS? Hanging 5 to 10 mins after using fdisk sounds like a red herring. If you are able to do this check dmesg. Just type dmesg. Then tac /var/log/Xorg.0.log | less

- Do you have sys-rq enabled and if so does the system respond to an emergency sync then emergency dismount then emergency reboot? [0] sysctl kernel.sysrq

- If you switch to run level 2 does this still occur? [1]

- Is there anything interesting in syslog messages in /var/log? Most notably Xorg.0.log and messages

- Do you have lm-sensors installed to watch temperature? sensors | grep -Ei ^temp Also check the temp of your drives smartctl -x /dev/sda | grep -Ei ^temp assuming your drive is sda. OpenIPMI can also get this data and fan speeds. If its hot do you have a dog or cat or something else that sheds hair? If so you may have to power it off, remove battery, open it up, use non metallic attachment on vacuum to remove hair, then compressed air, then vacuum again with non metallic attachment.

That would be my starting point. It could go a million directions from there.

[0] - https://en.wikipedia.org/wiki/Magic_SysRq_key

[1] - https://www.tecmint.com/change-runlevels-targets-in-systemd/

electricant•5h ago
Happened to me on what, if I recall correctly, was a thinkpad t61. In the end it was due to outdated BIOS. Updating it stopped the PC from hanging up.

Perhaps check that your BIOS is the latest version first.

And by the way run also a scan of the RAM with memtest.

North America's Oldest Known Pterosaur

https://www.si.edu/newsdesk/releases/smithsonian-led-team-discovers-north-americas-oldest-known-pterosaur
1•gmays•1m ago•0 comments

The Consultation by Zac Smith

https://xraylitmag.com/the-consultation-by-zac-smith/fiction/
1•greenie_beans•2m ago•0 comments

Show HN: Ruby on Rails tutorial running in the browser

https://rails-tutorial.evilmartians.io/
1•palkan•2m ago•0 comments

Meta trial becomes test of board culpability over corporate scandals

https://www.ft.com/content/19a5187f-1026-4559-a5bd-a04e1e255973
2•1vuio0pswjnm7•3m ago•0 comments

Energy leaders and tech titans attend CMU AI Energy summit, $90B in investments

https://www.post-gazette.com/business/tech-news/2025/07/15/pittsburgh-energy-ai-summit-updates/stories/202507150037
1•rmason•3m ago•0 comments

Fed Chair Contender Is Now in Favor of Cutting Rates

https://www.bloomberg.com/news/articles/2025-07-15/trump-fed-chair-contender-kevin-warsh-ready-to-cut-interest-rates
1•wslh•5m ago•1 comments

Learn to build a production ready MCP server with Node.js

https://aisearch.vpuna.com/docs/learn/mcp-how-to
1•vpuna•6m ago•0 comments

Giving AWS Q Developer CLI a second look

https://chrisebert.net/giving-aws-q-developer-cli-a-second-look/
1•rmason•7m ago•0 comments

Ask HN: What should be included in a standard library?

1•vodou•8m ago•0 comments

Edgerton: a DIY High-Speed LED Flash

https://td0g.ca/2019/05/14/edgerton-a-high-speed-led-flash-diy/
1•_Microft•10m ago•0 comments

Show HN: Flowrite – Why I built a songwriting app instead of paying subs

https://github.com/pi22by7/flowrite
1•pi_22by7•11m ago•0 comments

LibreOffice Office Suite Lands Built-In Support for Bitcoin Currency

https://www.phoronix.com/news/LibreOffice-Bitcoin-BTC-Format
1•mikece•11m ago•0 comments

Work Requirements – An Ineffective Policy

https://www.nominalnews.com/p/work-requirements-ineffective-policy
3•MPLan•14m ago•1 comments

America's only rare earth producer gets a boost from Apple Pentagon agreements

https://www.independent.co.uk/news/world/americas/apple-pentagon-china-donald-trump-america-b2789602.html
1•Bluestein•14m ago•0 comments

AI coding may not be helping as much as you think

https://garymarcus.substack.com/p/breaking-news-ai-coding-may-not-be
15•tu7001•16m ago•5 comments

Meta shareholders look to haul CEO Mark Zuckerberg, Sheryl Sandberg to court

https://nypost.com/2025/07/15/business/meta-shareholders-aim-to-haul-ceo-mark-zuckerberg-sheryl-sandberg-to-court/
4•1vuio0pswjnm7•17m ago•0 comments

Trying Guix: A Nixer's Impressions

https://tazj.in/blog/trying-guix
1•tkz1312•19m ago•0 comments

Study finds AI tools made open source software developers 19 percent slower

https://arstechnica.com/ai/2025/07/study-finds-ai-tools-made-open-source-software-developers-19-percent-slower/
1•samizdis•22m ago•0 comments

Billions of Edges per Second with Postgres

https://onesparse.com/blog/2025/07/01/billions-of-edges-per-second-with-postgres.html
2•kiwicopple•23m ago•0 comments

Ask HN: Let's learn more about each one, shall we?

2•FerkiHN•26m ago•2 comments

The Randolph Public Telephone Operating Company

https://randtel.co/
1•agwa•30m ago•0 comments

.NET 10 Preview 6 is now available

https://devblogs.microsoft.com/dotnet/dotnet-10-preview-6/
2•Metalnem•30m ago•0 comments

Meta announces new data centers, gobble up millions of gallons of water per day

https://www.engadget.com/ai/meta-announces-huge-new-data-centers-but-they-could-gobble-up-millions-of-gallons-of-water-per-day-174000478.html
14•ksec•31m ago•20 comments

Southwest U.S. Drought Relief Unlikely, Study Finds

https://www.miragenews.com/southwest-us-drought-relief-unlikely-study-finds-1496928/
3•geox•31m ago•0 comments

Benchmarking AMD GPUs: bare-metal, containers, partitions

https://dstack.ai/blog/benchmark-amd-containers-and-partitions/
1•cheptsov•32m ago•0 comments

Backstage Is at the Peak of Its Hype

https://earthly.dev/blog/backstage-is-at-peak-hype/
1•ingve•32m ago•0 comments

Show HN: Beyond Z²+C, Plot Any Fractal

https://www.juliascope.com/
13•akunzler•38m ago•3 comments

Haiku July

https://incidentalcomics.substack.com/p/in-the-act-of-happening
2•herbertl•39m ago•0 comments

Hedgehog topological defects in 3D amorphous solids

https://www.nature.com/articles/s41467-025-61103-7
1•PaulHoule•40m ago•0 comments

Show HN: Sapient – Agentic Game Development in Unreal Engine (C++, BPs, BTs)

https://www.sapientstudio.com/
4•GreedIsland•42m ago•0 comments