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

#idle ⇒ Fixnum

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

#nice ⇒ Fixnum

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

#num ⇒ Fixnum

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

#system ⇒ Fixnum

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

#user ⇒ Fixnum

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