1

My server has been crashing, a quick check of ps aux shows:

 root     11905 95.5 55.0 1151616 1135256 pts/0 R+   09:05  40:38 vim error_log

Surely this can't be right? Am I reading this right? This seems to be very dire!

If this is really using 95% cpu and 55% memory then how can I stop it/fix it?

Thanks

2 Answers 2

4

A very large file is being opened with vim, a text editor. To stop vim, kill it (PID taken from the second column of ps aux):

kill 11905

When checking log files, I suggest you to use less instead as you do not need fancy editing features:

less error_log
4
  • I normally use cat. Ah cool, kill has stopped it. Could that be what's causing the out of memory errors? Feb 14, 2012 at 10:31
  • Also, I figured error_log was the apache error log which was MAHOOSIVE! So I also deleted that. Feb 14, 2012 at 10:31
  • 1
    Other useful tools for log analysis are tail, uniq and grep. See their manpages for more information.
    – Lekensteyn
    Feb 14, 2012 at 10:36
  • Ah brilliant, thank you. I'm primarily a programmer, and have a basic understanding of the hardware/server side of stuff, but stuff like this I'm still learning about and stumbling upon when I have issues like this. Thanks for your help and insight. :) Very useful Feb 14, 2012 at 10:39
1

You need also restart apache, or it continues to log to the deleted file.

1
  • cool :) i did that anyway. Feb 14, 2012 at 14:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .