Sponsored Content
Top Forums Shell Programming and Scripting Time field showing Zero in ps command output Post 302943833 by TomG on Wednesday 13th of May 2015 08:22:49 AM
Old 05-13-2015
Quote:
Originally Posted by TomG
Code:
  F S      UID   PID  PPID  C PRI NI             ADDR   SZ            WCHAN    STIME TTY       TIME COMD
401 S   catmgr  5748  5742  0 154 20 e0000006d48cd080  133 e0000003fb6e7200 11:22:32 ?         0:00 /opt/ssh/libexec/sftp-server
3401 R   catmgr  5742  5631  0 152 20 e0000005f974fa00  750                - 11:22:31 ?         0:00 sshd: catmgr@notty
421 T   catmgr 14751 18253  0 186 24 e000000685a6c380  327                - 09:33:57 pts/14    0:00 ksh cat_Duplicate_Records_Removal.ksh
421 T   catmgr  3495 18253  0 158 24 e0000009ceca7080  327                - 09:30:09 pts/14    0:00 ksh cat_Duplicate_Records_Removal.ksh
3401 S   catmgr  9317  9152  0 154 20 e000000654b27400  622 e0000003fb6e7080 04:50:51 ?         0:00 sshd: catmgr@notty
1401 T   catmgr  4091     1  0 152 24 e0000005a6abf700  624                -  Apr 23  ?         0:00 ssh catmgr@g4u1993c.houston.hp.com ksh /DI_Data_HU1/infa_shared/cat/CODE/sh/Reporting_Jobs.sh
401 S   catmgr  9558     1  0 158 20 e0000008ae70ad00  331 e00000063bfa4980 09:44:39 ?         0:00 ksh Reporting_Jobs.sh


I am using HP-ux

I dont know why the time field is shown as 0:00 for running process and why '?' is shown for tty field.

anyone please shed some light on this..

thank you

I believe this link will be of some use

The UNIX School: ps command : what does the TIME indicate?
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

output of the time command ?

can someone tell me the meaning of this commnad, If you want to see a grand total of CPU time for a program when it finishes running, you can use the time command. At the Unix prompt, enter: time java myprog Replace myprog with the name of the program you are running. The following is an... (2 Replies)
Discussion started by: ldpathak
2 Replies

2. UNIX for Dummies Questions & Answers

ps command - time field

Hi all, Can someone extending on what the time field is explaining in a ps command. Man page only has this: time The cumulative execution time for the process. Is this a combined CPU time? if that is the case then it should be impossible to have a 00:00 time on any process. ... (1 Reply)
Discussion started by: nhatch
1 Replies

3. Linux

Process start time not showing correct time

Process start time is not showing the correct time: I had started a process on Jun 17th at 23:30:00. Next day morning when I run the command "ps -ef | grep mq", the process is showing the start date of Jun 17th but the start time is 00:16:41 Day/Date is setup correctly on the server. It... (2 Replies)
Discussion started by: hemangjani
2 Replies

4. Shell Programming and Scripting

Sorting on two fields time field and number field

Hi, I have a file that has data in it that says 00:01:48.233 1212 00:01:56.233 345 00:09:01.221 5678 00:12:23.321 93444 The file has more line than this but i just wanted to put in a snippet to ask how I would get the highest number with time stamp into another file. So from the above... (2 Replies)
Discussion started by: pat4519
2 Replies

5. UNIX for Dummies Questions & Answers

how to avoid time command output

Hi, I have 2 queries 1 .when I run some unix command, I am getting the output of "time" at std output (screen) for eg zegrep <pattern> *.v.gz I almost found the reason but not sure, if the no of files matching *.v.gz is more then I am getting the time command output at the... (5 Replies)
Discussion started by: selvaka
5 Replies

6. Shell Programming and Scripting

Grep command showing wrong output in Linux

Hi All I am trying to run a script in linux wherein i have a command like this grep ^prmAttunityUser= djpHewr2XFMAttunitySetup_ae1_tmp djpHewr2XFMAttunitySetup_ae1_tmp is a temporary file in which the user value is stored but this command in the script returns me balnk value whereas it has a... (4 Replies)
Discussion started by: vee_789
4 Replies

7. Solaris

Find command output gives one day before time stamp

Hi All, I am listing the files which are 4 hours older. For this first I have creted a dummy file with the 4 hours before timestamp, then I am using the below find command, find /path/ -type f ! -newer 4_hours_oledr_file -exec ls -lrt {} \; I am getting the files which are older than... (13 Replies)
Discussion started by: velava
13 Replies

8. UNIX for Dummies Questions & Answers

Command showing no output!

Hi Folks, I have a situation here, where no command is giving any output, and it's not even showing any error message also. What could be the reason? (3 Replies)
Discussion started by: nixhead
3 Replies

9. Shell Programming and Scripting

Use bash command on awk field and output the result

Hello, I want to run a field from an awk command through a command in bash. For example my input file is 1,2,3 20,30,40 60,70,80 I want tot run $2 thought the command date +%d/%m/%y -d"01/01/15 + $2 days -1 day" and get the output 1,02/01/15,3 20,30/01/15,40 60,11/03/15,80 ... (2 Replies)
Discussion started by: garethsays
2 Replies

10. Shell Programming and Scripting

Send output of time command to file

I am measuring the time it takes for a wget command to complete. Right now my command is: time wget https://`ifconfig -a | grep '32.29.120' | cut -d: -f2 | cut -d' ' -f1`:8443/primary-rest/shop?brandId=test --header="name: test" --no-check-certificate -o SELF_TEST.log The output I get is ... (2 Replies)
Discussion started by: Junaid Subhani
2 Replies
ps(1)							      General Commands Manual							     ps(1)

Name
       ps - print process status statistics

Syntax
       ps [ options ] [ namelist ] [ corefile ]

Description
       The  command  displays  information about processes. Information on processes can change while is running, so the information it gives is a
       snapshot taken at a given time.

       If you omit the -a option, only your processes are candidates to be displayed by Specifying the -a option causes  information  about  other
       users' processes to be displayed; specifying the -x option includes information on processes without control terminals.

       You must use the -k option and specify both the namelist and corefile arguments when you look at a crash dump.  The namelist argument indi-
       cates that information is to be gathered using the specified system namelist file.  (The namelist file is a kernel  image  file).   If  you
       omit namelist, uses The core argument indicates that information is to be gathered using the specified core file.  If you omit core, uses

Options
       -#	 Represents any given process number and must be the last option given.  You cannot use this option with the -a and -tx options.

       -C	 Causes the %CPU field of the display to reflect the absolute percentage of cpu used by the process for scheduling during its res-
		 ident time .

       -S	 Causes the TIME field of the display to reflect the amount of user+system time spent by a process and its children.

       -a	 Displays information for processes executed from all users' terminals.  The default is to show processes executed from your  ter-
		 minal only.  You cannot use this option with the -# or -t option.

       -c	 Displays the command names as stored internally in the system for accounting purposes instead of the command arguments, which are
		 kept in the process address space.  This display is more reliable, if less informative, because a process is free to destroy  the
		 latter information.

       -e	 Displays the environment as well as the command arguments.

       -g	 Displays  all	processes within the process group.  Without this option, displays only ``interesting'' processes.  Processes that
		 are process group leaders are not considered interesting; therefore, top-level command interpreters  and  processes  waiting  for
		 users to log in are normally not shown.

       -k	 Uses the file specified in the core argument in place of and If you specify the -k option but no core argument, uses

       -l	 Displays  information	in long format, showing the fields PPID, CP, PRI, NI, ADDR, SIZE, RSS, and WCHAN as described under Output
		 Fields.

       -s	 Adds the size SSIZ of the kernel stack of each process to the basic output format for use by system administrators.

       -tx	 Displays information for only the specified terminal.	This option restricts output to processes whose controlling terminal is x.
		 Specify  x  in  the same format as displays terminal names. For example, displays for tty3, for console, for ttyd0, for processes
		 with no terminal, and for processes at the current terminal.  This option must be the last one given.	You cannot use this option
		 with the -# or -a options.

       -u	 Displays  user-oriented  output, which includes fields USER, %CPU, and %MEM. This option also displays SZ and RSS, which are com-
		 puted differently than they are for the -l and -v options.  The SZ field is computed as SIZE + TSIZ (virtual size  plus  size	of
		 text).  The RRS field is computed as RSS + (TRS/xccount) where xccount is the number of processes currently sharing the text.

       -v	 Displays  process  system  time and user time in addition to cumulative time.	This display includes fields RE, SL, PAGEIN, SIZE,
		 RSS, LIM, TSIZ, TRS, %CPU, and %MEM, described under Output Fields.

       -w	 Produces 132-column rather than 80 column output.  If repeated, as -ww, produces arbitrarily wide output.  This option allows	to
		 display more of wide displays.

       -x	 Displays information for all processes, including those not executed from terminals.

Output Fields
       The command displays the following fields in all output formats:

       PID	 The process identification (PID) number

       TT	 The control terminal of the process

       TIME	 The time, including both user and system time

       STAT	 The state of the process given by a sequence of five letters, such as RWNAV.

		 The first letter indicates the run status of the process:

		 R    The process is running.

		 T    The process is stopped.

		 P    The process is in page wait.

		 D    The process is in disk (or other short-term) wait.

		 S    The process is sleeping for less than about 20 seconds.

		 I    The process is idle (sleeping longer than about 20 seconds).

		 The second letter indicates whether a process is swapped out:

		 W	The process is swapped out.

		 Z	The process is killed, but not yet removed.

		 (blank)
			The process is in core.

		 >	The  process  has  a specified soft limit on memory requirements and is exceeding that limit.  This type of process is not
			swapped.

		 The third letter indicates whether a process is running with an altered CPU scheduling priority, using

		 N    The process priority is reduced.

		 <    The process priority has been artificially raised.

		 (blank)
		      The process is running without special treatment.

		 The fourth letter indicates any special treatment of the process for virtual memory:

		 A    Represents VA_ANOM.  This status typically represents a process using a disk more efficiently by	removing  gaps	caused	by
		      deletes and then collecting the remaining data.

		 S    Represents VA_SEQL.  This status is typical of large image processing programs that are using virtual memory to sequentially
		      address voluminous data.

		 (blank)
		      Represents VA_NORM.

		 The fifth letter indicates whether the process is a vector process:

		 V	Indicates that the process is using vector hardware. Only processes running on a VAX processor that contains vector  hard-
			ware can have this status.

		 (blank)
			Indicates the process is not using vector hardware.

       The following fields are not displayed in all output formats:

       USER	 Names the owner of the process.

       %CPU	 Describes  the  use  of  the  CPU by the process.  This percentage is a decaying average over a minute or less of previous (real)
		 time.	The time base over which this percentage is computed varies because processes may be new.  The sum of all %CPU fields  can
		 therefore exceed 200%.

       NICE (or NI)
		 Indicates the process scheduling increment.  For further information, see

       SIZE (or SZ)
		 Shows the virtual size of the process in 1024-byte units.

       RSS	 Shows the real memory (resident set) size of the process in 1024-byte units.

       LIM	 Indicates the soft limit on memory used, which is specified by a call to If no limit has been specified, this limit is shown as

       TSIZ	 Shows the size of the text (shared program) image.

       TRS	 Shows the size of resident (real memory) set of text.

       %MEM	 Gives the percentage of real memory used by this process.

       RE	 Indicates the residency time of the process (seconds in core).

       SL	 Indicates the sleep time of the process (seconds blocked).

       PAGEIN	 Shows the number of disk input and output operations resulting from references by the process to pages not loaded in core.

       UID	 Shows the numerical user identification number of the process owner.

       PPID	 Shows the numerical identification number of the parent of process.

       CP	 Displays the short-term CPU use factor used in scheduling.

       PRI	 Displays process priority. (This value is nonpositive when the process is in a wait state that cannot be interrupted.)

       ADDR	 Displays the swap address of the process or page frame of the beginning of the user page table entries.

       WCHAN	 Indicates  the event for which the process is waiting (an address in the system), with the initial part of the address truncated.
		 For example, the address 80004000 displays as 4000.

       F	 Displays flags associated with the process as in

       SLOAD	  00000001    Process is resident in memory.
       SSYS	  00000002    System process:  swapper, pager,
			      idle (RISC only), trusted path daemon.
       SLOCK	  00000004    Process is being swapped out.
       SSWAP	  00000008    Process requested to swap out for page table
			      growth.
       STRC	  00000010    Traced.
       SWTED	  00000020    Used in tracing.
       SULOCK	  00000040    Locked in by plock(2).
       SPAGE	  00000080    Process is waiting for page-in to complete.
       SKEEP	  00000100    Process is protected from swapout while transferring.
			      resources to another process.
       SOMASK	  00000200    Used by sigpause(2).
       SWEXIT	  00000400    Process is exiting.
       SPHYSIO	  00000800    Process is protected from swapout while doing physical
			      input or output.
       SVFORK	  00001000    Process resulted from a vfork(2) that is not
			      yet complete.
       SVFDONE	  00002000    Parent has received resources returned by
			      vfork(2) child.
       SNOVM	  00004000    Process has no virtual memory, as it is a
			      parent in the context of vfork(2).
       SPAGI	  00008000    Process is demand-paging data pages from its
			      text gnode.
       SSEQL	  00010000    Process has advised of sequential memory access.
       SUANOM	  00020000    Process has advised of random memory access.
       SXCTDAT	  00080000    Process has indicated intent to execute data
			      or stack (RISC only).
       SNOCLDSTP  00100000    POSIX environment: no SIGCLD generated when
			      children stop (formerly named SOUSIG).
       SOWEUPC	  00200000    Process is owed a profiling tick.
       SSEL	  00400000    Used by select(2).
       SLOGIN	  00800000    Process is a login process.
       SPTECHG	  01000000    The page table entries for the process have changed.
       SLKDONE	  04000000    System V file lock has been applied.
       SFIXADE	  08000000    Fix of unaligned accesses is being attempted
			      (RISC only).
       SEXECDN	  10000000    Process has done an execve(2).
       SIDLEP	  20000000    The idle process (RISC only).

       A process that has a parent and has exited, but for which the parent has not yet waited, is marked <defunct>.  A process  that  is  blocked
       trying  to exit is marked <exiting>. The command determines the filename and arguments given when the process was created by examining mem-
       ory or the swap area.  The method is unreliable because, for example,  a process can destroy this information. The filename  and  arguments
       displays might be incorrect.

Files
       Searched to find swap device and terminal names

       Swap device

       Kernel memory

       User process information

       Core file

       System namelist

See Also
       kill(1), w(1), getpriority (2), getrlimit(2), dump(5)

																	     ps(1)
All times are GMT -4. The time now is 10:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy