PDA

View Full Version : sudo nice & ionice



bluethundr
May 31st, 2011, 12:12 PM
hello zmanda

I need to nice and ionice amanda down to the lowest possible priority so that it does not overwhelm the production servers. here is the line I need to cron:



0 */4 * * * /usr/bin/sudo /bin/nice -n 19 /usr/bin/ionice -c3 /usr/sbin/amdump acadaca | mail -s "Amanda Backups Performed" root@acadaca.net



If I run it on the command line this is what I see:




-sh-3.2$ /usr/bin/sudo /bin/nice -n 19 /usr/bin/ionice -c3 /usr/sbin/amdump acadaca
amdump: running as user "root" instead of "amandabackup"




And if I don't use sudo I don't have permissions to nice the command:



-sh-3.2$ /bin/nice -n 19 /usr/bin/ionice -c3 /usr/sbin/amdump acadaca
ioprio_set: Operation not permitted


thoughts and suggesstions are welcomed!