6.2. 用自带脚本管理
启动hetao(默认配置文件路径~/etc/hetao.conf)
- $ hetao.do start
- hetao start ok
- calvin 14703 1 0 00:05 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
- calvin 14704 14703 0 00:05 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
查询hetao进程
- $ hetao.do status
- calvin 14703 1 0 00:05 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
- calvin 14704 14703 0 00:05 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
重启hetao
- $ hetao.do restart
- calvin 14703 1 0 00:05 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
- calvin 14704 14703 0 00:05 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
- hetao end ok
- hetao start ok
- calvin 14761 1 0 00:06 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
- calvin 14762 14761 0 00:06 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
优雅的重启hetao,或者重载配置文件
- $ hetao.do restart_graceful
- calvin 14761 1 0 00:06 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
- calvin 14762 14761 0 00:06 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
- new hetao pid[14796] start ok
- old hetao pid[14761] end ok
- calvin 14796 1 0 00:06 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
- calvin 14797 14796 0 00:06 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
向hetao发送重新打开日志文件信号
- $ hetao.do relog
- calvin 14796 1 0 00:06 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
- calvin 14797 14796 0 00:06 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
- send signal to hetao for reopenning log
停止hetao
- $ hetao.do stop
- calvin 14796 1 0 00:06 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
- calvin 14797 14796 0 00:06 ? 00:00:00 hetao /home/calvin/etc/hetao.conf
- hetao end ok