centos 僵尸进程解决办法
2024年7月17日更新:
有些僵尸进程无法直接kill,需要杀死其父进程才行。
查找僵尸进程父进程并杀死。
ps -ef | grep 9802(僵尸进程id)
kill -9 6700(父进程id)
但是有些僵尸进程杀死父进程后父进程id会变成1,这种情况就只能重启服务器解决了.
---------------------------------------
最近工作过程中,发现好几台服务器出现僵死进程. 使用命令找出僵死进程:
ps -A -o stat,ppid,pid,cmd | grep -e '^[Zz]'
命令注解:
ps -C java -o lstart,pid,cmd #不过貌似打印的不全
ps -A -o lstart,pid,args |grep java #这个可以的
因为状态为 z或者Z 的进程为僵尸进程,所以我们使用grep抓取stat状态为zZ进程. 这里一共出现了9个僵死进程,需要把它们都干掉,执行命令:
kill -9 8310
这时再执行查找僵死的进程,发现所有僵死进程都没了.
Centos5.5下lvs+keepalived集群
第一步、环境准备:
lvs-master:10.80.11.245
lvs-backup:10.80.11.246
vip:10.80.11.240
web1:10.80.11.243
web2:10.80.11.244
netmask:255.255.255.0
gateway:10.80.11.1
接下来关掉一些不必要的系统服务:
chkconfig bluetooth off
chkconfig firstboot off
chkconfig cups off
chkconfig ip6tables off
chkconfig iptables off
chkconfig isdn off
chkconfig kudzu off
chkconfig sendmail off
chkconfig smartd off
chkconfig autofs off
service bluetooth stop
service firstboot stop
service cups stop
service ip6tables stop
service iptables stop
service isdn stop
service kudzu stop
service sendmail stop
service smartd stop
service autofs stop
服务器时间校对:
$ crontab -e
加入一行:
0 3 * * * /usr/sbin/ntpdate 210.72.145.44 > /dev/null 2>&1
第二步、安装软件:
$cd /usr/local/src
$wget http://www.linuxvirtualserver.org/software/kernel-2.6/ipvsadm-1.24.tar.gz
$wget http://www.keepalived.org/software/keepalived-1.1.15.tar.gz
$ln -s...
configure error no acceptable cc...
出现错误:
loading cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking build system type... i686-pc-linux-gnu
checking for a BSD compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... no
checking for cc... no
configure: error: no acceptable cc found in $PATH
解决办法:
yum install gcc
让ecshop支持GD
需要有服务器的管理权限. 把配置文件php.ini里的;extension=php_gd2.dll前面的;去掉. 重启iis或apache就好了.
ubuntu下看迅雷看看
其实是可以在线看迅雷看看的,安装火狐插件User Agent Switcher 选择iphone 或者设置ipad都行.
直接在线就能看的.
linux 添加全局环境变量
vi /etc/bashrc
export PATH=$PATH:/usr/local/git/bin