6.1. 直接用命令管理

启动hetao

  1. $ hetao ~/etc/hetao.conf

查询hetao进程

  1. $ ps -ef | grep hetao | grep -v grep
  2. calvin 14876 1 0 00:10 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
  3. calvin 14877 14876 0 00:10 ? 00:00:00 hetao /home/calvin/etc/hetao.conf

优雅的重启hetao,或者重载配置文件

  1. $ ps -ef | grep hetao | grep -v grep
  2. calvin 14876 1 0 00:10 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
  3. calvin 14877 14876 0 00:10 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
  4. $ kill -USR2 14876
  5. $ ps -ef | grep hetao | grep -v grep
  6. calvin 14876 1 0 00:10 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
  7. calvin 14877 14876 0 00:10 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
  8. calvin 14889 1 0 00:12 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
  9. calvin 14890 14889 0 00:12 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
  10. $ kill 14876
  11. $ ps -ef | grep hetao | grep -v grep
  12. calvin 14889 1 0 00:12 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
  13. calvin 14890 14889 0 00:12 ? 00:00:00 hetao /home/calvin/etc/hetao.conf

向hetao发送重新打开日志文件信号

  1. $ kill -USR1 14889

停止hetao

  1. $ kill 14889