Nam,
Can you do something like
ssh node1 sudo renice -1
If not, there is a flag for the /etc/sudoers file
'requiretty' that needs to
be turned off. It should be turned off by default though.
Also you probably
want to make it set so it doesn't ask for your password.
Another thing you may try is if you use PAM (as most modern
linux
distributions do), you can edit the file
/etc/security/limits.conf and change
the maximum priority a user can set a process to. See:
http://www.kernel.org/pub/linux/libs/
pam/Linux-PAM-html/sag-pam_limits.html
Note that you may have to add
session required pam_limits.so
to the file /etc/pam.d/login (see
http://
susefaq.sourceforge.net/howto/pam.html), as many linux
distributions
do not do this by default. Of course you must make these
changes on all your
nodes.
I don't know anything about changing the process capability,
but if it works
for you, then I guess it is good
Hope this helps,
Tim
As far as changing the capability to allow nice to be run by
others
On Sunday 12 November 2006 22:48, Nam Hoang wrote:
> Hi Tim,
> thank for your help. I tried with sudo, but still not
> overcome this problem. After modifying sudo, i can do
> this command as normal user: sudo renice -1 myProgram.
>
> But when using with mpirun such as
>
> > -------
> > #!/bin/sh
> >
> > sudo renice -1 $$
> > exec myProgram $*
> > -------
> > do 'mpirun C myScript < input' whatever...
>
> it throws a message:
> "sudo: sorry, you must have a tty to run
sudo"
>
> I also tried using
execlp("renice","renice",...) but
> it still throws this message. When i try with normal
> program (not mpi program), execlp() run well.
>
> I'm going to change capability (CAP_SYS_NICE) to allow
> nice command executed by normal user (if this
> happends, we need not use sudo). Do you think i
> could/should do this ?
> Thanks
>
>
>
>
>
____________________________________________________________
_______________
>_________ Do you Yahoo!?
> Everyone is raving about the all-new Yahoo! Mail beta.
> http://new.mail.yahoo.com
a>
> _______________________________________________
> This list is archived at http://www.l
am-mpi.org/MailArchives/lam/
_______________________________________________
This list is archived at http://www.l
am-mpi.org/MailArchives/lam/
|