Method: LinuxStat::ProcessInfo.shared_memory

Defined in:
lib/linux_stat/process_info.rb

.shared_memory(pid = $$) ⇒ Object

shared_memory(pid = $$)

Where pid is the process ID.

By default it is the id of the current process ($$)

It retuns the shared memory for the process.

The value is in kilobytes.

The output is an Integer. For example:

LinuxStat::ProcessInfo.shared_memory

=> 13996.032

If the info isn’t available it will return nil.



234
235
236
# File 'lib/linux_stat/process_info.rb', line 234

def shared_memory(pid = $$)
	LinuxStat::ProcFS.statm_shared(pid) &.fdiv(1000)
end