LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 09-04-2010, 08:50 PM   #1
hinetvenkat
Member
 
Registered: Nov 2004
Location: Mumbai
Posts: 80

Rep: Reputation: 15
How to identify the system crash


Hi

I want to get the count of host reboot and host crash per day.

Host reboot - i use last command and make sure the count.

How to catch the System Crash ?.

Please share the info if any.

Thanks
 
Old 09-05-2010, 08:10 AM   #2
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Hi,

Look at the '/var/log' for system information. Hopefully one of the logs will have enough information to guide to a solution.

Since you really didn't present enough information then I suggest that you look at 'How to Ask Questions the Smart Way' so in the future your queries provide information that will aid us in diagnosis of the problem.

Just a few links to aid you to gaining some understanding;

Linux Documentation Project
Rute Tutorial & Exposition
Linux Command Guide
Utimate Linux Newbie Guide
LinuxSelfHelp
Getting Started with Linux
Advanced Bash-Scripting Guide
Linux Home Networking


The above links and others can be found at 'Slackware-Links'. More than just SlackwareŽ links!

 
Old 09-06-2010, 07:07 PM   #3
suid0
Member
 
Registered: Jul 2005
Location: Brazil
Distribution: Slackware, openSuSe, Ubuntu, Fedora
Posts: 56

Rep: Reputation: 16
You could monitor this machine from the outside using nagios or even pinging and then match with the system restarts from last command.. everytime your machine becommes unresponsive to your ping or nagios and it's not listed on reboot list, it means there was a crash.
 
Old 09-08-2010, 03:53 PM   #4
selfprogrammed
Member
 
Registered: Jan 2010
Location: Minnesota, USA
Distribution: Slackware 13.37, 14.2, 15.0
Posts: 635

Rep: Reputation: 154Reputation: 154
You cannot catch the crash, but you can detect upon the next boot, that the previous run crashed, count it then.

To detect such an event you can write a script that looks at the previous log for the crash specific error messages.
Probably use grep to search /var/lastlog, or /var/dmseg for crash messages.
You can search for panic
You might have to change another script to copy any logs before the get wiped, or to insert a tag to help your search.
Put the script somewhere in the boot scripts (/etc/rc.d/rc.local)
The script can increment a count (how, I cannot think of a way right now).
Probably will have to create your own log (/var/log/crash_count ??)
to keep state.
You may have to move the normal logs (rename, etc.) each time after you check, so as to not recheck the same data twice.

This is just preliminary thinking on this, you will have to work out the details. I have not tried this before, and there may be some subtle problems.
 
  


Reply



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
how to identify whether a system is 32 or 64 bit gsr_kashyap Red Hat 33 01-04-2012 02:54 PM
Running Server without monitor causes crash - help needed to identify cause sorenchr Linux - Server 3 04-19-2010 07:54 PM
Identify file system MikeyCarter Linux - Software 1 12-03-2006 03:19 PM
System not able to Identify Linux at boot time suman_chat Red Hat 5 09-30-2005 09:08 AM
Identify system distribution speres Linux - Distributions 6 10-25-2004 09:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 02: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
Open Source Consulting | Domain Registration