6.2. 用自带脚本管理

启动hetao(默认配置文件路径~/etc/hetao.conf)

  1. $ hetao.do start
  2. hetao start ok
  3. calvin 14703 1 0 00:05 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
  4. calvin 14704 14703 0 00:05 ? 00:00:00 hetao /home/calvin/etc/hetao.conf

查询hetao进程

  1. $ hetao.do status
  2. calvin 14703 1 0 00:05 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
  3. calvin 14704 14703 0 00:05 ? 00:00:00 hetao /home/calvin/etc/hetao.conf

重启hetao

  1. $ hetao.do restart
  2. calvin 14703 1 0 00:05 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
  3. calvin 14704 14703 0 00:05 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
  4. hetao end ok
  5. hetao start ok
  6. calvin 14761 1 0 00:06 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
  7. calvin 14762 14761 0 00:06 ? 00:00:00 hetao /home/calvin/etc/hetao.conf

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

  1. $ hetao.do restart_graceful
  2. calvin 14761 1 0 00:06 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
  3. calvin 14762 14761 0 00:06 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
  4. new hetao pid[14796] start ok
  5. old hetao pid[14761] end ok
  6. calvin 14796 1 0 00:06 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
  7. calvin 14797 14796 0 00:06 ? 00:00:00 hetao /home/calvin/etc/hetao.conf

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

  1. $ hetao.do relog
  2. calvin 14796 1 0 00:06 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
  3. calvin 14797 14796 0 00:06 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
  4. send signal to hetao for reopenning log

停止hetao

  1. $ hetao.do stop
  2. calvin 14796 1 0 00:06 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
  3. calvin 14797 14796 0 00:06 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
  4. hetao end ok