Computer crashed... Any ideas?

M

melissa2015

Guest
How can I determine why my computer crashed? I got kicked out of my ssh session and I can't log back in. I did a hard reboot and got back in, but how do I see the cause? Any ideas?
 


Thanks Darren!
Welcome, good sir--- Er, madam..... :3 Sorry, I tend to call people "good sir" and stuff..... :3 But when does this happen.....? Sometimes, my old Inspiron 1420 just CRASHES, like "'I'm shutting down now kthxbai"..... :( ..... But, it's because of the Hardware, probably the Heat Sink.... As a friend who fixes PCs once said..... :) Anywho....... :) Is the problem still persisting.....? :) What Distro is it.....? Also, what Desktop Environment is it.....? :) Y'know, KDE, MATE, Cinnamon, Unity, Enlightenment, etc., etc...... :D
 
I'm running Ubuntu 14.04 LTS. It's an Amazon EC2 instance so there is no desktop. I'm logging in remotely through ssh. The box has a bunch of cron jobs that run throughout the day. Perhaps one of them is crashing the box or at least making it unresponsive enough that I can't log in? It doesn't happen all the time but seems to happen occasionally. Is there any way to see how much CPU and memory the box has left when I'm not logged in? Even better if I can monitor usage per process so I can see which job might be eating up any resources. I know I can do free and top, but these don't work unless I'm logged into the terminal. It'd be better to have a log of these stats I can look at after I reboot the box. Do you have a favorite tool you use for this?
 
to monitor CPU/MEM usage you can use top or my personal favorite htop but you have to be logged into the system. Maybe you can setup a cron job that outputs to a file using tee ?

You may wan to look through the system logs. Information on the system logs is available here:
https://help.ubuntu.com/community/LinuxLogFiles
 
I'm running Ubuntu 14.04 LTS. It's an Amazon EC2 instance so there is no desktop. I'm logging in remotely through ssh. The box has a bunch of cron jobs that run throughout the day. Perhaps one of them is crashing the box or at least making it unresponsive enough that I can't log in? It doesn't happen all the time but seems to happen occasionally. Is there any way to see how much CPU and memory the box has left when I'm not logged in? Even better if I can monitor usage per process so I can see which job might be eating up any resources. I know I can do free and top, but these don't work unless I'm logged into the terminal. It'd be better to have a log of these stats I can look at after I reboot the box. Do you have a favorite tool you use for this?
Hmm..... :/ I'm not sure what Cron Jobs are, but I'd follow what ryanvade said....... :) He's WAY smarter than me..... :D
 
I'm running Ubuntu 14.04 LTS. It's an Amazon EC2 instance so there is no desktop. I'm logging in remotely through ssh. The box has a bunch of cron jobs that run throughout the day. Perhaps one of them is crashing the box or at least making it unresponsive enough that I can't log in? It doesn't happen all the time but seems to happen occasionally. Is there any way to see how much CPU and memory the box has left when I'm not logged in? Even better if I can monitor usage per process so I can see which job might be eating up any resources. I know I can do free and top, but these don't work unless I'm logged into the terminal. It'd be better to have a log of these stats I can look at after I reboot the box. Do you have a favorite tool you use for this?
Have you run updates on the system? I ran into a problem with a Debian Testing system a few months ago, and had problems with ssh, until an update cleared up whatever the problem was. Just a suggestion.
 
Cool thanks everyone! I found a cool utility called sysstats that can track this stuff. I set it up to track CPU and memory every 2 minutes. It's not super easy to setup because you have to install it and then enable it separately. I'm going to let it run in the background and when it happens again I'm going to see what happened to the CPU and memory.
 
Cool thanks everyone! I found a cool utility called sysstats that can track this stuff. I set it up to track CPU and memory every 2 minutes. It's not super easy to setup because you have to install it and then enable it separately. I'm going to let it run in the background and when it happens again I'm going to see what happened to the CPU and memory.
Ok!..... :3 Let us know how it went!....... ^^ I know that's why my old Inspiron crashes, because Minecraft and/or KDE REALLY makes it run hot..... :( Hey, does anyone know if Laptops can have Heatsinks.....? :)
 
Haha so glad I don't run KDE :) Headless FTW! Although you're right no Minecraft for me :(
 
I've been monitoring sysstats and I found out that a few minutes after the cron runs the %memused goes up to 99%. I also checked my system logs as ryanvade suggested and found some out of memory errors from the kernel. Apparently it started killing processes. As I suspected, it's probably the cron that's doing this.

Now I have to go back and debug my script and figure out why it's using so much memory. I think I'm going to add some extra debug logging so I can see what it's doing. Thanks for your help everyone!
 
I've been monitoring sysstats and I found out that a few minutes after the cron runs the %memused goes up to 99%. I also checked my system logs as ryanvade suggested and found some out of memory errors from the kernel. Apparently it started killing processes. As I suspected, it's probably the cron that's doing this.

Now I have to go back and debug my script and figure out why it's using so much memory. I think I'm going to add some extra debug logging so I can see what it's doing. Thanks for your help everyone!
Maybe this site should help....:)
http://stackoverflow.com/questions/18689493/cron-job-running-out-of-memory-very-fast
 
There are two possibilities here:
One is that it could be a memory leak in a program you are using in your cron job. If it is a memory leak, you either need to see if there is a workaround to avoid triggering the problem, or perhaps send a bug report to the developers of that piece of software.

Otherwise, it could be that you are loading too much data into memory at once and running out of memory that way. In which case you need to load and deal with the data in smaller chunks.

Do the logs give any indication about exactly which application/process is actually causing the memory problems? It might help to diagnose the problem.
 
Haha so glad I don't run KDE :) Headless FTW! Although you're right no Minecraft for me :(
Well, if your PC can handle the extra heat, you COULD try Optifine..... :D It makes Minecraft run more EFFICIENTLY..... :3 I might run Headless as well, since it would force me to become more proficient with the Terminal/ GNU/Linux BASH CLI..... :D
 
Yeah it has to be a memory leak in the script because it only affects that one. I did a "ps auxm" and saw that this one script was using up almost 60% of the total memory. The other cron jobs use less than 1%. I ended up sending a bug report to one of our developers who is going to schedule some debug time for the next sprint. Thanks!
 

Members online


Top