Module: RTwatchdog
- Defined in:
- lib/rt_watchdog.rb,
lib/rt_watchdog/daemon.rb
Defined Under Namespace
Classes: Daemon
Constant Summary collapse
- BIN =
RT binary name without path
'rt-server.fcgi'
- RT_SBIN =
RT sbin directory
'/opt/rt4/sbin'
- PID =
command to get PID of RT
"ps -e awk '$4 ~ /^#{BIN}$/ {print $1}'"
- START =
command to start RT
"spawn-fcgi -u www-data -g www-data -a 127.0.0.1 -p 9000 #{RT_SBIN}/#{BIN}"
- STOP =
command to stop RT
"kill `#{PID}`"
- REALLY_STOP =
command to stop RT even if it refuses to stop
"kill -9 `#{PID}`"
- RUNNING =
command to check whether RT is running
"ps -e | awk '$4 ~ /^#{BIN}$/'"
- RAM =
command to obtain RT’s current RAM usage in bytes
"ps -e -o rss,comm | awk '$2 ~ /^#{BIN}$/ {print $1}'"
- MAX_RAM =
the maximum allowed rss size for RT
128 * 1024 * 1024
- TIMEOUT =
number of seconds before timeout
10