puppet: Fixed puppet check for Ruby 2.
This commit is contained in:
parent
b9c744428b
commit
dcd0d7504e
1 changed files with 1 additions and 1 deletions
|
@ -34,7 +34,7 @@ begin
|
||||||
Process.kill(0, pid)
|
Process.kill(0, pid)
|
||||||
|
|
||||||
# check memory usage and restart if over 160M
|
# check memory usage and restart if over 160M
|
||||||
rss = `ps -o rss -p '#{pid}'`.to_a.last.to_i / 1024
|
rss = `ps -o rss -p '#{pid}'`.split("\n").last.to_i / 1024
|
||||||
if rss > 160
|
if rss > 160
|
||||||
err = sprintf("puppetd memory usage too high (%d MB), on host '%s' sending HUP\n",
|
err = sprintf("puppetd memory usage too high (%d MB), on host '%s' sending HUP\n",
|
||||||
rss, Socket.gethostname)
|
rss, Socket.gethostname)
|
||||||
|
|
Loading…
Add table
Reference in a new issue