Skip to content

takumakume/mruby-getloadavg

Repository files navigation

mruby-getloadavg Build Status

Linux getloadavg(3) for mruby

install by mrbgems

  • add conf.gem line to build_config.rb
MRuby::Build.new do |conf|

    # ... (snip) ...

    conf.gem :github => 'takumakume/mruby-getloadavg'
end

example

p Getloadavg::getloadavg(10)
# => [2.81201171875, 3.27099609375, 3.52197265625]

# Args[0] : Int nelem (Up to nelem samples are retrieved and assigned to successive elements of return array)
# [0] : averages over the last 1 minutes
# [1] : averages over the last 5 minutes
# [2] : averages over the last 15 minutes

License

under the MIT License:

  • see LICENSE file

About

getloadavg(3) for mruby

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published