Server load pretty high

PRB

Verified User
Joined
Oct 18, 2008
Messages
154
Hi!

While my server load was yesterday like 0.xx today it is 3.xx+

How do I find what is causing this? What user / domain is causing this? What do I have to run in SSH/putty to find out what is causing this?

It would be awesome to find what user/domain is causing this... I have searched alot, but wasnt able to find out who's doing this.
 
Ok, I feel ashamed for asking this, but how do I do that?
 
ssh into the server, and run top and post up the output you get. It should show what is hogging your cpu
 
Since I typed 'top' and got an error in putty, I gave up on that. Instead I used this:

Hi.

i'm not so good programmer but script below may help you (i hope :))

Code:
#!/bin/bash

LOG="/var/tmp/domains.log"
DA="/usr/local/directadmin/data/users"
rm -f $LOG
touch $LOG

for username in `ls $DA`; do
    cat ${DA}/${username}/domains.list | \
    while read domain; do
      if [ -f /var/log/httpd/domains/${domain}.log ]; then
        REQ=`cat  /var/log/httpd/domains/${domain}.log | wc -l`
        if [ $REQ -gt 100 ]; then
            echo "$REQ $domain" >> $LOG
        fi
      fi
    done
done

sort -nr  $LOG | more

# EOF

save code to some file (an example file.sh) and change attribute:
chmod 755 file.sh
Script will show request per day for each domain

(Yes i know that code isn't perfect but it's work :))

I found which account uses so much. But is this script reliable? Can I actually yell at the user which is on top in the result i get?
 
Ok, I found out how to use 'top'. Here is the result.

And sorry for being such a moron. I'm totally new with Unix and etc, but im learning!

Code:
/$ top -b -n 1
top - 10:05:05 up 5 days, 20:05,  0 users,  load average: 1.08, 1.14, 1.57
Tasks: 275 total,   1 running, 273 sleeping,   0 stopped,   1 zombie
Cpu(s):  5.2%us,  0.8%sy,  0.0%ni, 93.4%id,  0.4%wa,  0.0%hi,  0.2%si,  0.0%st
Mem:   2067764k total,  1627848k used,   439916k free,   206528k buffers
Swap:  2650684k total,       36k used,  2650648k free,  1032892k cached
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND            
21854 apache    16   0 23060  10m 3220 S   37  0.5   0:02.71 httpd              
22765 apache    15   0 23072  10m 3152 S    4  0.5   0:00.43 httpd              
 2565 bind      24   0 55188  17m 2216 S    2  0.9  20:49.87 named              
19395 apache    15   0 24004  11m 3360 S    2  0.6   0:08.68 httpd              
22062 apache    15   0 23068  11m 3712 S    2  0.6   0:01.86 httpd              
22231 apache    16   0 23636  11m 3152 S    2  0.6   0:00.55 httpd              
22267 apache    16   0 23476  11m 3168 S    2  0.5   0:00.64 httpd              
22526 apache    15   0 23588  11m 3720 S    2  0.6   0:01.01 httpd              
22545 apache    15   0     0    0    0 Z    2  0.0   0:00.59 httpd <defunct>    
22780 apache    15   0 23072  10m 3084 S    2  0.5   0:00.20 httpd              
22790 apache    15   0 23612  11m 3112 S    2  0.5   0:00.25 httpd              
22791 apache    15   0 23664  11m 3096 S    2  0.5   0:00.26 httpd              
22795 apache    15   0 23088  10m 3160 S    2  0.5   0:00.44 httpd              
22811 apache    16   0 23696  11m 3124 S    2  0.5   0:00.23 httpd              
22812 apache    15   0 23156  10m 3136 S    2  0.5   0:00.65 httpd              
22873 apache    15   0 23072  10m 3096 S    2  0.5   0:00.06 httpd              
22886 apache    15   0 23068  10m 3084 S    2  0.5   0:00.03 httpd              
22891 apache    15   0 23588  10m 3080 S    2  0.5   0:00.04 httpd              
22918 root      15   0  2356 1144  756 R    2  0.1   0:00.02 top                
    1 root      15   0  1948  644  552 S    0  0.0   0:01.43 init               
    2 root      RT   0     0    0    0 S    0  0.0   0:00.03 migration/0        
    3 root      34  19     0    0    0 S    0  0.0   0:00.00 ksoftirqd/0        
    4 root      RT   0     0    0    0 S    0  0.0   0:00.02 migration/1        
    5 root      34  19     0    0    0 S    0  0.0   0:00.01 ksoftirqd/1        
    6 root      10  -5     0    0    0 S    0  0.0   0:00.00 events/0           
    7 root      10  -5     0    0    0 S    0  0.0   0:00.01 events/1           
    8 root      10  -5     0    0    0 S    0  0.0   0:00.00 khelper            
    9 root      12  -5     0    0    0 S    0  0.0   0:00.00 kthread            
   13 root      13  -5     0    0    0 S    0  0.0   0:00.09 kblockd/0          
   14 root      10  -5     0    0    0 S    0  0.0   0:00.02 kblockd/1          
   15 root      14  -5     0    0    0 S    0  0.0   0:00.00 kacpid             
  101 root      10  -5     0    0    0 S    0  0.0   0:00.00 kseriod            
  145 root      23   0     0    0    0 S    0  0.0   0:00.00 pdflush            
  146 root      15   0     0    0    0 S    0  0.0   0:00.61 pdflush            
  147 root      10  -5     0    0    0 S    0  0.0   0:01.69 kswapd0            
  148 root      14  -5     0    0    0 S    0  0.0   0:00.00 aio/0              
  149 root      14  -5     0    0    0 S    0  0.0   0:00.00 aio/1              
  302 root      15   0     0    0    0 S    0  0.0   0:00.16 kirqd              
  641 root      17  -5     0    0    0 S    0  0.0   0:00.00 ata/0              
  643 root      17  -5     0    0    0 S    0  0.0   0:00.00 ata/1              
  645 root      17  -5     0    0    0 S    0  0.0   0:00.00 ata_aux            
  669 root      13  -5     0    0    0 S    0  0.0   0:00.00 khubd              
  693 root      18  -5     0    0    0 S    0  0.0   0:00.00 scsi_eh_0          
  698 root      17  -5     0    0    0 S    0  0.0   0:00.00 scsi_eh_1          
  941 root      10  -5     0    0    0 S    0  0.0   0:20.78 kjournald          
 1129 root      16  -4  2176  588  340 S    0  0.0   0:00.06 udevd              
 1440 root      14  -5     0    0    0 S    0  0.0   0:00.00 kpsmoused          
 1669 root      13  -5     0    0    0 S    0  0.0   0:00.00 kmirrord           
 1698 root      12  -5     0    0    0 S    0  0.0   0:00.00 kjournald          
 2322 daemon    15   0  1688  372  272 S    0  0.0   0:00.00 portmap            
 2547 root      15   0  1624  568  460 S    0  0.0   0:16.48 syslogd            
 2553 root      18   0  1576  376  308 S    0  0.0   0:00.00 klogd              
 2661 root      22   0  1576  564  476 S    0  0.0   0:00.00 acpid              
 2664 root      18   0  1040  284  244 S    0  0.0   0:00.11 da-popb4smtp       
 2668 nobody    23   0  7196  984  736 S    0  0.0   0:00.95 directadmin        
 2677 mail      15   0  6968  792  584 S    0  0.0   0:00.01 exim               
 2724 root      25   0  2656 1308 1068 S    0  0.1   0:00.00 mysqld_safe        
 2743 root      18   0  1748  572  480 S    0  0.0   0:00.00 inetd              
 2755 ftp       17   0  4224 1240  648 S    0  0.1   0:00.24 proftpd            
 2768 mysql     15   0 35508  14m 2936 S    0  0.7   0:07.49 mysqld             
 2804 mysql     15   0 35508  14m 2936 S    0  0.7   0:07.32 mysqld             
 2805 mysql     20   0 35508  14m 2936 S    0  0.7   0:00.00 mysqld             
 2806 mysql     16   0 35508  14m 2936 S    0  0.7   0:00.00 mysqld             
 2807 mysql     15   0 35508  14m 2936 S    0  0.7   0:00.00 mysqld             
 2808 mysql     18   0 35508  14m 2936 S    0  0.7   0:00.00 mysqld             
 2884 statd     18   0  1756  732  628 S    0  0.0   0:00.00 rpc.statd          
 2898 daemon    18   0  1832  424  300 S    0  0.0   0:00.00 atd                
 2905 mysql     18   0 35508  14m 2936 S    0  0.7   0:01.46 mysqld             
 2906 mysql     18   0 35508  14m 2936 S    0  0.7   0:01.12 mysqld             
 2907 mysql     15   0 35508  14m 2936 S    0  0.7   0:00.00 mysqld             
 2910 mysql     15   0 35508  14m 2936 S    0  0.7   0:15.51 mysqld             
 2915 root      18   0  2196  868  684 S    0  0.0   0:00.52 cron               
 2940 root      18   0  1572  492  424 S    0  0.0   0:00.00 getty              
 2941 root      18   0  1576  496  424 S    0  0.0   0:00.00 getty              
 2942 root      18   0  1572  492  424 S    0  0.0   0:00.00 getty              
 2943 root      18   0  1576  492  424 S    0  0.0   0:00.00 getty              
 2944 root      18   0  1572  492  424 S    0  0.0   0:00.00 getty              
 2945 root      18   0  1572  488  424 S    0  0.0   0:00.00 getty              
24672 root      15   0  1940  672  472 S    0  0.0   0:00.16 dovecot            
24673 root      15   0  2748 1532  780 S    0  0.1   0:00.32 dovecot-auth       
24693 dovecot   15   0  3312 1512 1248 S    0  0.1   0:00.00 imap-login         
24694 dovecot   15   0  3316 1516 1248 S    0  0.1   0:00.00 imap-login         
24695 dovecot   15   0  3312 1512 1248 S    0  0.1   0:00.00 imap-login         
24701 dovecot   15   0  3312 1512 1248 S    0  0.1   0:00.00 imap-login         
24702 dovecot   15   0  3316 1520 1252 S    0  0.1   0:00.00 imap-login         
24704 dovecot   15   0  3312 1512 1248 S    0  0.1   0:00.00 imap-login         
 7623 dovecot   15   0  3308 1508 1240 S    0  0.1   0:00.00 pop3-login         
 7625 dovecot   15   0  3308 1512 1244 S    0  0.1   0:00.00 pop3-login         
 7626 dovecot   15   0  3304 1504 1240 S    0  0.1   0:00.00 pop3-login         
 7630 dovecot   15   0  3308 1508 1240 S    0  0.1   0:00.00 pop3-login         
 7632 dovecot   15   0  3304 1508 1244 S    0  0.1   0:00.00 pop3-login         
18343 dovecot   15   0  3304 1504 1240 S    0  0.1   0:00.00 pop3-login         
28935 dovecot   15   0  3304 1504 1240 S    0  0.1   0:00.00 pop3-login         
 1546 dovecot   15   0  3316 1516 1248 S    0  0.1   0:00.00 imap-login         
 2184 dovecot   15   0  3304 1508 1244 S    0  0.1   0:00.00 pop3-login         
 8064 dovecot   15   0  3316 1512 1248 S    0  0.1   0:00.00 imap-login         
 8070 dovecot   15   0  3316 1516 1248 S    0  0.1   0:00.00 imap-login         
 8849 dovecot   15   0  3308 1508 1244 S    0  0.1   0:00.00 pop3-login         
10336 dovecot   15   0  3312 1512 1248 S    0  0.1   0:00.00 imap-login         
14579 dovecot   15   0  3312 1516 1252 S    0  0.1   0:00.00 imap-login         
 6543 dovecot   15   0  3304 1508 1244 S    0  0.1   0:00.00 pop3-login         
 8972 dovecot   15   0  3308 1512 1244 S    0  0.1   0:00.00 pop3-login         
 2123 dovecot   15   0  3312 1516 1252 S    0  0.1   0:00.00 imap-login         
17530 dovecot   15   0  3304 1504 1240 S    0  0.1   0:00.00 pop3-login         
10326 dovecot   15   0  3312 1512 1248 S    0  0.1   0:00.00 imap-login         
11363 dovecot   15   0  3312 1512 1248 S    0  0.1   0:00.00 imap-login         
12059 dovecot   15   0  3304 1500 1240 S    0  0.1   0:00.00 pop3-login         
12060 dovecot   15   0  3308 1504 1240 S    0  0.1   0:00.00 pop3-login         
16709 dovecot   15   0  3308 1512 1244 S    0  0.1   0:00.00 pop3-login         
32537 dovecot   17   0  3304 1504 1240 S    0  0.1   0:00.00 pop3-login         
 6250 dovecot   15   0  3312 1512 1248 S    0  0.1   0:00.00 imap-login         
 6254 dovecot   17   0  3312 1512 1248 S    0  0.1   0:00.00 imap-login         
10804 root      18   0 22660  10m 3912 S    0  0.5   0:02.08 httpd              
10823 root      15   0  4932 1092  756 S    0  0.1   0:00.12 sshd               
15789 root      15   0  7700 2248 1828 S    0  0.1   0:00.03 sshd               
15791 admin     15   0  7700 1564 1128 S    0  0.1   0:00.00 sshd               
15792 admin     15   0  4232 1260  976 S    0  0.1   0:00.00 sftp-server        
15796 root      16   0  7704 2252 1828 S    0  0.1   0:00.02 sshd               
15798 admin     15   0  7704 1548 1112 S    0  0.1   0:00.00 sshd               
15799 admin     16   0  4360 1648 1164 S    0  0.1   0:00.00 bash               
16063 root      16   0  7700 2248 1828 S    0  0.1   0:00.02 sshd               
16065 admin     15   0  7700 1564 1128 S    0  0.1   0:00.00 sshd               
16066 admin     15   0  4224 1260  980 S    0  0.1   0:00.00 sftp-server        
16169 root      15   0  7704 2336 1904 S    0  0.1   0:00.02 sshd               
16171 root      15   0  4232 1264  980 S    0  0.1   0:00.01 sftp-server        
19407 apache    15   0 23724  11m 3436 S    0  0.6   0:04.66 httpd              
21351 apache    15   0 23132  11m 3748 S    0  0.6   0:05.52 httpd              
21771 apache    15   0 23116  11m 3804 S    0  0.6   0:05.39 httpd              
21872 apache    15   0 23820  11m 3224 S    0  0.6   0:02.38 httpd              
21957 apache    15   0 23100  10m 3188 S    0  0.5   0:04.47 httpd              
21964 apache    15   0 23632  11m 3492 S    0  0.6   0:01.94 httpd              
21974 apache    15   0 23048  10m 3244 S    0  0.5   0:01.36 httpd              
21980 apache    18   0 23848  11m 3208 S    0  0.6   0:00.58 httpd              
22035 apache    15   0 23396  11m 3720 S    0  0.6   0:02.41 httpd              
22044 apache    15   0 23068  11m 3684 S    0  0.6   0:01.48 httpd              
22056 apache    15   0 23564  11m 3724 S    0  0.6   0:02.61 httpd              
22074 apache    15   0 22988  10m 3136 S    0  0.5   0:01.13 httpd              
22078 apache    15   0 23656  11m 3868 S    0  0.6   0:01.68 httpd              
22085 apache    15   0 23104  10m 3304 S    0  0.5   0:03.24 httpd              
22118 apache    15   0 23012  10m 3260 S    0  0.5   0:04.14 httpd              
22174 apache    16   0 24016  11m 3708 S    0  0.6   0:01.61 httpd              
22187 apache    15   0 23192  11m 3492 S    0  0.6   0:00.72 httpd              
22220 apache    18   0 23852  11m 3444 S    0  0.6   0:00.51 httpd              
22226 apache    15   0 23060  10m 3160 S    0  0.5   0:02.28 httpd              
22229 apache    15   0 23084  11m 3784 S    0  0.6   0:01.88 httpd              
22233 apache    15   0 23048  10m 3188 S    0  0.5   0:01.29 httpd              
22245 apache    15   0 23840  11m 3176 S    0  0.6   0:00.84 httpd              
22246 apache    18   0 23872  11m 3236 S    0  0.6   0:00.39 httpd              
22248 apache    15   0 23628  11m 3232 S    0  0.6   0:01.01 httpd              
22254 apache    15   0 23068  10m 3188 S    0  0.5   0:01.58 httpd              
22262 apache    15   0 23084  10m 3200 S    0  0.5   0:01.16 httpd              
22263 apache    15   0 23148  10m 3144 S    0  0.5   0:00.82 httpd              
22275 apache    15   0 23100  11m 3712 S    0  0.6   0:01.43 httpd              
22283 apache    15   0 22976  10m 3156 S    0  0.5   0:00.81 httpd              
22284 apache    15   0 23112  10m 3152 S    0  0.5   0:00.82 httpd              
22288 apache    15   0 23752  11m 3164 S    0  0.6   0:00.25 httpd              
22294 apache    15   0 23004  10m 3196 S    0  0.5   0:00.79 httpd              
22305 apache    15   0 23104  11m 3744 S    0  0.6   0:02.58 httpd              
22315 apache    15   0 23092  10m 3232 S    0  0.5   0:00.78 httpd              
22319 apache    15   0 23108  11m 3740 S    0  0.6   0:01.59 httpd              
22393 apache    15   0 23108  10m 3268 S    0  0.5   0:01.71 httpd              
22395 apache    15   0 23116  10m 3220 S    0  0.5   0:02.64 httpd              
22466 apache    15   0 23060  10m 3240 S    0  0.5   0:00.55 httpd              
22467 apache    15   0 23120  11m 3712 S    0  0.6   0:01.38 httpd              
22488 apache    15   0 23124  10m 3256 S    0  0.5   0:00.64 httpd              
22489 apache    15   0 23584  10m 3176 S    0  0.5   0:00.59 httpd              
22496 apache    15   0 23180  10m 3260 S    0  0.5   0:01.00 httpd              
22497 apache    15   0 23060  10m 3188 S    0  0.5   0:00.50 httpd              
22501 apache    15   0 23876  11m 3164 S    0  0.6   0:00.47 httpd              
22506 apache    15   0 23876  11m 3724 S    0  0.6   0:01.04 httpd              
22507 apache    18   0 23468  10m 3084 S    0  0.5   0:00.04 httpd              
22513 apache    15   0 23848  11m 3200 S    0  0.6   0:01.45 httpd              
22521 apache    16   0 23072  10m 3212 S    0  0.5   0:00.73 httpd              
22532 apache    15   0 23088  10m 3184 S    0  0.5   0:00.70 httpd              
22533 apache    16   0 23584  11m 3204 S    0  0.5   0:01.57 httpd              
22534 apache    18   0 23700  11m 3204 S    0  0.6   0:00.56 httpd              
22535 apache    15   0 23088  11m 3768 S    0  0.6   0:01.85 httpd              
22538 apache    18   0 23124  10m 3136 S    0  0.5   0:00.27 httpd              
22542 apache    15   0 23632  11m 3192 S    0  0.5   0:01.14 httpd              
22550 apache    15   0 23100  10m 3208 S    0  0.5   0:01.04 httpd              
22565 apache    15   0 23848  11m 3220 S    0  0.6   0:00.69 httpd              
22572 apache    18   0 23072  10m 3080 S    0  0.5   0:00.02 httpd              
22573 apache    16   0 23588  11m 3172 S    0  0.5   0:00.89 httpd              
22574 apache    15   0 23140  11m 3716 S    0  0.6   0:00.90 httpd              
22610 apache    16   0 23636  11m 3196 S    0  0.6   0:00.88 httpd              
22612 apache    15   0 23336  11m 3700 S    0  0.6   0:01.05 httpd              
22614 apache    15   0 23160  10m 3104 S    0  0.5   0:00.50 httpd              
22617 apache    15   0 23608  10m 3136 S    0  0.5   0:00.55 httpd              
22621 apache    15   0 23576  10m 3116 S    0  0.5   0:00.46 httpd              
22624 apache    15   0 23068  11m 3680 S    0  0.6   0:00.65 httpd              
22634 apache    16   0 23632  11m 3172 S    0  0.5   0:01.08 httpd              
22635 apache    15   0 23644  11m 3152 S    0  0.5   0:00.30 httpd              
22641 apache    15   0 23068  10m 3204 S    0  0.5   0:00.85 httpd              
22653 apache    15   0 23084  10m 3216 S    0  0.5   0:00.90 httpd              
22658 apache    15   0 23124  10m 3096 S    0  0.5   0:00.11 httpd              
22659 apache    15   0 22980  10m 3192 S    0  0.5   0:00.48 httpd              
22660 apache    15   0 23468  10m 3184 S    0  0.5   0:00.71 httpd              
22661 apache    15   0 23140  11m 3700 S    0  0.6   0:01.23 httpd              
22666 apache    15   0 23084  10m 3144 S    0  0.5   0:00.63 httpd              
22668 apache    15   0 23852  11m 3188 S    0  0.6   0:00.86 httpd              
22690 root      15   0  7700 2336 1904 S    0  0.1   0:00.03 sshd               
22692 root      15   0  4236 1260  976 S    0  0.1   0:00.00 sftp-server        
22714 nobody    22   0  7196  312   64 S    0  0.0   0:00.00 directadmin        
22715 nobody    22   0  7196  312   64 S    0  0.0   0:00.00 directadmin        
22716 nobody    21   0  7196  312   64 S    0  0.0   0:00.00 directadmin        
22719 nobody    23   0  7196  312   64 S    0  0.0   0:00.00 directadmin        
22720 nobody    23   0  7196  312   64 S    0  0.0   0:00.00 directadmin        
22728 root      15   0  7700 2352 1908 S    0  0.1   0:00.03 sshd               
22730 root      15   0  3848 1388 1164 S    0  0.1   0:00.00 bash               
22769 apache    15   0 22928  11m 3712 S    0  0.5   0:00.85 httpd              
22770 apache    15   0 23840  11m 3160 S    0  0.6   0:00.35 httpd              
22771 apache    15   0 23608  11m 3236 S    0  0.5   0:00.48 httpd              
22772 apache    18   0 23720  11m 3124 S    0  0.6   0:00.14 httpd              
22782 apache    15   0 23144  10m 3136 S    0  0.5   0:00.41 httpd              
22783 apache    15   0 23744  11m 3156 S    0  0.6   0:00.18 httpd              
22784 apache    16   0 23420  10m 3172 S    0  0.5   0:00.28 httpd              
22786 apache    15   0 23112  10m 3196 S    0  0.5   0:00.49 httpd              
22789 apache    15   0 22868  10m 3144 S    0  0.5   0:00.09 httpd              
22792 apache    15   0 23096  10m 3116 S    0  0.5   0:00.36 httpd              
22794 apache    15   0 22956  10m 3172 S    0  0.5   0:00.32 httpd              
22796 apache    15   0 23764  11m 3116 S    0  0.6   0:00.17 httpd              
22807 apache    22   0 23064  10m 3124 S    0  0.5   0:00.08 httpd              
22808 apache    15   0 23744  11m 3136 S    0  0.6   0:00.22 httpd              
22814 apache    15   0 22912  10m 3124 S    0  0.5   0:00.21 httpd              
22815 apache    15   0 23728  11m 3140 S    0  0.5   0:00.20 httpd              
22816 apache    15   0 23744  11m 3096 S    0  0.6   0:00.49 httpd              
22817 apache    15   0 23096  10m 3124 S    0  0.5   0:00.07 httpd              
22818 apache    15   0 22908  10m 3136 S    0  0.5   0:00.22 httpd              
22819 apache    15   0 23784  11m 3660 S    0  0.6   0:01.29 httpd              
22820 apache    15   0 23612  10m 3084 S    0  0.5   0:00.17 httpd              
22821 apache    15   0 22916  10m 3112 S    0  0.5   0:00.18 httpd              
22824 apache    15   0 23068  10m 3116 S    0  0.5   0:00.18 httpd              
22833 apache    15   0 22964  11m 3652 S    0  0.5   0:00.27 httpd              
22834 apache    15   0 22880  10m 3128 S    0  0.5   0:00.18 httpd              
22835 apache    16   0 22932  10m 3152 S    0  0.5   0:00.51 httpd              
22838 apache    15   0 23108  10m 3140 S    0  0.5   0:00.31 httpd              
22840 apache    15   0 23080  10m 3136 S    0  0.5   0:00.21 httpd              
22841 apache    15   0 23848  11m 3120 S    0  0.6   0:00.08 httpd              
22842 apache    15   0 22968  11m 3624 S    0  0.5   0:00.28 httpd              
22844 apache    15   0 23168  10m 3228 S    0  0.5   0:00.38 httpd              
22847 apache    15   0 23104  10m 3120 S    0  0.5   0:00.10 httpd              
22849 apache    15   0 23092  10m 3140 S    0  0.5   0:00.17 httpd              
22851 apache    15   0 23644  11m 3136 S    0  0.6   0:00.11 httpd              
22852 apache    15   0 23372  10m 3084 S    0  0.5   0:00.09 httpd              
22853 apache    15   0 22908  10m 3144 S    0  0.5   0:00.24 httpd              
22854 apache    15   0 23788  11m 3120 S    0  0.5   0:00.06 httpd              
22871 apache    15   0 23584  10m 3076 S    0  0.5   0:00.04 httpd              
22872 apache    15   0 23860  11m 3084 S    0  0.6   0:00.05 httpd              
22879 apache    15   0 23580  10m 3080 S    0  0.5   0:00.02 httpd              
22882 apache    15   0 22848  10m 3084 S    0  0.5   0:00.02 httpd              
22883 apache    15   0 23652  11m 3120 S    0  0.5   0:00.02 httpd              
22884 apache    15   0 22876  10m 3076 S    0  0.5   0:00.02 httpd              
22887 apache    15   0 23092  10m 3076 S    0  0.5   0:00.03 httpd              
22888 apache    15   0 22848  10m 3080 S    0  0.5   0:00.01 httpd              
22889 apache    15   0 22832  10m 3076 S    0  0.5   0:00.03 httpd              
22890 apache    15   0 22812  10m 3080 S    0  0.5   0:00.02 httpd              
22892 apache    24   0 23308  10m 2960 S    0  0.5   0:00.00 httpd              
22893 apache    15   0 22844  10m 3080 S    0  0.5   0:00.03 httpd              
22894 apache    15   0 22848  10m 3080 S    0  0.5   0:00.02 httpd              
22896 apache    15   0 23060  10m 3080 S    0  0.5   0:00.02 httpd              
22897 apache    15   0 23744  11m 3124 S    0  0.5   0:00.04 httpd              
22898 apache    15   0 23068  10m 3076 S    0  0.5   0:00.01 httpd              
22899 apache    15   0 23068  10m 3076 S    0  0.5   0:00.01 httpd              
22900 apache    15   0 23112  10m 3084 S    0  0.5   0:00.03 httpd              
22901 apache    15   0 23604  10m 3072 S    0  0.5   0:00.03 httpd              
22902 apache    15   0 23100  10m 3080 S    0  0.5   0:00.02 httpd              
22903 apache    15   0 23068  10m 3076 S    0  0.5   0:00.01 httpd              
22904 apache    15   0 22856  10m 3100 S    0  0.5   0:00.03 httpd              
22905 apache    15   0 23060  10m 3076 S    0  0.5   0:00.01 httpd              
22906 apache    15   0 23104  10m 3128 S    0  0.5   0:00.02 httpd              
22907 apache    15   0 23068  10m 3064 S    0  0.5   0:00.01 httpd              
22908 apache    15   0 22828  10m 3080 S    0  0.5   0:00.01 httpd              
22909 apache    15   0 23616  10m 3100 S    0  0.5   0:00.01 httpd              
22910 apache    15   0 22792  10m 3020 S    0  0.5   0:00.00 httpd              
22911 apache    15   0 22832  10m 3080 S    0  0.5   0:00.02 httpd
 
Top shows that apache is using most of the resources on your server.

You should probably look at the user (or users) that script shows as using the most resources.

Jeff
 
And you load is not nearly as high so whatever was using up all your resources is probably not showing in the top result you posted.

Sleeping processes are not going to add to the load average. You want to look for R and D especially.

Run

top -i -n 1

This will give you the current running processes.
 
Last edited:
Top shows that apache is using most of the resources on your server.

You should probably look at the user (or users) that script shows as using the most resources.

Jeff

Hi Jeff,
my problem is the same with Resyad, I hv check using top and yes the apache is using most of resource, even my load average is 211.57, 207.67, 158.45 :eek::eek:

can you tell me the easy way how to check which users' script that caused apache work very hard??
because what I can do right now is see each users' statistic, and there are more than 200 users
 
Turn on server-status and extended status in /etc/httpd/conf/extra/httpd-info.conf
 
thank you for quick answer scsi, but not good on my DA-system there is no /etc/httpd/conf/extra/httpd-info.conf file, even tough I am already using the latest version.

mind sharing yours?

thx b4
 
Since I typed 'top' and got an error in putty, I gave up on that. Instead I used this:
.....
I found which account uses so much. But is this script reliable? Can I actually yell at the user which is on top in the result i get?

somehow this script not running on my DA server. it gaves error
Code:
[root@andalas ~]# ./chktraffic.sh
cat: /usr/local/directadmin/data/users/bandwidth.tally/domains.list: Not a directory

:eek::confused:
 
Hi Jeff,
my problem is the same with Resyad, I hv check using top and yes the apache is using most of resource, even my load average is 211.57, 207.67, 158.45 :eek::eek:

I'm surprised your server was even responsive at this load, are you sure that Apache was the only thing you could see eating up CPU usage?

Try enabling the Apache server-status feature by adding this to your httpd.conf (usually /etc/httpd/conf/httpd.conf)
Code:
ExtendedStatus On
<Location /server-status>
    SetHandler server-status
</Location>
After rehashing (or restarting) Apache go to http://your.ip/server-status and paste what you see here inside some [ CODE ] tags. As an immediate measure try stopping Apache to see if the server load decreases. Remember though, DirectAdmin will attempt to restart Apache for you on a regular basis if it notices that it is not running.
 
If top doesn't run I would start looking for other symptoms of a compromised server. That would also explain the load. I have never heard of a server where top did not run. Other please correct me if I am wrong but at this point I would be very suspicious.
 
thank you richboy, no the server is not that responsive every time I type a key.. should wait about 5 seconds and after I hit enter.. I have to wait about 30 seconds, ..
 
If top doesn't run I would start looking for other symptoms of a compromised server. That would also explain the load. I have never heard of a server where top did not run. Other please correct me if I am wrong but at this point I would be very suspicious.

when the first time, I manage this server, I cant execute top, it seems has been hacked by previous admin who leave the company. after some clean-ups, I suggest to owner that this server need to re-format and re-install because I dont know what else he put on it.
 
Try enabling the Apache server-status feature by adding this to your httpd.conf (usually /etc/httpd/conf/httpd.conf)
Code:
ExtendedStatus On
<Location /server-status>
    SetHandler server-status
</Location>
After rehashing (or restarting) Apache go to http://your.ip/server-status and paste what you see here inside some [ CODE ] tags. As an immediate measure try stopping Apache to see if the server load decreases.

found the code on httpd.conf.. un-remark them..
restart the apache..
access http://localhost/server-status from localhost cant
access http://my.server.ip.address/server-status from my browser cant either

btw stopping the apache indeed decreasing the server load :D:D
 
You should seek a professional to look at your server then.
 
Back
Top