LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-24-2007, 05:02 AM   #1
kinetic
Member
 
Registered: Aug 2007
Location: Fort Collins, Colorado
Distribution: Gentoo
Posts: 64

Rep: Reputation: 17
Random freezes - How do I know whats going on?


Hi everybody!

I've been using linux for a good while now and I've noticed that every so often my laptop freezes for no apparent reason. The screen stays basically the same, but I can't move the mouse and I can't ping it from another computer. There are some strange faint green lines that appear but nothing too noticable.

This doesn't happen very often... only every once in a while, but one of these times I'm going to be doing something important and its going to send me into a fit of rage that will probably destroy my laptop once and for all .

The main problem is... I can't figure out why it happens. I don't know if its software related, hardware related, or a combination of the two, and the log files don't seem to say anything relevant before the lockups occur. Is there a way to increase the logging of EVERYTHING so that I might be able to find out the reason these lockups keep happening?

Comments/Suggestions are highly appreciated
 
Old 10-24-2007, 05:32 AM   #2
Tischbein
Member
 
Registered: Oct 2006
Distribution: debian
Posts: 124

Rep: Reputation: 15
I don't know about logging everything but you can alter the threshold for kernel log messages. I'm not sitting in front of a linux machine at present (shame! - but it is still a Unix box) but a short google points to the /etc/default/klogd config file and syntax of the form

KLOGD="-x -c 1"

But you'd have to google it a bit more and find the options you need. I haven't played with this recently so I can't remember off the top of my head. Are you already looking at the /proc/kmsg file? I can't remember whether the threshold is for messages being placed in /proc/kmsg or whether the threshold is that at which messages get pulled from there into the main system log. Sorry!

Regards, Emsbein
 
Old 10-24-2007, 06:02 AM   #3
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
One of the easiest (not necessarily the best..) ways of finding out what your machine is doing is to use something like Ksysguard (there is a broadly similar Gnome app too). You'd have to start the monitoring app before you have the problem and flick over too it as soon as you can once the problem has occurred, but that's likely to be good if the problem is massive memory usage.

If the problem is one app taking all of the processor time, its going to be harder, because there is the difficulty of getting data while the processor is maxed out, and while something like ksysguard could work in principle, in practise you'll probably miss the peak.

Top is often more useful, but again there is the problem of getting it launched while the processor is maxed out. Running top continuously might be good if the spike happens to come along at the right time. You could try running top maximised but behind whatever window you are actually interacting with (or alongside, if you have the screen real estate....or on your second monitor if you have one of those) and minimising your main app when the problem comes along. I'm assuming that the problem is so infrequent that you don't feel like just putting 'top' (or ksysguard) up on screen and watching it while you do nothing else.

You might be able to do something a bit clever like a script that looks, say every second or so, at the load queue and when that is above a certain value, run 'top' and pipe the output of that to a file, but whether that works for you is a bit dependant on what sort of problem you have.

Another thing you could think about is whether you have any processes that run on a timed basis (disk indexers like locate/updatedb or beagle are good candidates and anything run by cron/anacron, etc) that could be doing this. If its a disk indexer (or a virtual memory problem) you should see the hard disk activity light go wild at the time, and that might be a clue. (vmstat is good for top-level diagnosis of vm problems, but ignore the first result; in the same way that you might run top, you might also run, say, 'vmstat 10'.)
 
Old 10-24-2007, 06:18 AM   #4
kinetic
Member
 
Registered: Aug 2007
Location: Fort Collins, Colorado
Distribution: Gentoo
Posts: 64

Original Poster
Rep: Reputation: 17
I don't think you understand. I can't run diagnostics at the time of the crash because it completely locks up. No mouse, no keyboard, no network card... completely dead. It isn't a program using up all the CPU because the fan would start running like wild if that were the case. And the hard-drive led doesn't blink at all. I don't think its a kernel panic either because I'm pretty sure that would be logged. Whatever it is, the kernel would have to log it at the instant it happens, because after that, all I can do is pull the plug...
 
Old 10-25-2007, 04:31 AM   #5
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Quote:
Originally Posted by kinetic View Post
I don't think you understand. I can't run diagnostics at the time of the crash because it completely locks up.
Well you are certainly right that I didn't understand. Most people use the word freeze to mean a temporary situation in which the system stops working temporarily and then recovers and you have a very different problem.

Presumably you have tried memtest? (On a thorough, do every test and keep running for a long while, basis.) If it gets through a thorough memtest, at least the memory is ok.

If that's ok, you are then on to more specific things; your distro (maybe an update helps) and incompatibility with your chipset and the need for specific configurations (the usual suspects of apic, lapic, etc could probably stand being turned off with non-mainstream chipsets).
 
Old 10-25-2007, 05:18 PM   #6
dracolich
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 1,219

Rep: Reputation: 55
What kind of network card and video chip do you have and what drivers? I had a similar experience, right down to the green lines, a couple years ago on my laptop using a combination of a third-party ati driver and ndiswrapper. I figured it out by realizing it only happened while online, then realizing it only happened while using a particular wifi card.

It certainly sounds like a sudden hard lockup that the kernel doesn't catch and log. Likely due to a device driver conflict. First try thinking about any recent driver installations or upgrades. Next try thinking about something common every time it locks up. Specific videos or video formats, sounds, websites and elements of them, what devices, drivers or services are active at the time.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Random freezes when using Suse10.1 preeth26 Linux - Distributions 0 06-01-2006 07:07 AM
random freezes verbose Linux - Hardware 7 02-24-2006 03:05 AM
Random freezes and other problems. xoi Linux - General 5 02-13-2006 10:27 AM
Random freezes, don't know why randomshinichi Linux - Software 3 06-07-2005 12:58 PM
Random Server Freezes deviance99 Linux - Hardware 11 12-02-2004 07:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration