Output of ps -ef command


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Output of ps -ef command
# 1  
Old 01-06-2005
Output of ps -ef command

Can someone tell me the meaning of the column 'C' contained in the output of the ps -ef command?

UID PID PPID C STIME TTY TIME COMMAND

I was once told that if the value was higher then 0 and the process showed to be in a state of sleep when running a top then the command had timed out and can be killed?!!

Thanks in advance
# 2  
Old 01-06-2005
Found this here You should probably visit to see this text in context with the example given....

Quote:
The C column is the processor utilization. With the exception of the ps command, all of the other processes listed are waiting for some event, such as another process to exit or (as in the case of shell processes) are waiting for user input. Note that in this example all of the entries have a 0 (zero) in the C column. This does not mean they have used no CPU time, but rather it is so low that it is reported as zero
Cheers
ZB
# 3  
Old 01-06-2005
man says .....


C
(-f, l, and -l flags) CPU utilization of process or thread, incremented each
time the system clock ticks and the process or thread is found to be running.
The value is decayed by the scheduler by dividing it by 2 once per second. For
the sched_other policy, CPU utilization is used in determining process
scheduling priority. Large values indicate a CPU intensive process and result
in lower process priority whereas small values indicate an I/O intensive
process and result in a more favorable priority.
# 4  
Old 01-06-2005
Thanks BZ. Am I right in thinking that if the process has 254 in the C column and is in a state of sleep, that it is no longer running but in a continual loop or a process it's relying on has died?

Thanks again
# 5  
Old 01-06-2005
bhargav - out of interest which *nix are you using? The HP-UX 10.20 and SUSE 8.2 man pages have nothing on this....

Cheers
ZB
# 6  
Old 01-06-2005
$ uname -a | cut -d" " -f 1,3-
AIX 3 4 000936434C00
# 7  
Old 01-06-2005
Quote:
Originally posted by dbrundrett
Thanks BZ. Am I right in thinking that if the process has 254 in the C column and is in a state of sleep, that it is no longer running but in a continual loop or a process it's relying on has died?

Thanks again
You can't all of that stuff from the value 254. If it's in a state a sleep, it recently arrived at a state of sleep and the C value should continue to decay all the way to zero. "no longer running but in a continual loop" is not even self-consistant. A process that is in a loop would be running. You can't tell if the process is relying on another process from this number.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Insert title as output of command to appended file if no output from command

I am using UNIX to create a script on our system. I have setup my commands to append their output to an outage file. However, some of the commands return no output and so I would like something to take their place. What I need The following command is placed at the prompt: TICLI... (4 Replies)
Discussion started by: jbrass
4 Replies

2. UNIX for Dummies Questions & Answers

Set Command to output a log of every command executed in the script

Hi Guys, I like to output every command executed in the script to a file. I have tried set -x which does the same. But it is not giving the logs of the child script which is being called from my script. Is there any parameters in the Set command or someother way where i can see the log... (2 Replies)
Discussion started by: mac4rfree
2 Replies

3. Red Hat

Command understanding the output file destination in case of standard output!!!!!

I ran the following command. cat abc.c > abc.c I got message the following message from command cat: cat: abc.c : input file is same as the output file How the command came to know of the destination file name as the command is sending output to standard file. (3 Replies)
Discussion started by: ravisingh
3 Replies

4. Shell Programming and Scripting

Want to terminate command execution when string found in the command output

Hi Experts, I am very much new to linux scripting, I am currently working on reducing my manual work and hence writing a script to automate few task. I am running below command to snmpwalk the router.. snmpwalk -v 3 -u WANDL_SU -a MD5 -A vfipmpls -x DES -X VfIpMpLs -l authPriv... (19 Replies)
Discussion started by: Hanumant.madane
19 Replies

5. UNIX for Dummies Questions & Answers

passing command output from one command to the next command in cshell

HI Guys, I hope you are well. I am trying to write a script that gets executed every time i open a shell (cshell). I have two questions about that 1) I need to enter these commands $ echo $DISPLAY $ setenv $DISPLAY output_of_echo_$display_command How can i write a... (2 Replies)
Discussion started by: kaaliakahn
2 Replies

6. AIX

Non interactive command output using script command ?

Hello, Script command helps to save command output to file. (Redicection doesn't work in this case). Besides interactive shell 'recording', Linux script command has "-c" option which allows to record output of some non-interactive command. The problem is that AIX script command variant... (6 Replies)
Discussion started by: vilius
6 Replies

7. UNIX for Dummies Questions & Answers

read command - using output from command substitution

Hey, guys! Trying to research this is such a pain since the read command itself is a common word. Try searching "unix OR linux read command examples" or using the command substitution keyword. :eek: So, I wanted to use a command statement similar to the following. This is kinda taken... (2 Replies)
Discussion started by: ProGrammar
2 Replies

8. UNIX for Advanced & Expert Users

Repeat output of last command w/o repeating last command

Is there a way to repeat the output of the last command for filtering without running the command again? All I could think of was to copy all the data to a text file and process it that way, is there another way? Like say I want to grep server.server.lan from a dtrace that was pages long after I... (5 Replies)
Discussion started by: glev2005
5 Replies

9. UNIX for Dummies Questions & Answers

Command display output on console and simultaneously save the command and its output

Hi folks, Please advise which command/command line shall I run; 1) to display the command and its output on console 2) simultaneous to save the command and its output on a file I tried tee command as follows; $ ps aux | grep mysql | tee /path/to/output.txt It displayed the... (7 Replies)
Discussion started by: satimis
7 Replies

10. UNIX for Dummies Questions & Answers

problem with output of find command being input to basename command...

Hi, I am triying to make sure that there exists only one file with the pattern abc* in path /path/. This directory is having many huge files. If there is only one file then I have to take its complete name only to use furter in my script. I am planning to do like this: if ; then... (2 Replies)
Discussion started by: new_learner
2 Replies
Login or Register to Ask a Question