lib/mpatch/process.rb in mpatch-1.0.2 vs lib/mpatch/process.rb in mpatch-1.1.0

- old
+ new

@@ -1,5 +1,19 @@ module Process + + # return a string obj that include the memory usage info + def self.memory_usage + + begin + return `pmap #{self.pid}`.lines.to_a( + ).last.chomp.scan(/ *\w* *(\w+)/)[0][0] + rescue NoMethodError + return nil + end + + end + + def self.daemonize File.create Application.pid,'a+' File.create Application.log,'a+' File.create Application.daemon_stderr,'a+' Daemon.start fork, \ No newline at end of file