Find the answer to your Linux question:
Results 1 to 2 of 2
I run programs that process data. These programs run on dedicated servers. I am trying to make these programs run at the very highest priority. I do not care if ...
  1. #1
    Just Joined!
    Join Date
    Jan 2009
    Posts
    5

    setting nice value -15

    I run programs that process data. These programs run on dedicated servers. I am trying to make these programs run at the very highest priority. I do not care if the mouse even moves when these programs are processing data. I was trying to change the nice number to -18 using a shell script but the nice program will only allow a negative number for root. I tried setting the owner of the shell script to root and setting chmod +s. That did not work either. Does anybody have any ideas how I can raise the priority of these programs?

  2. #2
    Trusted Penguin Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,230
    So setuid does not work on scripts. Only on actual binaries. I assume this is to prevent any careless modifications of a setuid script, but it does sometimes get annoying.

    I see two possible solutions, depending on how your system is setup.

    If you use sudo, then just call the script using sudo. Done.

    If you use su, you can use "su -c COMMAND" to pass a command into su. Therefore, you could run "su -c bash /path/to/script" and execute it as root that way.

    Do either of these help?
    DISTRO=Arch
    Registered Linux User #388732

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...