10/31/13

HAProxy+keepalived MySQL负载均衡

环境:vip 192.168.0.233

mysql1  192.168.0.227:3306

mysql2  192.168.0.230:3306

1. 监控脚本编写(mysqlrep_status.sh)

#!/bin/bash
#
# /opt/phpdba/keepalived/etc/keepalived/mysqlrep_status.sh
#
# This script checks if a mysql server is healthy running on localhost. It will return:
#
# "HTTP/1.x 200 OK\r" (if mysql is running smoothly)
#
# – OR –
#
# "HTTP/1.x 503 Internal Server Error\r" (else)
#

MYSQL_HOST="127.0.0.1"
MYSQL_PORT="3306"
MYSQL_USERNAME="root"
MYSQL_PASSWORD="123456"
MYSQL_MAXTHREADNUM="30"

# We perform a simple query that should return a few results
/opt/phpdba/mysql/bin/mysql -h $MYSQL_HOST -P $MYSQL_PORT -u $MYSQL_USERNAME -p$MYSQL_PASSWORD -e "show full processlist;" >/tmp/processlist.txt
/opt/phpdba/mysql/bin/mysql -h $MYSQL_HOST -P $MYSQL_PORT -u $MYSQL_USERNAME -p$MYSQL_PASSWORD -e "show slave status\G;" >/tmp/rep.txt
iostat=`grep "Slave_IO_Running" /tmp/rep.txt  |awk '{print $2}'`
sqlstat=`grep "Slave_SQL_Running" /tmp/rep.txt |awk '{print $2}'`
result=$(cat /tmp/processlist.txt|wc -l)

#echo processlist num:$result iostat:$iostat and sqlstat:$sqlstat
# if slave_IO_Running and Slave_sql_Running ok,then return 200 code
if [ "$result" -lt "$MYSQL_MAXTHREADNUM" ] && [ "$iostat" = "Yes" ] && [ "$sqlstat" = "Yes" ];

then
        # mysql is fine, return http 200
        /bin/echo -e "HTTP/1.1 200 OK\r\n"

else
        # mysql is down, return http 503
        /bin/echo -e "HTTP/1.1 503 Service Unavailable\r\n"

fi

 

2、系统监听服务

a、修改/etc/service文件,

mysqlcheck      8890/tcp                # Mysql Check
mysqlcheck      8890/udp                # Mysql Check

b、在/etc/xinetd.d/目录下添加mysqlchk

service mysqlcheck
{
flags           = REUSE
socket_type     = stream
port            = 8890
wait            = no
user            = root
server          = /opt/phpdba/keepalived/etc/keepalived/mysqlrep_status.sh
log_on_failure  += USERID
disable         = no
}

或者 /etc/xinetd.conf 添加

mysqlcheck stream tcp nowait root /opt/phpdba/keepalived/etc/keepalived/mysqlrep_status.sh mysqlcheck

c、重启xinetd (如无此服务,yum -y install xinetd)

/etc/init.d/xinetd restart   or service xinetd restart

d、telnet 测试

telnet 192.168.0.233 8890
Trying 192.168.0.233…
Connected to 192.168.0.233.
Escape character is ‘^]’.
HTTP/1.1 200 OK

Connection closed by foreign host.

3、haproxy配置

global
        log 127.0.0.1 local3 notice
        maxconn 20480
        uid mysql
        gid mysql
        daemon
        nbproc 1
        pidfile /opt/phpdba/haproxy/logs/haproxy.pid

defaults
        log     global
        mode    http
        #option httplog
        option  dontlognull
        retries 3
        option  redispatch
        maxconn 20480
        contimeout      5000
        clitimeout      50000
        srvtimeout      50000

listen  MYSQL_SLAVE  0.0.0.0:3333
        #cookie SERVERID rewrite
        mode tcp
        maxconn 20480
        balance roundrobin
        option httpchk OPTIONS * HTTP/1.1\r\nHost:\ www
        server  mysql_227 192.168.0.227:3306  check port 8890 inter 5s rise 2 fall 3
        server  mysql_230 192.168.0.230:3306  check port 8890 inter 5s rise 2 fall 3
        srvtimeout      20000

listen  admin_status
        mode  http
        bind 0.0.0.0:8899
        option httplog
        log global
        stats enable
        stats refresh 10s
        stats hide-version
        stats realm Haproxy\ Statistics
        stats uri  /admin-status
        stats auth  admin:123456
        stats admin if TRUE

4、keepalived.conf

! Configuration File for keepalived

vrrp_script chk_http_port {
        script "/opt/phpdba/keepalived/etc/keepalived/check_haproxy.sh"
        interval 2
        weight 2

        global_defs {
                router_id LVS_db_phpdba
        }

        vrrp_instance VI_1 {
                state MASTER
                interface em1
                virtual_router_id 51
                priority 150
                advert_int 1
                authentication {
                        auth_type PASS
                        auth_pass phpdba
                }

                track_script {
                        chk_http_port
                }

                virtual_ipaddress {
                        192.168.0.233
                }
        }
}

5、haproxy进程监控(check_haproxy.sh)

#!/bin/bash
A=`ps -C haproxy --no-header |wc -l`
if [ $A -eq 0 ];then
        /opt/phpdba/haproxy/sbin/haproxy -f /opt/phpdba/haproxy/conf/haproxy.cfg
        sleep 3
        if [ `ps -C haproxy --no-header |wc -l` -eq 0 ];then
                /etc/init.d/keepalived stop
        fi
fi

6、haproxy 启动脚本

cat /etc/init.d/haproxyd

#! /bin/sh
set -e

PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/haproxy/sbin
PROGDIR=/opt/phpdba/haproxy
PROGNAME=haproxy
DAEMON=$PROGDIR/sbin/$PROGNAME
CONFIG=$PROGDIR/conf/$PROGNAME.conf
PIDFILE=$PROGDIR/run/$PROGNAME.pid
DESC="HAProxy daemon"
SCRIPTNAME=/etc/init.d/$PROGNAME

# Gracefully exit if the package has been removed.
test -x $DAEMON || exit 0

start()
{
        echo -n "Starting $DESC: $PROGNAME"
        $DAEMON -f $CONFIG
        echo "."
}

stop()
{
        echo -n "Stopping $DESC: $PROGNAME"
        haproxy_pid=cat $PIDFILE
        kill $haproxy_pid
        echo "."
}

restart()
{
        echo -n "Restarting $DESC: $PROGNAME"
        $DAEMON -f $CONFIG -p $PIDFILE -sf $(cat $PIDFILE)
        echo "."
}

case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart)
        restart
        ;;
  *)
        echo "Usage: $SCRIPTNAME {start|stop|restart}" >&2
        exit 1
        ;;
esac

exit 0

 

10/30/13

配置文件备份方案(expect+shell)

需求描述:备份所有线上服务器squid、httpd、mysql、nginx的配置文件

环境:在公司内网采用expect+shell脚本模式,进行批量备份。expect脚本通过ssh登录服务器,从本地copy一份shell脚本到服务器上,然后执行脚本将配置文件遍历出来传到指定服务器进行备份。

1、expect脚本batch_backupconf.exp

#!/usr/bin/expect
set timeout 30
set target_host [lrange $argv 0 0]
set target_port [lrange $argv 1 1]
set source_host sphinx1906.phpdba.com
set source_port 9191
set login_name root
set password 123456

spawn ssh $target_host -p $target_port -l $login_name -i /root/.ssh/id_rsa

expect {
        "*(yes/no)?"         {
                send  "yes\r"
                exp_continue
        }
        "*assword:"      {
                send "$password\r"
        }
}

expect "#"
send "uname\n"
expect "Linux"
send_user "Now you can do some operation on this terminal\n"
expect "#"
send "scp -P $source_port $source_host:/root/chen-123/expect/backup_conf.sh 
        \/root/ \n"
exec sleep 15
send_user "开始执行代码 \n"
send "sh backup_conf.sh $target_host \n"
expect {
        "*(yes/no)?"    {
                send  "yes\r"
                exp_continue
        }
        "*assword:"     {
                send "$password\r"

        }
}
exec sleep 5
expect "#"
send "rm -f backup_conf.sh \n"
send_user "\nThis is $source_host!\n操作完成!\n"
exec sleep 1
exit

2、shell脚本backup_conf.sh

#!/bin/sh
if [ $# != 1 ];then
        echo "请传参数!"
        exit 1;
fi

for i in `find /opt/phpdba/ -maxdepth 4 -type f -regex ".*\.\(com\|conf\|cnf\)" 
          \-print|grep -E 'httpd\.conf|nginx\.conf|squid\.conf|*\.com|*\.cnf'`;
       do        
        tmp=`echo "$i"|sed s#/#_#g`        
        echo $i
        scp -Pxxx $i xxx.xxx.xxx.xxx:/opt/phpdba/backup_conf/$1_${tmp}
         \`date +%Y%m%d%H`
done

3、batch_backupconf.sh

#!/bin/sh
cat iplist_all|while read line
do
        host_ip=`echo "$line"|awk -F'\t' '{print $1}'`
        host_port=`echo "$line"|awk -F'\t' '{print $2}'`
        echo $host_ip"->"$host_port
        /usr/bin/expect batch_backupconf.exp $host_ip $host_port
done

4、iplist_all
192.168.0.9 22
192.168.0.213 22
192.168.0.114 29622
192.168.0.116 29622

10/29/13

解决umount报device is busy

如果一个文件系统处于“busy”状态的时候,不能卸载该文件系统。如下情况将导致文件系统处于“busy”状态:

1) 文件系统上面有打开的文件

2) 某个进程的工作目录在此文件系统上

3) 文件系统上面的缓存文件正在被使用

 

a、fuser -m /mnt/nfs/dir

b、ps aux|grep pid

c、kill pid

d、umount /mnt/nfs/dir

10/29/13

MySQL中间件 Atlas-1.0.3 安装记录

1、wget https://github.com/Qihoo360/Atlas/archive/1.0.3.tar.gz -o Atlas-1.0.3.tar.gz

2、tar zxvf Atlas-1.0.3.tar.gz

3、cd Atlas-1.0.3

4、vim bootstrap.sh

#!/bin/sh
base=$(cd “$(dirname “$0″)”; pwd)
cd $base
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure –with-mysql=/opt/phpdba/mysql/bin/mysql_config –prefix=/opt/phpdba/atlas_mysql_proxy CFLAGS=”-DHAVE_LUA_H -O2″ LDFLAGS=”-lm -ldl -lcrypto” LUA_CFLAGS=”-I/usr/local/include/” LUA_LIBS=”-L/usr/local/lib -llua”

5、./bootstrap.sh glib版本低,升级之

checking for GLIB… configure: error: Package requirements (glib-2.0 >= 2.32.0) were not met:

Requested ‘glib-2.0 >= 2.32.0′ but version of GLib is 2.22.5

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

6、升级glib

a、wget http://ftp.gnome.org/pub/gnome/sources/glib/2.36/glib-2.36.3.tar.xz

b、xz -d glib-2.36.3.tar.xz && tar xvf glib-2.36.3.tar

c、cd glib-2.36.3 &&  ./configure && make

保存信息:

/root/chen-123/glib-2.36.3/missing: line 81: automake-1.13: command not found
WARNING: ‘automake-1.13′ is missing on your system.
You should only need it if you modified ‘Makefile.am’ or
‘configure.ac’ or m4 files included by ‘configure.ac’.
The ‘automake’ program is part of the GNU Automake package:
<http://www.gnu.org/software/automake>
It also requires GNU Autoconf, GNU m4 and Perl in order to run:
<http://www.gnu.org/software/autoconf>
<http://www.gnu.org/software/m4/>
<http://www.perl.org/>
make[4]: *** [Makefile.in] 错误 127
make[4]: Leaving directory `/root/chen-123/glib-2.36.3/docs/reference/glib’
make[3]: *** [all-recursive] 错误 1
make[3]: Leaving directory `/root/chen-123/glib-2.36.3/docs/reference’
make[2]: *** [all-recursive] 错误 1
make[2]: Leaving directory `/root/chen-123/glib-2.36.3/docs’
make[1]: *** [all-recursive] 错误 1
make[1]: Leaving directory `/root/chen-123/glib-2.36.3′
make: *** [all] 错误 2

d、wget http://ftp.gnu.org/gnu/automake/automake-1.13.3.tar.gz  &&  tar zxvf  automake-1.13.3.tar.gz  && cd automake-1.13.3 &&  ./configure

错误信息:

checking whether autoconf is recent enough… no
configure: error: Autoconf 2.65 or better is required.

e、wget ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz && tar zxvf  autoconf-2.69.tar.gz && cd autoconf-2.69 && ./configure && make && make install

f、cd automake-1.13.3 && ./configure && make   &&make install

g、cd glib-2.36.3 &&  ./configure && make

报错:

configure.ac:66: error: version mismatch.  This is Automake 1.13.3,
configure.ac:66: but the definition used by this AM_INIT_AUTOMAKE
configure.ac:66: comes from Automake 1.13.2.  You should recreate
configure.ac:66: aclocal.m4 with aclocal and run automake again.
gtk-doc.make:32: warning: EXTRA_DIST multiply defined in condition TRUE …
docs/reference/glib/Makefile.am:85:   ‘gtk-doc.make’ included from here
Makefile.decl:8: … ‘EXTRA_DIST’ previously defined here
docs/reference/glib/Makefile.am:2:   ‘Makefile.decl’ included from here
WARNING: ‘automake-1.13′ is probably too old.

h、cd automake-1.13.3 &&  make uninstall  && wget http://ftp.gnu.org/gnu/automake/automake-1.13.2.tar.gz  &&  tar zxvf  automake-1.13.2.tar.gz  && cd automake-1.13.2 &&  ./configure && make && make install

i、cd glib-2.36.3 &&  ./configure && make && make install

7、cd Atlas-1.0.3  &&  ./bootstrap.sh && make && make install    安装完成

10/28/13

去掉wget烦人的 “eta(英国中部时间)” 提示

环境:centos 6.2

现象:使用wget下载时,不断的换行,出现“eta(英国中部时间)”的提示,看着不爽利,解决之。

1、msgunfmt /usr/share/locale/zh_CN/LC_MESSAGES/wget.mo -o – | sed ‘s/eta(英国中部时间)/ETA/’|msgfmt – -o /tmp/zh_CN.mo

2、cp /tmp/zh_CN.mo /usr/share/locale/zh_CN/LC_MESSAGES/wget.mo

至此,wget又回归之前的情况,用户体验好多了!

10/23/13

nginx做前端代理,程序取不到HTTP_X_FORWARDED_FOR值

用nginx做前端代理后,我们发现 HTTP_X_FORWARDED_FOR 无法获取到客户端真实的IP地址。

原因 : nginx 默认并不会增加 X_FORWARDED_FOR 头信息,我们给他加上就好了。

简单配置如下:

  1. location /
  2. {
  3.     proxy_pass          http://www.phpdba.com;
  4.     proxy_set_header    Host             $host;
  5.     proxy_set_header    X-Real-IP        $remote_addr;
  6.     proxy_set_header    X-Forwarded-For  $proxy_add_x_forwarded_for;    //别忘了这一句
  7.     proxy_set_header    HTTP_X_FORWARDED_FOR $remote_addr;              //或是加上这一句
  8.     proxy_redirect      default;
  9. }

重启nginx加载新配置后,就可以获取客户端真实的IP地址了。

10/23/13

静态文件响应POST请求,提示405错误问题

例1:用linux下的curl命令发送POST请求给Apache服务器上的HTML静态页

  1. [root@localhost ~]# curl -d 11=1 http://blog.phpdba.com/index.html
  2. <!DOCTYPE HTML PUBLIC “-//IETF//DTD HTML 2.0//EN”>
  3. <HTML>
  4.     <HEAD>
  5.         <TITLE>405 Method Not Allowed</TITLE>
  6.     </HEAD>
  7.     <BODY>
  8.         <H1>Method Not Allowed</H1>
  9.         The requested method POST is not allowed for the URL /index.html.<P>
  10.         <HR>
  11.         <ADDRESS>Apache/1.3.37 Server at blog.phpdba.com Port 80</ADDRESS>
  12.     </BODY>
  13. </HTML>

例2:用linux下的curl命令发送POST请求给nginx服务器上的HTML静态页

  1. [root@localhost ~]# curl -d 11=1 http://www.phpdba.com/index.htm
  2. <html>
  3.     <head><title>405 Not Allowed</title></head>
  4.     <body bgcolor=”white”>
  5.         <center><h1>405 Not Allowed</h1></center>
  6.         <hr><center>nginx/1.2.0</center>
  7.     </body>
  8. </html>

但在有些应用中,需要使静态文件能够响应POST请求。
对于Nginx,可以修改nginc.conf配置文件,改变“405错误”为“200 ok”,并配置location来解决,方法如下:

  1. server
  2. {
  3.     listen  80;
  4.     server_name www.92csz.com;
  5.     index index.html index.htm index.php;
  6.     root  /opt/htdocs;
  7.     if (-d $request_filename)
  8.     {
  9.         rewrite ^/(.*)([^/])$ http://$host/$1$2/ permanent;
  10.     }
  11.     error_page  405 =200 @405;
  12.     location @405
  13.     {
  14.         root  /opt/htdocs;
  15.     }
  16.     location ~ .*\.php?$
  17.     {
  18.         include conf/fcgi.conf;
  19.         fastcgi_pass  127.0.0.1:10080;
  20.         fastcgi_index index.php;
  21.     }
  22. }

当然也可以修改nginx源代码来解决
修改源代码,重新编译安装nginx
编辑nginx源代码

[root@localhost ~]# vim src/http/modules/ngx_http_static_module.c

修改: 找到下面一段注释掉

  1. /*
  2. if (r->method & NGX_HTTP_POST)
  3. {
  4.     return NGX_HTTP_NOT_ALLOWED;
  5. }
  6. */

然后按照原来的编译参数,重新编译安装nginx,即可!

10/22/13

mysql++-2.1.1 源码修改记录

1、lib/connection.h 添加ping方法声明

int ping(const char* db, const char* host = "",
const char* user = "", const char* passwd = "",
uint port = 0, my_bool compress = 0,
unsigned int connect_timeout = 60, cchar* socket_name = 0,
unsigned int client_flag = 0);

2、lib/connection.cpp ping方法体

int
Connection::ping(const char* db, const char* host,
                const char* user, const char* passwd, uint port,
                my_bool compress, unsigned int connect_timeout,
                cchar* socket_name, unsigned int client_flag)
{
        if (connected()) {
                if(mysql_ping(&mysql_)){
                        mysql_init(&mysql_);
                        if (connect(db, host, user, passwd, port, compress,
                           connect_timeout, socket_name, client_flag)) {
                                unlock();
                                success_ = is_connected_ = true;
                        }
                        else {
                                unlock();
                                success_ = is_connected_ = false;
                                if (throw_exceptions()) {
                                        throw ConnectionFailed(error());
                                }
                        }
                        return success_ ? 0:1;
                }else{
                        return 0;
                }
        }
        else {
                mysql_init(&mysql_);
                if (connect(db, host, user, passwd, port, compress,
                   connect_timeout, socket_name, client_flag)) {
                        unlock();
                        success_ = is_connected_ = true;
                }
                else {
                        unlock();
                        success_ = is_connected_ = false;
                        if (throw_exceptions()) {
                                throw ConnectionFailed(error());
                        }
                }
                return success_ ? 0:1;
        }
}

3、编译安装

        # ./configure
        $ make
        $ su
        # make install

4、应用代码修改

old:this->con->ping() != 0  //无重连机制

new:this->con->ping(DB,HOST, USER, PASSWD, PORT) != 0

代码添加了数据库重连 。

10/22/13

使用lsyncd同步代码和缓存文件目录

1、安装lsyncd

2、配置/etc/lsyncd.conf

settings = {
delay = 1,
maxProcesses = 5,
statusFile = “/tmp/lsyncd.status”,
logfile = “/var/log/lsyncd.log”,
}

targetlist = {
“192.168.0.144:/opt/phpdba/www/html/xxx/”
}

targetlist_cache = {
“192.168.0.122:/tmp/cache/caches/”,
“192.168.0.124:/tmp/cache/caches/”,
“192.168.0.114:/tmp/cache/caches/”,
“192.168.0.113:/tmp/cache/caches/”
}

for _, server in ipairs(targetlist) do
sync{ default.rsync,
source=”/opt/phpdba/www/html/xxx/”,
rsyncOpts={“-rltvupgo”,”-e ssh -p 29622″,”–bwlimit=256″,”–exclude=config.inc.php”},
target=server
}
end

for _, server in ipairs(targetlist_cache) do
sync{ default.rsync,
source=”/opt/phpdba/www/html/ads/adscache/caches/”,
rsyncOpts={“-rltvupgo”,”-e ssh -p 29622″,”–bwlimit=256″},
target=server
}
end

3、/usr/local/bin/lsyncd /etc/lsyncd.conf 启动

10/22/13

服务器常出现的提示及含意

一般类的提示
eth1: Too much work at interrupt, IntrStatus=0×0001
这条提示的含意为. 某网卡的中断请求过多. 如果只是偶尔出现一次可忽略. 但这条提示如果经常出现或是集中出现,那涉及到的可能性就比较多有可能需要进行处理了. 可能性比较多,如网卡性能;服务器性能;网络攻击..等等.

一般类的提示
IPVS: incoming ICMP: failed checksum from 61.172.0.X!
服务器收到了一个校验和错误的ICMP数据包. 这类的数据包有可能是非法产生的垃圾数据.但从目前来看服务器收到这样的数据非常多.一般都忽略.
一般代理服务器在工作时会每秒钟转发几千个数据包.收到几个错误数据包不会影响正常的工作.
这是问我最多的一类提示了.

一般类的提示
NET: N messages suppressed.
服务器忽略了 N 个数据包.和上一条提示类似.服务器收到的数据包被认为是无用的垃圾数据数据. 这类数据多是由攻击类的程序产生的.
这条提示如果 N 比较小的时候可以忽略.但如果经常或是长时间出现3位数据以上的这类提示.就很有可能是服务器受到了垃圾数据类的带宽攻击了.

与这条信息类似的还有.
__ratelimit: N messages suppressed
__ratelimit: N callbacks suppressed

一般类的提示
UDP: bad checksum. From 221.200.X.X:50279 to 218.62.X.X:1155 ulen 24
UDP: short packet: 218.2.X.X:3072 3640/217 to 222.168.X.X:57596
218.26.131.X sent an invalid ICMP type 3, code 13 error to a broadcast: 0.1.0.4 on eth0

服务器收到了一个错误的数据包.分别为 UDP校验和错误; 过短的UDP数据包; 一个错误的ICMP类型数据. 这类信息一般情况下也是非法产生的.
但一般问题不大可直接忽略.

一般类的提示
kernel: conntrack_ftp: partial 227 2205426703+13
FTP_NAT: partial packet 2635716056/20 in 2635716048/2635716075

服务器在维持一条FTP协议的连接时出错. 这样的提示一般都可以直接忽略.

网络通信严重问题!
NETDEV WATCHDOG: eth1: transmit timed out
eth1: link down
eth1: link up, 10Mbps, half-duplex, lpa 0×0000
eth2: link up, 100Mbps, full-duplex, lpa 0x41E1
setting full-duplex based on MII #24 link partner capability of 45e1
这些提示是网络通信中出现严重问题时才会出现. 故障基本和网络断线有关系. 这几条提示分别代表的含意是 某块网卡传送数据超时; 网卡连接down; 网卡连接up,连接速率为10/100Mbps,全/半双功.
这里写到的最后三行的提示比较类似. 出现这类提示时必须注意网络连接状况进行处理!!!

网络通信严重问题!
NIC Link is Up 100 Mbps Full Duplex
情况和 kernel: eth1: link up,…相同.指某块网卡适应的连接速率. 一般认为没有说明哪个网卡down,只是连续出现网卡适应速率也是通信有问题.
如果是网线正常的断接可以忽略这类的信息.

网络通信严重问题!
eth0: Transmit timed out, status 0000, PHY status 786d, resetting…
eth0: Reset not complete yet. Trying harder.

第一条提示 网卡关送数据失败. 复位网卡. 第二条提示 网卡复位不成功…. 这些提示都属于严重的通信问题.

报警程序的提示
0001 ##WMPCheckV001## 2005-04-13_10:10:01 Found .(ARP Spoofing sniffer)! IP:183 MAC:5
0002 ##WMPCheckV001## 2005-04-07_01:53:32 Found .(MAC_incomplete)! IP:173 mac_incomplete:186
0003 ##WMPCheckV001## 2005-04-17_16:25:11 Found .(HIGH_synsent)! totl:4271 SynSent:3490
0004 ##WMPCheckV001## 20……

这是由报警程序所引起的提示. 详细的信息需要用报警程序的客户端进行实时接收.详细情况请查看”告警模块和日志”.

一般类的提示
eth1: Promiscuous mode enabled.
device eth1 entered promiscuous mode
device eth1 left promiscuous mode

这几行提示指. 某块网卡进入(离开)了混杂模式. 一般来说混杂模式是当需要对通信进行抓包时才用到的. 当使用维护或故障分析时会使用到(比如consoletools中的countflow命令). 正常产生的这类提示可以忽略.
如果在前台和远端都没有进行维护时出现这个提示倒是应该引起注意,但这种可能性不大.

基本无关
keyboard: unknown scancode e0 5e

键盘上接收到未定义的键值. 如果经常出现.有可能是键盘有问题. linux对于比较特殊的键或是组合键,有时也会出这样的提示.
要看一下服务器的键盘是不是被压住了. 其它情况一般忽略.

基本无关
uses obsolete (PF_INET,SOCK_PACKET)

系统内核调用了一部分功能模块,在第一次调入时会出现. 一般情况与使用调试工具有关. 可直接忽略.

网络通信故障
Neighbour table overflow.

出现这个提示.一般都是因为局域网内有部分计算机被病毒感染. 情况严重时会影响通信. 必须处理内部网通信不正常的计算机.

网络通信故障
eth1: Transmit error, Tx status register 82.
Probably a duplex mismatch. See Documentation/networking/vortex.txt
Flags; bus-master 1, dirty 9994190(14) current 9994190(14)
Transmit list 00000000 vs. f7171580.
0: @f7171200 length 800001e6 status 000101e6
1: @f7171240 length 8000008c status 0001008c
….

这个提示是3com网卡特有的. 感觉如果出现量不大的话也不会影响很严重. 目前看维一的解决办法是更换服务器上的网卡. 实在感觉3com的网卡有些问题…

服务器系统严重故障
CPU0: Temperature above threshold
CPU0: Running in modulated clock mode

服务器CPU工作温度过高. 必须排除硬件故障.

服务器系统严重故障
I/O error, dev hda, sector N
I/O error, dev sda, sector N

hda: dma_intr: status=0×51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0×40 { UncorrectableError }, LBAsect=811562, sector=811560
服务器系统磁盘存储卡操作失败. 这样的问题一般不会使服务器直接停止工作, 但会引起很多严重问题