From 2827f15c69f924e6a3b2fcf13dcade24f1092cc6 Mon Sep 17 00:00:00 2001 From: kumon Date: Tue, 5 Jan 2016 00:15:09 +0900 Subject: [PATCH 1/3] Added ionice --- pages/common/ionice.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 pages/common/ionice.md diff --git a/pages/common/ionice.md b/pages/common/ionice.md new file mode 100644 index 000000000..5cc37d429 --- /dev/null +++ b/pages/common/ionice.md @@ -0,0 +1,15 @@ +# ionice + +> get/set program io scheduling class and priority + +- sets process with PID 89 as an idle io process + +`ionice -c 3 -p 89` + +- runs 'bash' as a best-effort program with highest priority + +`ionice -c 2 -n 0 bash` + +- prints the class and priority of the processes with PID 89 + +`ionice -p 89` From 53ac09746b185734c0d0888535c37c3585a2ce0f Mon Sep 17 00:00:00 2001 From: kumon Date: Tue, 5 Jan 2016 11:24:03 +0900 Subject: [PATCH 2/3] Add class & level details and update usage. --- pages/common/ionice.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/pages/common/ionice.md b/pages/common/ionice.md index 5cc37d429..33b05e67e 100644 --- a/pages/common/ionice.md +++ b/pages/common/ionice.md @@ -1,15 +1,17 @@ # ionice -> get/set program io scheduling class and priority +> Get or set program I/O scheduling class and priority. +> Scheduling classes: 1(realtime), 2(best-effort), 3(idle). +> Priority levels: 0(the highest) - 7(the lowest). -- sets process with PID 89 as an idle io process +- Set I/O scheduling class of a running process -`ionice -c 3 -p 89` +`ionice -c {{scheduling_class}} -p {{pid}}` -- runs 'bash' as a best-effort program with highest priority +- Run a command with altered I/O scheduling class and priority -`ionice -c 2 -n 0 bash` +`ionice -c {{scheduling_class}} -n {{priority}} {{command}}` -- prints the class and priority of the processes with PID 89 +- Print the I/O scheduling class and priority of a running process -`ionice -p 89` +`ionice -p {{pid}}` From 3d6b4aed47c5bc3acf3309f016988f8475a46aeb Mon Sep 17 00:00:00 2001 From: kumon Date: Tue, 5 Jan 2016 19:45:42 +0900 Subject: [PATCH 3/3] improve description --- pages/common/ionice.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/common/ionice.md b/pages/common/ionice.md index 33b05e67e..0886354e4 100644 --- a/pages/common/ionice.md +++ b/pages/common/ionice.md @@ -1,14 +1,14 @@ # ionice > Get or set program I/O scheduling class and priority. -> Scheduling classes: 1(realtime), 2(best-effort), 3(idle). -> Priority levels: 0(the highest) - 7(the lowest). +> Scheduling classes: 1 (realtime), 2 (best-effort), 3 (idle). +> Priority levels: 0 (the highest) - 7 (the lowest). - Set I/O scheduling class of a running process `ionice -c {{scheduling_class}} -p {{pid}}` -- Run a command with altered I/O scheduling class and priority +- Run a command with custom I/O scheduling class and priority `ionice -c {{scheduling_class}} -n {{priority}} {{command}}`