- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: renicing a user process
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2003 02:19 AM
10-28-2003 02:19 AM
renicing a user process
I would like to set a user to have the lowest priority for processing. But each time this person logs in they have this priority.
I would imagine adding the command to .profile is the best method to do this.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2003 02:27 AM
10-28-2003 02:27 AM
Re: renicing a user process
change his shell to your script, which invokes shell with specified priority (nice something /usr/bin/sh). All the processes inherits priority from it's parents, so all user processes will be running with this priority
-Tomek
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2003 02:28 AM
10-28-2003 02:28 AM
Re: renicing a user process
renice -n 19 $$
This will renice their login shell to the lowest priority, and then any task spawned from that shell should inherit the new priority, so everything they run will be at the lowest level.
Of course, by default the user can edit their .profile and remove this, so you'll want to change ownership on that and their home dir so they can change/replace their .profile.
HTH.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2003 02:28 AM
10-28-2003 02:28 AM
Re: renicing a user process
In the user's .profile as the last entry:
exec nice -n 20 sh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2003 02:29 AM
10-28-2003 02:29 AM
Re: renicing a user process
export LOGID=`whoami`
if [ $LOGID -eq "user" ]
then
do
.....whatever u do with nice
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2003 02:29 AM
10-28-2003 02:29 AM
Re: renicing a user process
nice -10
This way whenever someone logs in it always runs their application with a lower priority.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2003 02:29 AM
10-28-2003 02:29 AM
Re: renicing a user process
Damn fat fingers.