lib/hawatel_ps/windows/proc_fetch.rb
# Return percent of memory usage by process
# @return [String]
Return percent of memory usage by process
Return percent of memory usage by process
def memory_percent(mem_total_kb, workingsetsize)
          if !mem_total_kb.nil? && !workingsetsize.nil? && mem_total_kb.to_i > 0
            rss_kb = workingsetsize.to_f / 1024
            return (rss_kb / mem_total_kb.to_f * 100).round(2).to_s
          end
        end
def memory_percent ( mem_total_kb , workingsetsize ) if ! mem_total_kb . nil? && ! workingsetsize . nil? && mem_total_kb . to_i > 0 rss_kb = workingsetsize . to_f / 1024 return ( rss_kb / mem_total_kb . to_f * 100 ) . round ( 2 ) . to_s end end
Return percent of memory usage by process
Return percent of memory usage by process
None
String
mem_total_kb
workingsetsize