Class: OsCtl::Lib::LoadAvgReader::LoadAvg

Inherits:
Struct
  • Object
show all
Defined in:
lib/libosctl/loadavg_reader.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#avgObject

Returns the value of attribute avg

Returns:

  • (Object)

    the current value of avg



9
10
11
# File 'lib/libosctl/loadavg_reader.rb', line 9

def avg
  @avg
end

#ctidObject

Returns the value of attribute ctid

Returns:

  • (Object)

    the current value of ctid



9
10
11
# File 'lib/libosctl/loadavg_reader.rb', line 9

def ctid
  @ctid
end

#pool_nameObject

Returns the value of attribute pool_name

Returns:

  • (Object)

    the current value of pool_name



9
10
11
# File 'lib/libosctl/loadavg_reader.rb', line 9

def pool_name
  @pool_name
end

#runnableObject

Returns the value of attribute runnable

Returns:

  • (Object)

    the current value of runnable



9
10
11
# File 'lib/libosctl/loadavg_reader.rb', line 9

def runnable
  @runnable
end

#totalObject

Returns the value of attribute total

Returns:

  • (Object)

    the current value of total



9
10
11
# File 'lib/libosctl/loadavg_reader.rb', line 9

def total
  @total
end

Instance Method Details

#averagesObject



14
15
16
# File 'lib/libosctl/loadavg_reader.rb', line 14

def averages
  [avg[1], avg[5], avg[15]]
end

#identObject



10
11
12
# File 'lib/libosctl/loadavg_reader.rb', line 10

def ident
  "#{pool_name}:#{ctid}"
end