|
[root@test222 ~]# chmod +x !$ chmod +x /usr/local/sbin/check_ng.sh
[root@test222 ~]# service nginx stop
Stoping nginx... done
[root@test222 ~]# ps aux | grep nginx
root 16906 0.0 0.0 110244 896 pts/2 S+ 22:47 0:00 grep --color=auto nginx
[root@test222 ~]# systemctl start keepalived
[root@test222 ~]# systemctl status keepalived
● keepalived.service - LVS and VRRP High Availability Monitor
Loaded: loaded (/usr/lib/systemd/system/keepalived.service; disabled; vendor preset: disabled)
Active: active (running) since 日 2018-03-25 22:47:48 CST; 31s ago
Process: 16913 ExecStart=/usr/sbin/keepalived $KEEPALIVED_OPTIONS (code=exited, status=0/SUCCESS)
Main PID: 16914 (keepalived)
CGroup: /system.slice/keepalived.service
├─10576 nginx: master process /www/server/nginx/sbin/nginx -c /www/server/nginx/conf/nginx.con
├─10577 nginx: worker process
├─10578 nginx: worker process
├─10579 nginx: worker process
├─10580 nginx: worker process
├─10581 nginx: cache manager process
├─10582 nginx: cache loader process
├─10593 /usr/sbin/keepalived -D
├─10594 /usr/sbin/keepalived -D
└─10595 /usr/sbin/keepalived -D
3月 25 22:47:48 test222 Keepalived_vrrp[16916]: Registering Kernel netlink command channel
3月 25 22:47:48 test222 Keepalived_vrrp[16916]: Registering gratuitous ARP shared channel
3月 25 22:47:48 test222 Keepalived_vrrp[16916]: Opening file '/etc/keepalived/keepalived.conf'.
3月 25 22:47:48 test222 Keepalived_vrrp[16916]: Truncating auth_pass to 8 characters
3月 25 22:47:48 test222 Keepalived_vrrp[16916]: VRRP_Instance(VI_1) removing protocol VIPs.
3月 25 22:47:48 test222 Keepalived_vrrp[16916]: SECURITY VIOLATION - scripts are being executed but script_security not enabled.
3月 25 22:47:48 test222 Keepalived_vrrp[16916]: Using LinkWatch kernel netlink reflector...
3月 25 22:47:48 test222 Keepalived_vrrp[16916]: VRRP_Instance(VI_1) Entering BACKUP STATE
3月 25 22:47:48 test222 Keepalived_vrrp[16916]: VRRP sockpool: [ifindex(2), proto(112), unicast(0), fd(10,11)]
3月 25 22:47:48 test222 Keepalived_vrrp[16916]: VRRP_Script(chk_nginx) succeeded
Hint: Some lines were ellipsized, use -l to show in full.
[root@test222 ~]# ps aux | grep nginx
root 16930 0.0 0.0 108620 3180 ? Ss 22:47 0:00 nginx: master process /www/server/nginx/sbin/nginx -c /www/server/nginx/conf/nginx.conf
www 16931 0.0 0.1 139340 29248 ? S 22:47 0:00 nginx: worker process
www 16932 0.0 0.1 139340 29248 ? S 22:47 0:00 nginx: worker process
www 16933 0.0 0.1 139340 29248 ? S 22:47 0:00 nginx: worker process
www 16934 0.0 0.1 139340 29248 ? S 22:47 0:00 nginx: worker process
www 16935 0.0 0.0 108620 3868 ? S 22:47 0:00 nginx: cache manager process
www 16936 0.0 0.0 108620 3616 ? S 22:47 0:00 nginx: cache loader process
root 17052 0.0 0.0 110248 900 pts/2 S+ 22:48 0:00 grep --color=auto nginx
[root@test222 ~]#
|
|
|