nice (user command)


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers nice (user command)
# 1  
Old 08-26-2003
nice (user command)

Can someone tell me .. how to find a user & process who has executed nice (scheduled priority) to one of his process. .Tks..
# 2  
Old 08-27-2003
If you do not know the process or the user, what kind of ill affects are you seing on your server that wants you to find a particular process and user?

In Linux, using the top command will give you an updated listing of running processes with their priorities. But without knowing the user or the process, what kind of priority level are you looking for? If you knew the username or process you could do something like this:

top | grep "USERNAME or PROCESS NAME"

Or if you suspected a particular time period that the process is being run you could just run top and watch for any out of the norm processes being run.

This is a good question though, does anyone else have any better solutions to finding the information needed with so many unknowns?
# 3  
Old 08-27-2003
Do a "ps -el" and examine the field labelled "NI". That field is the nice value.
# 4  
Old 08-27-2003
Quick question,

The 'ps' command only gives a snapshot of the current process utilization. If this user is running this process outside of the time that the snapshot is done, won't this be inaffective in determining the user/process being run with a particular nice value.
# 5  
Old 08-27-2003
Yes, ps will only report on processes currently running. If don't catch it at first, you will have to repeat the command. Or you may need to write a script to run ps every 30 seconds or so as a last resort.
# 6  
Old 08-27-2003
watch

Not sure what OS you are using, but if using recent versions of linux, you can use the watch command, for example:

watch ps -el

Neo
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Wall command with nice text formatting

with using wall command, how can i have a carriage return in my broadcast message. i try to broadcast from a file, i were to use "cat myfile | wall" for broadcasting. but when the message broadcast somehow the format run away. this the text in my file: line 1 line 2 line 3 when broadcast ... (3 Replies)
Discussion started by: lsy
3 Replies

2. BSD

Very high nice percentage in top command

Hello Folks, Recently our FreeBSD 7.1 i386 system became very sluggish. Nothing much is happening over there & whatever is running takes eternity to complete. All the troubleshooting hinted towards a very high nice percentage. Can that be the culprit? Pasting snippets of top command,... (7 Replies)
Discussion started by: vibhor_agarwali
7 Replies

3. Shell Programming and Scripting

How to use nice command?

Dear Friends, I have a directory when i take du of that directory it takes alot of memory and cpu and I/O, i want to use nice to run my script that have du command slowly so it won't take I/O and cpu, please suggest. (6 Replies)
Discussion started by: learnbash
6 Replies

4. Shell Programming and Scripting

Call Nice command (priority) from /bin/ksh

Hello, I am just starting with shell scripting, as everyone will soon see from my question. What I'm trying to do is call the Nice command to set the script process priority from /bin/ksh. The difference is I'm running it not directly through the shell, but through Bigfix (very similar to... (3 Replies)
Discussion started by: solly119
3 Replies

5. UNIX for Advanced & Expert Users

Is nice command a myth?

Hello, Some guy said to me that using the nice command to decrease the priority of a process is a myth, that the operating system corrects the priorities as the processes need cpu. Is this true? (4 Replies)
Discussion started by: psimoes79
4 Replies

6. UNIX for Dummies Questions & Answers

The nice command

hello everybody: I have some job running on tru64 system and Im the root, due to limited resources I end up with my job ( vdump) for example taking the lowest share, I researched the nice command on the net, but couldnt get enough info, can I use it to already running process or I only use it... (1 Reply)
Discussion started by: aladdin
1 Replies

7. Programming

nice command and nice() system call

Hi I want to implement the nice command in the shell that I am building. I came to know that there is a corresponding nice() system call for the same. But since I will be forking different processes to run different commands typed on the command prompt, is there any way I can make a command... (2 Replies)
Discussion started by: tejbuch
2 Replies

8. UNIX for Advanced & Expert Users

Nice the process on user level

Hi there, I was wandering, if it is possible to nice set of process on user level. Say, I have user1,user2 if user1 spawns 12 process and user2 spwans 15 process, Is there a way can I change the priority of any process started by user1 to 5 and viz-a-viz user2 to 20 Thanks in advance (3 Replies)
Discussion started by: braindrain
3 Replies

9. UNIX for Dummies Questions & Answers

is ‘nice’ command useful on a multi-CPU UNIX system?

Can someone tell me this. thanks (1 Reply)
Discussion started by: xoxouu
1 Replies

10. UNIX for Advanced & Expert Users

process nice level command line vs cron

Under, Solaris 10 I have the following problem: A script executed at command line runs with nice level 0, as expected. Same script started under (user) crontab runs with nice level 2. I would prefer it run at 0. Is this possible? If so, how? Thanks. (0 Replies)
Discussion started by: henrydark
0 Replies
Login or Register to Ask a Question