//系統
# cat /etc/redhat-release
CentOS release 6.7 (Final)
# uname -r
2.6.32-573.el6.x86_64
# cat /etc/sysconfig/keepalived
==========分割線==========
# Options for keepalived. See `keepalived --help' output and keepalived(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-checker subsystem.
# --dont-release-vrrp -V Dont remove VRRP VIPs & VROUTEs on daemon stop.
# --dont-release-ipvs -I Dont remove IPVS topology on daemon stop.
# --dump-conf -d Dump the configuration data.
# --log-detail -D Detailed log messages.
# --log-facility -S 0-7 Set local syslog facility (default=LOG_DAEMON)
#
KEEPALIVED_OPTIONS="-D -d -S 0" ##增加 -d -S 0
==========分割線==========
# cat /etc/rsyslog.conf //最末行增加以下内容
==========分割線==========
##Keepalived log
local0.* /var/log/keepalived.log
==========分割線==========
# /etc/init.d/keepalived restart //重新開機Keepalived
# /etc/init.d/rsyslog restart //重新開機rsyslog
# tail -f /var/log/keepalived.log //檢視log