Sponsored Content
Full Discussion: Ps output
Top Forums UNIX for Advanced & Expert Users Ps output Post 302381167 by jim mcnamara on Thursday 17th of December 2009 10:00:28 AM
Old 12-17-2009
F column - process status flags - not really used
S - process state R=running S=sleeping, etc.
UId user id
PID process id
PPID parent process id
C processor scheduling (f and l)
PRI - base priority
NI - nice value
ADDR - address in memory
SZ - number of page process has in memory
WCHAN - address of a waiting event
TTY - console device
TIME cpu time
CMD - command the process is running
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to make a line BLINKING in output and also how to increase font size in output

how to make a line BLINKING in output and also how to increase font size in output suppose in run a.sh script inside echo "hello world " i want that this should blink in the output and also the font size of hello world should be big .. could you please help me out in this (3 Replies)
Discussion started by: mail2sant
3 Replies

2. Shell Programming and Scripting

Expect - Interact output hangs when large output

Hello, I have a simple expect script I use to ssh to a workstation. I then pass control over to the user with interact. This script works fine on my HP and Mac, but on my Linux Desktop, I get a problem where the terminal hangs when ever I execute a command in the interact session that requires a... (0 Replies)
Discussion started by: natedog
0 Replies

3. Shell Programming and Scripting

top output for six processes with the same name, output changed from column to row

Hi, I have a system under test, and I use a script that does a ps. The output, is in the following format, it's basically the timestamp, followed by the rss and vsize. 09:03:57 68404 183656 68312 181944 69860 217360 67536 182564 69072 183172 69032 199276 09:04:27 68752 183292 70000 189020... (5 Replies)
Discussion started by: Bloke
5 Replies

4. Shell Programming and Scripting

Converting line output to column based output

Hi Guys, I am trying to convert a file which has a row based output to a column based output. My original file looks like this: 1 2 3 4 5 6 1 2 3 1 2 3 (8 Replies)
Discussion started by: npatwardhan
8 Replies

5. Shell Programming and Scripting

awk: round output or delimit output of arithmatic string

I have a file with the following content. > cat /tmp/internetusage.txt 6709.296322 30000 2/7/2010 0.00I am using the following awk command to calculate a percentage from field 1 and 2 from the file. awk '{ print $1/$2*100 }' /tmp/internetusage.txt This outputs the value "22.3643" as a... (1 Reply)
Discussion started by: jelloir
1 Replies

6. Shell Programming and Scripting

Awk script to run a sql and print the output to an output file

Hi All, I have around 900 Select Sql's which I would like to run in an awk script and print the output of those sql's in an txt file. Can you anyone pls let me know how do I do it and execute the awk script? Thanks. (4 Replies)
Discussion started by: adept
4 Replies

7. Shell Programming and Scripting

script to mail monitoring output if required or redirect output to log file

Below script perfectly works, giving below mail output. BUT, I want to make the script mail only if there are any D-Defined/T-Transition/B-Broken State WPARs and also to copy the output generated during monitoring to a temporary log file, which gets cleaned up every week. Need suggestions. ... (4 Replies)
Discussion started by: aix_admin_007
4 Replies

8. Shell Programming and Scripting

Displaying log file pattern output in tabular form output

Hi All, I have result log file which looks like this (below): from the content need to consolidate the result and put it in tabular form 1). Intercomponents Checking Passed: All Server are passed. ====================================================================== 2). OS version Checking... (9 Replies)
Discussion started by: Optimus81
9 Replies

9. 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

10. Shell Programming and Scripting

Redirect script output to a file and mail the output

Hi Guys, I want to redirect the output of 3 scripts to a file and then mail the output of those three scripts. I used below but it is not working: OFILE=/home/home1/report1 echo "report1 details" > $OFILE =/home/home1/1.sh > $OFILE echo... (7 Replies)
Discussion started by: Vivekit82
7 Replies
PS(1)							      General Commands Manual							     PS(1)

NAME
ps - process status SYNOPSIS
ps [ acgklnrtuwxU# [ core [ swap [ system ] ] ] ] DESCRIPTION
Ps prints certain indicia about active processes. To get a complete printout on the console or lpr, use ``ps axlw'' For a quick snapshot of system activity, ``ps au'' is recommended. A hyphen may precede options with no effect. The following options may be specified. a asks for information about all processes with terminals (ordinarily only one's own processes are displayed). c causes only the comm field to be displayed instead of the arguments. (The comm field is the tail of the path name of the file the process last exec'ed.) This option speeds up ps somewhat and reduces the amount of output. It is also more reliable since the process can't scribble on top of it. g asks for all processes. Without this option, ps only prints ``interesting'' processes. Processes are deemed to be uninteresting if they are process group leaders, or if their arguments begin with a `-'. This normally eliminates shells and getty processes. k causes the file /usr/sys/core is used in place of /dev/kmem and /dev/mem. This is used for postmortem system debugging. l asks for a long listing. The short listing contains the user name, process ID, tty, the cumulative execution time of the process and an approximation to the command line. n asks for numeric rather than symbolic wchans. This flag implies the ``l'' flag. r asks for ``raw'' output. A non-human readable sequence of structures is output on the standard output. There is one structure for each process, the format is defined by <psout.h> tttyname restricts output to processes whose controlling tty is the specified ttyname (which should be specified as printed by ps, including t? for processes with no tty). This option must be the last one given. u A user oriented output is produced. This includes the name of the owner of the process, process id, nice value, size, tty, cpu time used, and the command. w tells ps you are on a wide terminal (132 columns). Ps normally assumes you are on an 80 column terminal. This information is used to decide how much of long commands to print. The w option may be repeated, e.g. ww, and the entire command, up to 128 characters, will be printed without regard to terminal width. x asks even about processes with no terminal. U causes ps to update a private database where is keeps system information. Thus ``ps -U'' should be included in the /etc/rc file. # A process number may be given, (indicated here by #), in which case the output is restricted to that process. This option must also be last. A second argument tells ps where to look for core if the k option is given, instead of /usr/sys/core. A third argument is the name of a swap file to use instead of the default /dev/swap. If a fourth argument is given, it is taken to be the file containing the system's namelist. Otherwise, ``/unix'' is used. The output is sorted by tty, then by process ID. The long listing is columnar and contains F Flags associated with the process. These are defined by #define lines in /usr/include/sys/proc.h. S The state of the process. 0: nonexistent; S: sleeping; W: waiting; R: running; I: intermediate; Z: terminated; T: stopped. UID The user id of the process owner. PID The process ID of the process; as in certain cults it is possible to kill a process if you know its true name. PPID The process ID of the parent process. CPU Processor utilization for scheduling. PRI The priority of the process; high numbers mean low priority. NICE Used in priority computation. ADDR The memory address of the process if resident, otherwise the disk address. SZ The size in blocks (512 bytes) of the memory image of the process. WCHAN The event for which the process is waiting or sleeping; if blank, the process is running. TTY The controlling tty for the process. TIME The cumulative execution time for the process. COMMAND The command and its arguments. A process that has exited and has a parent, but has not yet been waited for by the parent is marked <defunct>. Ps makes an educated guess as to the file name and arguments given when the process was created by examining memory or the swap area. The method is inherently some- what unreliable and in any event a process is entitled to destroy this information, so the names cannot be counted on too much. FILES
/unix system namelist /dev/kmem kernel memory /dev/swap swap device /usr/sys/core core file /dev searched to find swap device and tty names /var/run/psdatabase system namelist and device information SEE ALSO
kill(1), w(1), pstat(8) BUGS
Things can change while ps is running; the picture it gives is only a close approximation to reality. Some processes, typically those in the background, are printed with null or garbaged arguments, even though the process has not swapped. (Sometimes ps even loses on its own arguments!) In these cases, the name of the command is printed in parentheses. When automatic crash dumps are enabled, /usr/sys/core is not a sensible default core file name. 3rd Berkeley Distribution PS(1)
All times are GMT -4. The time now is 08:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy