在Linux下查看Apache的负载情况,以前也说过,最简单有有效的方式就是查看Apache Server Status(如何开启Apache Server Status点这里),在没有开启Apache Server Status的情况下,或安装的是其他的Web Server,比如Nginx的时候,下面的命令就体现出作用了. ps -ef|grep httpd|wc -l命令#ps -ef|grep httpd|wc -l1388统计httpd进程数,连个请求会启动一个进程,使用于Apache服
查看最大连接数 select VARIABLE_VALUE from information_schema.GLOBAL_VARIABLES where VARIABLE_NAME='MAX_CONNECTIONS'; 或者 show variables like '%max_connections%'; 查看当前连接数明细 show processlist; 设置最大连接数(一次性,重启mysql后还原) set global max_connections=200. show status