times man page on SmartOS

Man page or keyword search:  
man Server   16655 pages
apropos Keyword Search (all sections)
Output format
SmartOS logo
[printable version]

TIMES(2)							      TIMES(2)

       times - get process and child process times

       #include <sys/times.h>
       #include <limits.h>

       clock_t times(struct tms *buffer);

       The  times() function fills the tms structure pointed to by buffer with
       time-accounting	 information.	The   tms   structure,	 defined    in
       <sys/times.h>, contains the following members:

	 clock_t    tms_utime;
	 clock_t    tms_stime;
	 clock_t    tms_cutime;
	 clock_t    tms_cstime;

       All  times  are reported in clock ticks. The specific value for a clock
       tick is defined by the variable CLK_TCK,	 found	in  the	 header	 <lim‐

       The  times of a terminated child process are included in the tms_cutime
       and tms_cstime members of  the  parent  when  wait(3C)  or  waitpid(3C)
       returns	the  process  ID of this terminated child.  If a child process
       has not waited for its children, their times will not  be  included  in
       its times.

       The  tms_utime member is the CPU time used while executing instructions
       in the user space of the calling process.

       The tms_stime member is the CPU time used by the system	on  behalf  of
       the calling process.

       The tms_cutime member is the sum of the tms_utime and the tms_cutime of
       the child processes.

       The tms_cstime member is the sum of the tms_stime and the tms_cstime of
       the child processes.

       Upon  successful	 completion, times() returns the elapsed real time, in
       clock ticks, since an arbitrary point in the past (for example,	system
       start-up	 time).	 This  point  does  not	 change from one invocation of
       times() within the process to another. The return  value	 may  overflow
       the  possible  range  of type clock_t. If times() fails, (clock_t)−1 is
       returned and errno is set to indicate the error.

       The times() function will fail if:

		 The buffer argument points to an illegal address.

       See attributes(5) for descriptions of the following attributes:

       │Interface Stability │ Standard		│
       │MT-Level	    │ Async-Signal-Safe │

       time(1), timex(1),  exec(2),  fork(2),  time(2),	 waitid(2),  wait(3C),
       waitpid(3C), attributes(5), standards(5)

				 May 14, 1997			      TIMES(2)

List of man pages available for SmartOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
Vote for polarhome
Free Shell Accounts :: the biggest list on the net