آموزش بسیار جالب و کاربردی هست!(البته به زبان اصلی :smartass
  Following are few commands used for the Linux server load monitoring and maintenance 
 
Commands:
 
top: - used for the viewing current process going on the server. You will get a dynamic table of running process as a output .The table content following columns.
For example using more option with the top command you can get a better output 
For example: -
 
 
 
top c
 
PID USER Page Ranking NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 
PID: - process id 
 
User: - owner of that process 
 
We omit the Page Ranking NI VIRT RES SHR 
. 
%CPU: - CPU usage of the process
 
%MEM : - memory usage of the process
 
TIME+ :- the process is running form.
 
COMMAND: - the actual command 
 
You can kill the process is causing high load on the using the kill command 
Format:-
 
 
1. Kill -9 PID 
-9 is special Kill signal, which will kill the process.
 
 
2. Killall process name 
killall -9 lighttpd
 
Another command to view process going on the server,
 
 
 
ps aufx 
Usage :- 
 
 
 
ps aufx | grep processname 
example :- 
 
ps aufx | grep nobody
 
ps -aux | grep ftp >> used for checking ftp action taken by user like uploading /downloading files
 
 
 
Log files :-
 
 
 
tail -f /usr/local/apache/logs/access_log :- 
tail -f /usr/local/apache/logs/error_log :- site access error logs
tail -f /var/log/exim_mainlog :- mail logs. 
usr/local/apache/logs :: access log, error log, if configured php logs, domain logs(domlogs),module logs, httpd pid
tail -f /usr/local/apache/logs/access_log fro httpd 
 
/var/log/
* /var/log/message: Genreal message and system releated stuff
* /var/log/auth.log: Authenication logs
* /var/log/kern.log: Kernel logs
* /var/log/cron.log: Crond logs
* /var/log/maillog: Mail logs
* /var/log/qmail/ : Qmail log directory (more files inside this directory)
* /var/log/httpd/: Apache access and error logs directory
* /var/log/lighttpd: Lighttpd access and error logs directory
* /var/log/boot.log : System boot log
* /var/log/mysqld.log: MySQL database server log file
* /var/log/secure: Authentication log
* /var/log/utmp or /var/log/wtmp : Login records file
* /var/log/yum.log: Yum log files
 
 
For spamming issue or high mail queue you can check the logs 
 
tail -f /var/log/exim_mainlog | grep sendmail, public_html, tmp
 
MYSQL:-
 
mysqladmin processlist :- shows current mysql database usage
 
watch mysqladmin processlist :- dynamic usage of mysql process .
 
Service restart commands- /scripts/restartsrv_servicename
restartsrv_entropychat*
restartsrv_exim*
restartsrv_eximstats*
restartsrv_ftpserver*
restartsrv_httpd*
restartsrv_imap*
restartsrv_inetd*
restartsrv_interchange*
restartsrv_ipaliases*
restartsrv_melange*
restartsrv_mysql*
restartsrv_named*
restartsrv_nsd*
restartsrv_postgres*
restartsrv_postgresql*
restartsrv_proftpd*
restartsrv_pureftpd*
restartsrv_rsyslogd*
restartsrv_spamd*
restartsrv_sshd*
restartsrv_syslogd*
restartsrv_tailwatchd*
restartsrv_tomcat*
restartsrv_xinetd*
آموزش به پایان رسید .
موفق باشید.