AIX USER PRIORITY

ITEM: RTA000038823



QUESTION:                                                                       
We need to set up several user id's that when the user logs in they             
will be executing a BASIC application which produces reports. This              
report process is consuming a tremendous amount of processor cycles and         
because there is no way to restrict the user from how many reports they         
generate. The thought is that if we can set up separate user id's and           
somehow set the priority of those user id's to a very low priority,             
then we can control the processor utilization and the interactive users         
will get favored.                                                               
                                                                                
The question is how would one go about affecting the priority of this           
user? Can we set up the .profile and have a "nice" command which, upon          
login would automatically lower the priority of that user? We don't want        
operators to have to identify the user and issue the nice command. We           
can control the .profile so that the user can't modify it. If yes, how         
would we go about doing this? If you have other ideas, please let us            
know.                                                                           
                                                                                
Some additional information which may be useful. Once the user logs in          
they execute a BASIC program to create the report. The terminal remains         
locked until the report has been generated "and" spooled to the printer         
queue. At this time the terminal opens up and the user can generate the         
next report. The user cannot generate more than one report at a time,           
other than going to another terminal and logging in on that terminal --         
which is not likely in the majority of situations.                              
                                                                                
---------- ---------- ---------- --------- ---------- ----------                
A: Assuming that all the users that you would like to have the lower            
   priority are using the Korn shell, you may use the following steps:          
   (repeat all the steps for each user)                                        
                                                                                
   1) Edit the user's $HOME/.profile, and at the very top of the file,          
      insert the line: "/bin/renice 20 $$ >/dev/null".  This will               
      change the priority of the user's login shell to the lowest               
      priority allowed (0 is normal, and -20 is highest).                       
                                                                                
   2) To make sure that the user does not remove this file, let root            
      take ownership of it, and prevent anybody else from writing to            
      the file.  This can be done by the commands:                              
                                                                                
      chown root .profile                                                       
      chmod 755 .profile                                                        
                                                                                
   3) Many users like to customize their .profile to suit their tastes.         
      This will not be possible if root owns the file.  You can                
      add the line ". $HOME/.profile2" to the bottom of the .profile,           
      to allow for a second, user-modifiable, .profile.                         
                                                                                
   4) Any shell spawned by the login shell will then have a normal              
      operating priority of 0.  This can be brought back to the                 
      lowest priority of 20 by repeating step 1 for the user's                  
      $HOME/.kshrc.  Again, many users like to modify this file,                
      so you can include a similar statement ". $HOME/.kshrc2"                  
      at the end of the .kshrc file.                                            
                                                                                
   Now, whatever job is started by the user will have the lower                 
   priority.                                                                    
                                                                                
---------- ---------- ---------- --------- ---------- ----------                
                                                                               
                                                                                
This item was created from library item Q652650      CPNTJ                      
                                                                                
Additional search words:                                                        
$$A AIX ALTERNATE CPNTJ INDEX IX MAR94 OP OZNEW PRIORITY RISCOSO                
RISCSYSTEM SOFTWARE SYS USER                                                    
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                               


WWQA: ITEM: RTA000038823 ITEM: RTA000038823
Dated: 11/1996 Category: RISCOSO
This HTML file was generated 99/06/24~12:43:15
Comments or suggestions? Contact us