Linux::IO_Prio3pm
Interface to linux ioprio_set and ioprio_get via syscall or ionice wrapper.
Usage
use Linux::IO_Prio qw(:all);my $status = ioprio_set(IOPRIO_WHO_PROCESS, $$,IOPRIO_PRIO_VALUE(IOPRIO_CLASS_IDLE, 0));my $status = ionice(IOPRIO_WHO_PROCESS, $$, IOPRIO_CLASS_IDLE, 0);
Overview
Use ioprio_get(2) and ioprio_set(2) from Perl. Only Linux is supported currently. Support for other unices will be added once the kernel capabilities are available.
Exports
Nothing by default.
The required exports can be specified individually or by tag:
- :ionice -- ionice ionice_data ionice_class
- :c_api -- ioprio_set ioprio_get
- :macro -- IOPRIO_PRIO_VALUE IOPRIO_PRIO_CLASS IOPRIO_PRIO_DATA
- :who -- IOPRIO_WHO_PROCESS IOPRIO_WHO_PGRP IOPRIO_WHO_USER
- :class -- IOPRIO_CLASS_NONE IOPRIO_CLASS_RT IOPRIO_CLASS_BE IOPRIO_CLASS_IDLE
- :all -- all the above
ionice(), ionice_class() and ionice_data() are thin wrappers around the C API allowing conventient single function calls. All of the other exports have the same meaning and prototypes as the C API equivalents. See man ioprio_set(2) for further details.
Functions
C API
- $priority = ioprio_get($which, $who)
- $staus = ioprio_set($which, $who, $priority)
Wrappers
- $status = ionice($which, $who, $class, $data)
- $class = ionice_class($which, $who)
- $data = ionice_data($which, $who)
Macros
- $priority = IOPRIO_PRIO_VALUE($class, $data)
- $class = IOPRIO_PRIO_CLASS($mask)
- $data = IOPRIO_PRIO_DATA ($mask)
Constants
- IOPRIO_WHO_PROCESS
- IOPRIO_WHO_PGRP
- IOPRIO_WHO_USER
- IOPRIO_CLASS_NONE
- IOPRIO_CLASS_RT
- IOPRIO_CLASS_BE
- IOPRIO_CLASS_IDLE
Warranty
This is free software. IT COMES WITHOUT WARRANTY OF ANY KIND.
Releases
6 releases since Debian 8 (Jessie); the text changed 3 times.