9

To change hardlimit for nice I can modify /etc/security/limits.conf

user - nice -11

But how can I do same thing for ionice

 ionice -c 1 -p 31828

I am getting error

ionice: ioprio_set failed: Operation not permitted
msb
  • 3,899
  • 3
  • 31
  • 38
Vivek Goel
  • 22,942
  • 29
  • 114
  • 186
  • I have the same problem; I have 2 machines, in one I can do that and on the other one I can't. The difference is that one is running linux 2.6.18, the other has 3.0.0. Maybe you can't do that in older kernels... – msb May 31 '13 at 19:20

1 Answers1

-3

This error (EPERM) indicates that you don't have sufficient privileges to perform that operation. ioprio_set():

An unprivileged process may only set the I/O priority of a process whose real UID matches the real or effective UID of the calling process. A process which has the CAP_SYS_NICE capability can change the priority of any process.

So, either become the superuser (use sudo), or use ionice on one of your own processes.

Brian Cain
  • 14,403
  • 3
  • 50
  • 88