Class: ProcStat
- Inherits:
-
Struct
- Object
- Struct
- ProcStat
- Defined in:
- lib/madvertise/proc_stat.rb,
lib/madvertise/proc_stat.rb
Instance Attribute Summary collapse
-
#blocked ⇒ Object
Returns the value of attribute blocked.
-
#cguest_time ⇒ Object
Returns the value of attribute cguest_time.
-
#cmajflt ⇒ Object
Returns the value of attribute cmajflt.
-
#cminflt ⇒ Object
Returns the value of attribute cminflt.
-
#cnswap ⇒ Object
Returns the value of attribute cnswap.
-
#cstime ⇒ Object
Returns the value of attribute cstime.
-
#cutime ⇒ Object
Returns the value of attribute cutime.
-
#delayacct_blkio_ticks ⇒ Object
Returns the value of attribute delayacct_blkio_ticks.
-
#endcode ⇒ Object
Returns the value of attribute endcode.
-
#exit_signal ⇒ Object
Returns the value of attribute exit_signal.
-
#flags ⇒ Object
Returns the value of attribute flags.
-
#guest_time ⇒ Object
Returns the value of attribute guest_time.
-
#itrealvalue ⇒ Object
Returns the value of attribute itrealvalue.
-
#kstkeip ⇒ Object
Returns the value of attribute kstkeip.
-
#kstkesp ⇒ Object
Returns the value of attribute kstkesp.
-
#majflt ⇒ Object
Returns the value of attribute majflt.
-
#minflt ⇒ Object
Returns the value of attribute minflt.
-
#nice ⇒ Object
Returns the value of attribute nice.
-
#nswap ⇒ Object
Returns the value of attribute nswap.
-
#num_threads ⇒ Object
Returns the value of attribute num_threads.
-
#pgrp ⇒ Object
Returns the value of attribute pgrp.
-
#policy ⇒ Object
Returns the value of attribute policy.
-
#ppid ⇒ Object
Returns the value of attribute ppid.
-
#priority ⇒ Object
Returns the value of attribute priority.
-
#processor ⇒ Object
Returns the value of attribute processor.
-
#rss ⇒ Object
Returns the value of attribute rss.
-
#rsslim ⇒ Object
Returns the value of attribute rsslim.
-
#rt_priority ⇒ Object
Returns the value of attribute rt_priority.
-
#session ⇒ Object
Returns the value of attribute session.
-
#sigcatch ⇒ Object
Returns the value of attribute sigcatch.
-
#sigignore ⇒ Object
Returns the value of attribute sigignore.
-
#signal ⇒ Object
Returns the value of attribute signal.
-
#startcode ⇒ Object
Returns the value of attribute startcode.
-
#startstack ⇒ Object
Returns the value of attribute startstack.
-
#starttime ⇒ Object
Returns the value of attribute starttime.
-
#stime ⇒ Object
Returns the value of attribute stime.
-
#tpgid ⇒ Object
Returns the value of attribute tpgid.
-
#tty_nr ⇒ Object
Returns the value of attribute tty_nr.
-
#utime ⇒ Object
Returns the value of attribute utime.
-
#vsize ⇒ Object
Returns the value of attribute vsize.
-
#wchan ⇒ Object
Returns the value of attribute wchan.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#blocked ⇒ Object
Returns the value of attribute blocked
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def blocked @blocked end |
#cguest_time ⇒ Object
Returns the value of attribute cguest_time
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def cguest_time @cguest_time end |
#cmajflt ⇒ Object
Returns the value of attribute cmajflt
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def cmajflt @cmajflt end |
#cminflt ⇒ Object
Returns the value of attribute cminflt
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def cminflt @cminflt end |
#cnswap ⇒ Object
Returns the value of attribute cnswap
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def cnswap @cnswap end |
#cstime ⇒ Object
Returns the value of attribute cstime
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def cstime @cstime end |
#cutime ⇒ Object
Returns the value of attribute cutime
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def cutime @cutime end |
#delayacct_blkio_ticks ⇒ Object
Returns the value of attribute delayacct_blkio_ticks
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def delayacct_blkio_ticks @delayacct_blkio_ticks end |
#endcode ⇒ Object
Returns the value of attribute endcode
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def endcode @endcode end |
#exit_signal ⇒ Object
Returns the value of attribute exit_signal
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def exit_signal @exit_signal end |
#flags ⇒ Object
Returns the value of attribute flags
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def flags @flags end |
#guest_time ⇒ Object
Returns the value of attribute guest_time
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def guest_time @guest_time end |
#itrealvalue ⇒ Object
Returns the value of attribute itrealvalue
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def itrealvalue @itrealvalue end |
#kstkeip ⇒ Object
Returns the value of attribute kstkeip
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def kstkeip @kstkeip end |
#kstkesp ⇒ Object
Returns the value of attribute kstkesp
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def kstkesp @kstkesp end |
#majflt ⇒ Object
Returns the value of attribute majflt
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def majflt @majflt end |
#minflt ⇒ Object
Returns the value of attribute minflt
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def minflt @minflt end |
#nice ⇒ Object
Returns the value of attribute nice
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def nice @nice end |
#nswap ⇒ Object
Returns the value of attribute nswap
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def nswap @nswap end |
#num_threads ⇒ Object
Returns the value of attribute num_threads
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def num_threads @num_threads end |
#pgrp ⇒ Object
Returns the value of attribute pgrp
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def pgrp @pgrp end |
#policy ⇒ Object
Returns the value of attribute policy
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def policy @policy end |
#ppid ⇒ Object
Returns the value of attribute ppid
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def ppid @ppid end |
#priority ⇒ Object
Returns the value of attribute priority
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def priority @priority end |
#processor ⇒ Object
Returns the value of attribute processor
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def processor @processor end |
#rss ⇒ Object
Returns the value of attribute rss
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def rss @rss end |
#rsslim ⇒ Object
Returns the value of attribute rsslim
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def rsslim @rsslim end |
#rt_priority ⇒ Object
Returns the value of attribute rt_priority
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def rt_priority @rt_priority end |
#session ⇒ Object
Returns the value of attribute session
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def session @session end |
#sigcatch ⇒ Object
Returns the value of attribute sigcatch
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def sigcatch @sigcatch end |
#sigignore ⇒ Object
Returns the value of attribute sigignore
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def sigignore @sigignore end |
#signal ⇒ Object
Returns the value of attribute signal
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def signal @signal end |
#startcode ⇒ Object
Returns the value of attribute startcode
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def startcode @startcode end |
#startstack ⇒ Object
Returns the value of attribute startstack
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def startstack @startstack end |
#starttime ⇒ Object
Returns the value of attribute starttime
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def starttime @starttime end |
#stime ⇒ Object
Returns the value of attribute stime
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def stime @stime end |
#tpgid ⇒ Object
Returns the value of attribute tpgid
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def tpgid @tpgid end |
#tty_nr ⇒ Object
Returns the value of attribute tty_nr
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def tty_nr @tty_nr end |
#utime ⇒ Object
Returns the value of attribute utime
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def utime @utime end |
#vsize ⇒ Object
Returns the value of attribute vsize
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def vsize @vsize end |
#wchan ⇒ Object
Returns the value of attribute wchan
3 4 5 |
# File 'lib/madvertise/proc_stat.rb', line 3 def wchan @wchan end |
Class Method Details
.read ⇒ Object
48 49 50 51 |
# File 'lib/madvertise/proc_stat.rb', line 48 def self.read stat = File.read("/proc/self/stat").chomp.split new(*stat[3..40].map(&:to_i)) end |
Instance Method Details
#pagesize ⇒ Object
53 54 55 |
# File 'lib/madvertise/proc_stat.rb', line 53 def pagesize Sysconf.sysconf(:page_size) end |