LVS日志

默认,keeplived也是把默认的日志写在messages,这TM很鼓励人啊,随后Google

 

1.在主从keeplived节点上vim/etc/sysconfig/keepalived文件

 

#vi /etc/sysconfig/keepalived

 

# Options for keepalived. See `keepalived --help' output andkeepalived(8) and

# keepalived.conf(5) man pages for a list of all options.Here are the most

# common ones :

#

# --vrrp               -P   Only run with VRRP subsystem.

# --check             -C    Only run with Health-checkersubsystem.

# --dont-release-vrrp -V    Dont remove VRRP VIPs &VROUTEs on daemon stop.

# --dont-release-ipvs -I    Dont remove IPVS topology ondaemon stop.

# --dump-conf         -d    Dump the configuration data.

# --log-detail        -D    Detailed log messages.

# --log-facility      -S    0-7 Set local syslogfacility (default=LOG_DAEMON)

#

 

#KEEPALIVED_OPTIONS="-D"     #原配置文件

#KEEPALIVED_OPTIONS="-D -d -S 0"

KEEPALIVED_OPTIONS="-D -d -S 0" #修改成现在的配置

 

 

##参数解释都在#注释里面

 

2. 修改主从节点日志配置文件/etc/rsyslog.conf

#touch /var/log/keepalived.log

 

#vi /etc/rsyslog.conf

加入如下配置

#keepalived -S 0

local0.* /var/log/keepalived.log

 

3.重启日志服务

# /etc/init.d/rsyslog restart

# /etc/init.d/keepalived restart

 

4.检查/var/log/keepalived.log文件是否存在

# cat /var/log/keepalived.log



LVS的日志文件在可以从/var/log/message从得到.从这里你可以得到你在运行lvs各种服务时是否有报错信息,以及错误的来源与故障点,这个文件是系统排错时的理想助手.建议经常使用,方便排错与日常维护.

 

查看:tail -f /var/log/message

 



YWSOS.COM 平台代运维解决方案
 评论
 发表评论
姓   名:

Powered by AKCMS