On one server which i have sometime appear very high load up to 70,and that causing downtime of few minutes(i have historic data webmin module where i saw high load and downtime time matches,but it doesn't show what causing it).That server also have hardware raid in mirror mode.(copies exact data from one disk to another).Any idea?
This will show the cpu usage of all the processes.
Then press the shift key and then press M (SHIFT + M), this will show the pocesses that are consuming high memory in the server.
Top is only to see what's happening at the moment,but even then it's hard to see what exactly causing it.This high load happening only for few minutes and i cant sit on computer entire day and watch top all the time.
teksupportrena does have a good suggestion - I actually wrote a bash script that outputs "ps aux" sorted by CPU usage into a file every 5 minutes and then rotates that file out every day which proved useful back when we were having some strange issues with one server.
I also put downtime check on other identical machine,only without raid,and noticed there is downtime happening 3 times at day,also small time period from one to five minute.Today in night i replaced apache with clean nginx and so far no any downtime on that machine.Which is kind a strange,since that machine have only static content(images and videos)and not much traffic as other machine which have close to 200k daily visits and a lot of sites with dynamic content.Well i guess could be beacuse of hotlinkers,i will inform customer does he want to block hotlinkers since they are reason why apache slowing down plus i noticed that server with static content only consume more bandwidth then other server with far more traffic and dynamic content.I am in progress of replacing apache on other machine too with nginx,but i need to masterize url rewrites first on nginx.
Reply to last two posts:
I am sure this happening beacuse of overloaded apache,and best solution will be to install clean nginx or nginx proxy to apache.I want to install clean nginx but problem is some parts are different there like url rewrite and i need to learn how to run perl and c++ script with it.It is possible but little complicated and i will need to research this further.Toobad nginx support doesn't exits and not much people have experience with this.Proxy nginx could work but last time when i used that it was problem with scripts which was marking all that traffic as traffic coming from proxy which is not good.