https://github.com/benmelz/ioprio
A simple ruby API for the linux ioprio system.
https://github.com/benmelz/ioprio
ioprio linux ruby
Last synced: 4 months ago
JSON representation
A simple ruby API for the linux ioprio system.
- Host: GitHub
- URL: https://github.com/benmelz/ioprio
- Owner: benmelz
- License: mit
- Created: 2025-04-02T16:16:00.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-02-17T17:10:00.000Z (5 months ago)
- Last Synced: 2026-02-19T12:04:56.119Z (5 months ago)
- Topics: ioprio, linux, ruby
- Language: Ruby
- Homepage: https://rubygems.org/gems/ioprio
- Size: 81.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# ioprio
A simple ruby API for the linux ioprio system.
## Installation
Install the gem and add to the application's Gemfile by executing:
```bash
bundle add ioprio
```
If bundler is not being used to manage dependencies, install the gem by executing:
```bash
gem install ioprio
```
## Usage
The ioprio syscalls are only supported by linux systems. As such their wrappers (`ioprio_get`/`ioprio_set`) will only be implemented when built and run on a linux system.
All features either directly call or are a recreation of native ioprio system features. Refer to the linux man pages for usage instructions.
In ruby, the following constants and methods are defined on the `Process` module, corresponding to their native macros and syscalls:
```ruby
Process::IOPRIO_CLASS_NONE
Process::IOPRIO_CLASS_RT
Process::IOPRIO_CLASS_BE
Process::IOPRIO_CLASS_IDLE
Process::IOPRIO_WHO_PROCESS
Process::IOPRIO_WHO_PGRP
Process::IOPRIO_WHO_USER
Process.ioprio_prio_class(priority)
Process.ioprio_prio_data(priority)
Process.ioprio_prio_value(klass, data)
Process.ioprio_get(which, who)
Process.ioprio_set(which, who, priority)
```
## Development
* Run `bin/setup` to install dependencies.
* Run `bin/rake spec` to run the tests.
* Run `bin/rake rubocop` to run the linter.
* Run `bin/console` for an interactive prompt that will allow you to experiment.
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/benmelz/ioprio.
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).