Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

times(2) [v7 man page]

TIMES(2)							System Calls Manual							  TIMES(2)

NAME
times - get process times SYNOPSIS
times(buffer) struct tbuffer *buffer; DESCRIPTION
Times returns time-accounting information for the current process and for the terminated child processes of the current process. All times are in 1/HZ seconds, where HZ=60 in North America. After the call, the buffer will appear as follows: struct tbuffer { long proc_user_time; long proc_system_time; long child_user_time; long child_system_time; }; The children times are the sum of the children's process times and their children's times. SEE ALSO
time(1), time(2) ASSEMBLER
(times = 43.) sys times; buffer TIMES(2)

Check Out this Related Man Page

times(3UCB)					     SunOS/BSD Compatibility Library Functions					       times(3UCB)

NAME
times - get process times SYNOPSIS
/usr/ucb/cc [ flag ... ] file ... #include <sys/param.h> #include <sys/types.h> #include <sys/times.h> int times(tmsp) register struct tms *tmsp; DESCRIPTION
The times() function returns time-accounting information for the current process and for the terminated child processes of the current process. All times are reported in clock ticks. The number of clock ticks per second is defined by the variable CLK_TCK, found in the header <limits.h>. A structure with the following members is returned by times(): time_t tms_utime; /* user time */ time_t tms_stime; /* system time */ time_t tms_cutime; /* user time, children */ time_t tms_cstime; /* system time, children */ The children's times are the sum of the children's process times and their children's times. RETURN VALUES
Upon successful completion, times() returns 0. Otherwise, it returns -1. SEE ALSO
cc(1B), time(1), time(2), getrusage(3C), wait(3C) NOTES
Use of these interfaces should be restricted to only applications written on BSD platforms. Use of these interfaces with any of the system libraries or in multi-threaded applications is unsupported. The times() function has been superseded by getrusage(3C). SunOS 5.11 30 Oct 2007 times(3UCB)
Man Page

13 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Concatenate all the files in folder on timestamps

Hi Gurus, Experts, I am facing a problem to concatenate all the files based on timeStamps. The Problem is like this . The are many files in a folder Which are of the below types Ack_to_MDS_20070809141159.xml Ack_to_MDS_20070809141157.xml Ack_to_MDS_20070809141155.xml... (19 Replies)
Discussion started by: srikanthgr1
19 Replies

2. Solaris

Get timestamp by 'YYYYMMDD'

Hi, I'd like to get the file timestamp by 'YYYYMMDD' on Solaris 9 9/05. I can get it on the other UNIX distribution with the following command; ls -d -l --time-style='+%Y%m%d'$FNAME | awk '{print $6; }' but cannot get it on Solaris, it comes format error. Could you give me any advice on this? (18 Replies)
Discussion started by: elph
18 Replies

3. Shell Programming and Scripting

Grep content between timestamp

Hi all, I have a file which will be updated every half an hour and time stamp will be printed in the beginning of the updation. i just want to grep the content between every hoalf an hour. Pls help me on this issue. how to grep contents between tim stamp? Ex of file: 29/09/2010... (20 Replies)
Discussion started by: steve2216
20 Replies

4. UNIX for Dummies Questions & Answers

How to pick only the latest files based on the timestamp?

I have a few log files which get generated on a daily basis..So, I need to pick only the ones which get generated for that particular day. -rw-r--r-- 1 staff 510732676 Apr 7 22:01 test.log040711 -rwxrwxrwx 1 staff 2147482545 Apr 7 21:30 test.log.2 -rwxrwxrwx 1 staff 2147482581 Apr 7 19:26... (43 Replies)
Discussion started by: win4luv
43 Replies

5. Shell Programming and Scripting

Script to match strings that sometimes are splitted in 2 lines

Hello to all, I have an hexdump -C format as below: 31 54 47 55 48 4c 52 31 5f 52 31 32 31 31 32 ff 44 00 00 0E 01 32 14 56 42 17 47 48 0f ff ff ff 44 00 00 01 32 14 56 00 23 83 95 2f 42 17 47 48 00 0f ff ff 00 15 00 0a 48 00 01 5a 00 02 17 00 00 2f 00 00 30 00 00 31 00 00 ff 34 ff 44 00... (23 Replies)
Discussion started by: Ophiuchus
23 Replies

6. Shell Programming and Scripting

UNIX timestamp

Hi , I have files in s3 buckect under this directory(unix timestamp).I want to get the files on daily bases based batch date which is current unix date.Any help how to convert my unix date to unixtimestamp and get the files to local system.Any help would be great aws s3 ls... (18 Replies)
Discussion started by: mohan705
18 Replies

7. UNIX for Beginners Questions & Answers

Keep only the closet match of timestamped row (include headers) from file1 to precede file2 row/s

My original files are like this below and I distinguish them from the AP_ID (file1 has 572 and file2 has 544). Also, the header on file1 has “G_” pre-pended. NOTE: these are only snippets of very large files and much of the data is not present here. Original File 1: ... (36 Replies)
Discussion started by: aachave1
36 Replies

8. Shell Programming and Scripting

Newbie looking for how to Grep times more than 10 seconds apart

I am new to grep and Linux and am looking to see if grep can parse out a list of lines that have a difference of more than 10 seconds between the times on each line. Example 2016-09-17 19:30:57 INFO: id: 4562079216, time: 2016-09-17 19:30:41, 2016-09-17 12:02:26 INFO: id:... (26 Replies)
Discussion started by: Markham
26 Replies

9. Shell Programming and Scripting

Sed: -e expression #1, char 16: unterminated address regex

I am trying to grep for a particular text (Do action on cell BL330) in a text file(sample.gz) which is searched in the content filtered by date+timestamp (2016-09-14 01:09:56,796 to 2016-09-15 04:10:29,719) on a remote machine and finally write the output into a output file on a local machine. ... (23 Replies)
Discussion started by: rbadveti
23 Replies

10. Shell Programming and Scripting

Grepping a timestamp range and assigning it to a constant

Hi, I couldn't find any thing on google about it and have been trying to figure this out but am not getting anywhere. I want to know if its possible through a script. I have a file with columns start time and end time separated by a comma, basically there are some other columns which I need to... (30 Replies)
Discussion started by: dsid
30 Replies

11. Post Here to Contact Site Administrators and Moderators

UNIX.com response times

Friends, Admins, Countrymen, for a few days now, this site is incredibly dragging its feet again - 40 plus sec to open e.g. "New Topics" or "Home", 24 + for "subscribed Threads". For a comparison: subsecond response for wikipedia, Englisch ⇔ Deutsch Worterbuch - leo.org: Startseite, or similar.... (18 Replies)
Discussion started by: RudiC
18 Replies

12. Shell Programming and Scripting

Compare file dates before copy

Sometimes when I boot, my system goes into emergency mode. I then use Clonezilla to restore an image. Usually the image is older than the current date. This is part of a backup script that runs as a startup program. cd /home/andy/bin/ zip -u -q Ubuntu_Scripts.zip *.sh *.rb *.c *.py... (22 Replies)
Discussion started by: drew77
22 Replies

13. Shell Programming and Scripting

Why is ./ sometimes needed?

I typed Example 2-3 from Cooper`s Advanced Bash-Scripting Guide into my ~/bin, and it will only run if I include ./ before the filename. My other scripts in the same directory do not behave this way. $PATH includes ~/bin. I copied the file into /usr/local/bin, and it runs without ./ . (29 Replies)
Discussion started by: Xubuntu56
29 Replies