Class: Vmstat::Cpu

Inherits:
Struct
  • Object
show all
Defined in:
lib/vmstat/cpu.rb

Overview

Gathered cpu performance statistics snapshot.

Instance Attribute Summary collapse

Instance Attribute Details

#idleFixnum

Current counter of ticks spend in idle. The counter can overflow.

Returns:

  • (Fixnum)

    the current value of idle



13
14
15
# File 'lib/vmstat/cpu.rb', line 13

def idle
  @idle
end

#niceFixnum

Current counter of ticks spend in nice. The counter can overflow.

Returns:

  • (Fixnum)

    the current value of nice



13
14
15
# File 'lib/vmstat/cpu.rb', line 13

def nice
  @nice
end

#numFixnum

The number of the cpu starting at 0 for the first cpu.

Returns:

  • (Fixnum)

    the current value of num



13
14
15
# File 'lib/vmstat/cpu.rb', line 13

def num
  @num
end

#systemFixnum

Current counter of ticks spend in system. The counter can overflow.

Returns:

  • (Fixnum)

    the current value of system



13
14
15
# File 'lib/vmstat/cpu.rb', line 13

def system
  @system
end

#userFixnum

Current counter of ticks spend in user. The counter can overflow.

Returns:

  • (Fixnum)

    the current value of user



13
14
15
# File 'lib/vmstat/cpu.rb', line 13

def user
  @user
end