Set the Nice Level of an Existing Process

Occasionally I forget to use the nicecommand. Linux is kind enough to allow us to change the nice level of a process that’s already running, by using the snice command. It’s very easy to use and much quicker than stopping and restarting the process.

Let’s say I have mpeg2enc encoding a video, and after 10 minutes, I realize I forgot the nice command. It’s going to take another hour or two, but I don’t want to waste the 10 minutes I’ve already spent working on the video. No fear!

The command below will save me:

sudo snice -5 mpeg2enc

You’ll notice that I prefixed the line with the sudo command. snice requires sudo privilege for a nice level of anything below zero.

Stumble it! Save This Page