6.1. 直接用命令管理
启动hetao
- $ hetao ~/etc/hetao.conf
查询hetao进程
- $ ps -ef | grep hetao | grep -v grep
- calvin 14876 1 0 00:10 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
- calvin 14877 14876 0 00:10 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
优雅的重启hetao,或者重载配置文件
- $ ps -ef | grep hetao | grep -v grep
- calvin 14876 1 0 00:10 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
- calvin 14877 14876 0 00:10 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
- $ kill -USR2 14876
- $ ps -ef | grep hetao | grep -v grep
- calvin 14876 1 0 00:10 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
- calvin 14877 14876 0 00:10 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
- calvin 14889 1 0 00:12 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
- calvin 14890 14889 0 00:12 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
- $ kill 14876
- $ ps -ef | grep hetao | grep -v grep
- calvin 14889 1 0 00:12 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
- calvin 14890 14889 0 00:12 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
向hetao发送重新打开日志文件信号
- $ kill -USR1 14889
停止hetao
- $ kill 14889