From: jfitz@athena.mit.edu (Jean Fitzmaurice)
Subject: User Priorities
Date: 1996/04/18 [thread overview]
Message-ID: <4l6g97$l0m@senator-bedfellow.MIT.EDU> (raw)
OSF/1 3.0, currently our Alpha 3000-400 has a
reschedule file which runs: it renices the user
process after 5 minutes CPU, some users have lower
priority and the default is 19
the question is that it would be better if this were
more flexible. I want a user who has '5' priority
be able to run a process under '1' priority but only
when they activate it, and only for a process which
takes less than one hour.
the mix of processes on this workstation
is one user running a process for days,
and another user runs processes which take
30 minutes. If you have a suggestion,
please reply to me email. thanks,
-Jean jfitz@mit.edu
---------------------------------------------------
#!/bin/csh
date
set noglob
set topline = `/sbin/ps auxww | /usr/bin/head -2 | /usr/bin/tail +2`
set user = `echo $topline | /usr/bin/awk '{print $1}'`
set pid = `echo $topline | /usr/bin/awk '{print $2}'`
set cpumins = `echo $topline | /usr/bin/awk '{print $10}' | /usr/bin/cut -f1 -d:`
echo $topline
echo $user, $pid, $cpumins
#exceptions - root is owner, tine is less than five mins
if ( $user == 'root' ) then
exit 1
endif
if ( $cpumins < 5 ) then
exit 2
endif
# now the exceptions to the blanket -19
if ( $user == 'somevip' ) then
set prio = 1
goto setit
endif
if ( $user == 'bigcheese' ) then
set prio = 1
goto setit
endif
if ( $user == 'staff' ) then
set prio = 5
goto setit
endif
goto setit
endif
#declare blanket and renice accordingly
set prio = 19
setit:
echo i will renice pid $pid to $prio
/usr/sbin/renice $prio $pid
exit
reply other threads:[~1996-04-18 4:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox