Sha256: 2a6141cef7d17f02cb0170fbde1cec9206c85be93218fee8628896e2645532c2
Contents?: true
Size: 543 Bytes
Versions: 11
Compression:
Stored size: 543 Bytes
Contents
module Kurchatov module Mixin module Command def shell_out(cmd) mix = ::Mixlib::ShellOut.new(cmd) mix.run_command mix end def shell_out!(cmd) mix = shell_out(cmd) mix.error! mix end def shell(cmd) mix = shell_out!(cmd) mix.stdout end def print_unix_mem_info pid, size = `ps ax -o pid,rss | grep -E "^[[:space:]]*#{$$}"`.strip.split.map(&:to_i) puts "Pid: #{pid}, memusage: #{size}" end end end end
Version data entries
11 entries across 11 versions & 1 rubygems