RetiredAF

Active Member
Sep 16, 2018
26
5
3
Tucson, AZ
cPanel Access Level
Website Owner
On a few occasions we have experienced an huge and brief increase in load on our server (example follows). We'd like to find out what is causing this. If something would just run top and record the results when the load went above a certain level that might be a start. Anybody know how we might do that.

10:00:01 PM runq-sz plist-sz ldavg-1 ldavg-5 ldavg-15
...

11:30:01 PM 10 458 0.53 0.65 0.69
11:40:01 PM 10 458 0.48 0.60 0.63
11:50:40 PM 0 779 172.29 98.67 41.33
 

GOT

Get Proactive!
PartnerNOC
Apr 8, 2003
1,739
301
363
Chesapeake, VA
cPanel Access Level
DataCenter Provider
The best thing to do would be to get alerted when load is high so you can log in and take a look, or better yet leave top running on the server for a while so you don't have to bother logging in.

CSF/LFD has a high load alert it can send out when it sees load is above a certain point.
 
  • Like
Reactions: RetiredAF

RetiredAF

Active Member
Sep 16, 2018
26
5
3
Tucson, AZ
cPanel Access Level
Website Owner
The best thing to do would be to get alerted when load is high so you can log in and take a look, or better yet leave top running on the server for a while so you don't have to bother logging in.

CSF/LFD has a high load alert it can send out when it sees load is above a certain point.
Thanks but so far this has only occurred at night when we are in bed so we were look for someway to automate this.
 

GOT

Get Proactive!
PartnerNOC
Apr 8, 2003
1,739
301
363
Chesapeake, VA
cPanel Access Level
DataCenter Provider
I'm afraid that is not something we have done before as we have detailed monitoring systems that take care of that kind of thing for us. The command to dump the output of top to a file is

top -b -n 1 > top.txt

But you'd have to write a bash script that checked load and then ran that command to dump the output for you. I don't have a ready made solution for that though.
 
  • Like
Reactions: RetiredAF

RetiredAF

Active Member
Sep 16, 2018
26
5
3
Tucson, AZ
cPanel Access Level
Website Owner
I'm afraid that is not something we have done before as we have detailed monitoring systems that take care of that kind of thing for us. The command to dump the output of top to a file is

top -b -n 1 > top.txt

But you'd have to write a bash script that checked load and then ran that command to dump the output for you. I don't have a ready made solution for that though.
Thanks again. Actually your mention of CSF/LFD got me looking in that direction and I think this might be what I was looking for.
webhostpython.com/billing/knowledgebase.php?action=displayarticle&id=66
 
Last edited by a moderator: