https://github.com/takumakume/mruby-getloadavg
getloadavg(3) for mruby
https://github.com/takumakume/mruby-getloadavg
getloadavg mruby
Last synced: about 1 year ago
JSON representation
getloadavg(3) for mruby
- Host: GitHub
- URL: https://github.com/takumakume/mruby-getloadavg
- Owner: takumakume
- License: other
- Created: 2017-04-05T02:37:37.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-10T02:50:19.000Z (almost 9 years ago)
- Last Synced: 2024-10-19T17:49:02.816Z (over 1 year ago)
- Topics: getloadavg, mruby
- Language: C
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mruby-getloadavg [](https://travis-ci.org/takumakume/mruby-getloadavg)
Linux `getloadavg(3)` for mruby
## install by mrbgems
- add conf.gem line to `build_config.rb`
```ruby
MRuby::Build.new do |conf|
# ... (snip) ...
conf.gem :github => 'takumakume/mruby-getloadavg'
end
```
## example
```ruby
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