You are not logged in.

#1 2007-05-03 03:34:25

Ryujin
Forum Fellow
From: Centerville, Utah
Registered: 2005-05-12
Posts: 246
Website

Make a User "nice"

I figure with the intense bash skils in the Arch community this should be an easy question,

I need to create a user who automaticly invokes

nice --adjustment=20

on ALL commands for a hybrid cluster environment, can anyone tell me how this can be done?

This will basicly make the user a total pushover and thier processes will all be superceded by any other system activity

Last edited by Ryujin (2007-05-03 03:36:29)

Offline

#2 2007-05-03 07:23:36

somairotevoli
Member
Registered: 2006-05-23
Posts: 335

Re: Make a User "nice"

DO you mean something like

renice 20 -u user

Offline

#3 2007-05-03 07:58:08

dmartins
Member
Registered: 2006-09-23
Posts: 360

Re: Make a User "nice"

How is the user executing commands? Will they all be through bash (or some other shell), or will they be X apps? ie run from a menu in X?

Offline

#4 2007-05-03 18:00:05

Ryujin
Forum Fellow
From: Centerville, Utah
Registered: 2005-05-12
Posts: 246
Website

Re: Make a User "nice"

The commands will be executed through rsh and ssh from a head node, so each command is a new login

Offline

#5 2007-05-03 18:10:04

Ryujin
Forum Fellow
From: Centerville, Utah
Registered: 2005-05-12
Posts: 246
Website

Re: Make a User "nice"

that renice might work, I could put it on a cron job that executes every couple of minutes to make sure that all processes for the given user are bumped down, although that starts to get messy with multiple users, is there a way to make all bash commands for a user just have a prefix so the user can only invoke processes at nice 19?

Offline

#6 2007-05-03 22:48:16

somairotevoli
Member
Registered: 2006-05-23
Posts: 335

Re: Make a User "nice"

My understanding is that the command will only have to ran once. I use it to renice all my main user processes to -15. All processes started afterwards still start @ -15.

Offline

#7 2007-05-04 14:11:34

Leffe
Member
Registered: 2006-05-30
Posts: 47

Re: Make a User "nice"

I'd take a look at /etc/security/limits.conf and see if anything can be done with the priority setting.  I don't think I've ever had limits.conf work for me though.

Offline

#8 2007-05-04 18:36:35

briest
Member
From: Katowice, PL
Registered: 2006-05-04
Posts: 468

Re: Make a User "nice"

/etc/security/limits.conf is a config file for pam_limits module. So, you have to check that:

- your ssh/rsh daemon can use PAM
- it is configured to do so (i.e. OpenSSH PAM support is a bit messy and defaults change between versions)
- its pam config uses pam_limits

Last edited by briest (2007-05-04 18:36:54)

Offline

#9 2007-05-10 14:32:08

Ryujin
Forum Fellow
From: Centerville, Utah
Registered: 2005-05-12
Posts: 246
Website

Re: Make a User "nice"

Sorry about being late to reply (I have been out of town), these should help!  I will post some info once I get the system running!

Offline

#10 2007-05-10 20:23:13

harlekin
Member
From: Germany
Registered: 2006-07-13
Posts: 408

Re: Make a User "nice"

I don't really know wether you want this or wether it's working as I didn't test it by myself. But I found that you can set the priority of processes being launched in /etc/passwd.

You just have to insert pri=[nice_factor] in the user's info field.
Syntax is:
Username: Password: UID: GID: Info: Home: Shell

I got it from here (sorry about a german page. I'm sure you'll find a english one): http://www.linuxfibel.de/useradmin.htm


Hail to the thief!

Offline

#11 2007-05-11 02:37:20

Ryujin
Forum Fellow
From: Centerville, Utah
Registered: 2005-05-12
Posts: 246
Website

Re: Make a User "nice"

WOW!  Thanks! that will work much better!  Thanks a ton, I will tell you how it goes!

Offline

Board footer

Powered by FluxBB