标签:sys nginx 一个 timeout 常用 ctr top multi lib
systemctl status SERVICE -l
-l选项显示完整选项
journalctl -u SERVICE
使用journalct命令查看
[root@www ~]# vim /lib/systemd/system/nginx-test.service
[Unit]
Description=Test Service
[Service]
Type=forking
ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s TERM $MAINPID
[Install]
WantedBy=multi-user.target
[root@www ~]# systemctl enable nginx-test
Created symlink from /etc/systemd/system/multi-user.target.wants/nginx-test.service to /usr/lib/systemd/system/nginx-test.service.
SIGHUP: 无需关闭进程而让其重读配置
SIGQUIT: 终止进程,由QUIT字符(通常是Ctrl-)来控制,进程在因收到SIGQUIT退出时会产生core文件
SIGTERM: 程序结束(terminate)信号,该信号可以被阻塞和处理。通常用来要求程序自己正常退出
SIGNTERRUPT: 允许信号中断系统调用
netstat -tan|awk ‘/TIMEOUT/{state[$NF]}END{for(i in state) {print i,state[i]}‘
标签:sys nginx 一个 timeout 常用 ctr top multi lib
原文地址:http://blog.51cto.com/5190716/2340108