bin/check-java-permgen.rb in sensu-plugins-java-2.0.0 vs bin/check-java-permgen.rb in sensu-plugins-java-3.0.0
- old
+ new
@@ -62,10 +62,10 @@
pu = cmd.read.split[9]
end
exit_code = $CHILD_STATUS.exitstatus
next if exit_code != 0
- proc_permgen = (pu.to_f / pgcmx.to_f) * 100
+ proc_permgen = (pu / pgcmx.to_f) * 100
warn_procs << java_proc if proc_permgen > config[:warn].to_f
crit_procs << java_proc if proc_permgen > config[:crit].to_f
end
if !crit_procs.empty?