Sponsored Content
Full Discussion: Arithmetic on timestamps
Top Forums Shell Programming and Scripting Arithmetic on timestamps Post 302298159 by balireddy_77 on Monday 16th of March 2009 10:54:07 PM
Old 03-16-2009
Arithmetic on timestamps

Hi Friends,
please advise on shell script to add two time stamps
for example :

a=12:32
b=12:00
c=a+b=00:32

please help me to find shell script to add to two time stamps, as i need to convert time from EST to GMT or SST to prepare status of jobs in unix and to specify estimated time to complete one job.

thanks in advance
Bali Reddy
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Unix timestamps

Can someone help me with a Unix or perl script to convert the unix timestamps to human readable format? Any help will be highly appreciated... (3 Replies)
Discussion started by: hamsasal
3 Replies

2. Solaris

Difference between two timestamps

I'm writting a script to find the difference between two timestamp. One field i get on delivery time of the file like 07:17 AM and other is my SLA time 06:30 AM I need to find the difference between these two time (time exceeded to meet SLA). Need some suggestions. (8 Replies)
Discussion started by: raman1605
8 Replies

3. UNIX for Advanced & Expert Users

merging multiple timestamps into one

Here is a problem that involves looping: - I have multiple files with same name but different timestamps: e.g test20080226144525.txt, test20080227144525.txt (can be more than two files). - I want to take the collection of these files (e.g test*) and append all its contents... (2 Replies)
Discussion started by: ChicagoBlues
2 Replies

4. Shell Programming and Scripting

timestamps

Hello! I have the following problem. I read a file using perl, each line of this file has the fllowing format. 14/4/2008 8:42:03 πμ|10800|306973223399|4917622951117|1||1259|1|126|492|433||19774859454$ Th first field is the timestamp and the second field is the offset in seconds. How can... (1 Reply)
Discussion started by: chriss_58
1 Replies

5. Shell Programming and Scripting

Compare Timestamps

Hi! Long time reader first time registered user and poster. I've picked up some times and tricks and I'm at a dead end... I've parsed a log file for duplicates and printed only the two fields I need (duplicate entry and time stamp). My question is, with this output, how would I script... (2 Replies)
Discussion started by: rexpokinghorn
2 Replies

6. UNIX for Dummies Questions & Answers

Compare 2 timestamps

Hi, i have current timestamp, lets say "12:02:45" in an variable (var1) and another timestamp "08:30:00" fetched from table in another variable2 (var2). How do i compare 2 timestamps in unix shell scripting. if var 1 > var 2 then echo message. Thanks in advance. (3 Replies)
Discussion started by: prasannarajesh
3 Replies

7. Shell Programming and Scripting

Help with touch and timestamps

Hello fellow Unix geeks, I have been given a very urgent assignment in my office on writing a particular Shell script but I'm very much new to it.I would appreciate any help from you on solving this problem--which might seem very trivial to you. The Unix flavour is a Sun Solaris one..(not... (6 Replies)
Discussion started by: Digjoy83
6 Replies

8. Shell Programming and Scripting

Grep 'error' between two timestamps

Hi, Need to grep for a error in a log file but between two timestamps / patterns example: in the below log file if the given timestamps are 14:00 to 15:00 and m greping for error only error3 should come in the output. pls note that apart from timestamps printed, the log file has no... (2 Replies)
Discussion started by: amicableperson
2 Replies

9. Shell Programming and Scripting

Comparing two timestamps

Hi all!!, I'm using Ksh and working on Linux. I want to compare two timestamps, timestamp1 and timestamp2. Until, timestamp1 is lesser than timestamp2, i want to do something, lets say print something. The code i have written is: a=`date +%H:%M:%S` b=`date +%H:%M:%S -d" 1... (1 Reply)
Discussion started by: Jayaraman
1 Replies

10. Shell Programming and Scripting

Write with a look for timestamps

hello i'm using SOX to generate a spectrogram from a wave file with the command : #sox file.wav -n spectrogram is there a way to create a spectrogram using the same command but reading file timestamps instead of the namefile.wav , since name is changing every 4 hours? (it's saved with... (2 Replies)
Discussion started by: Board27
2 Replies
ACCOUNTING(5)						   Sun Grid Engine File Formats 					     ACCOUNTING(5)

NAME
accounting - Sun Grid Engine accounting file format DESCRIPTION
An accounting record is written to the Sun Grid Engine accounting file for each job having finished. The accounting file is processed by qacct(1) to derive accounting statistics. FORMAT
Each job is represented by a line in the accounting file. Empty lines and lines which contain one character or less are ignored. Account- ing record entries are separated by colon (':') signs. The entries denote in their order of appearance: qname Name of the cluster queue in which the job has run. hostname Name of the execution host. group The effective group id of the job owner when executing the job. owner Owner of the Sun Grid Engine job. job_name Job name. job_number Job identifier - job number. account An account string as specified by the qsub(1) or qalter(1) -A option. priority Priority value assigned to the job corresponding to the priority parameter in the queue configuration (see queue_conf(5)). submission_time Submission time (GMT unix time stamp). start_time Start time (GMT unix time stamp). end_time End time (GMT unix time stamp). failed Indicates the problem which occurred in case a job could not be started on the execution host (e.g. because the owner of the job did not have a valid account on that machine). If Sun Grid Engine tries to start a job multiple times, this may lead to multiple entries in the accounting file corresponding to the same job ID. exit_status Exit status of the job script (or Sun Grid Engine specific status in case of certain error conditions). The exit status is determined by following the normal shell conventions. If the command terminates normally the value of the command is its exit status. However, in the case that the command exits abnormally, a value of 0200 (octal), 128 (decimal) is added to the value of the command to make up the exit status. For example: If a job dies through signal 9 (SIGKILL) then the exit status becomes 128 + 9 = 137. ru_wallclock Difference between end_time and start_time (see above). The remainder of the accounting entries follows the contents of the standard UNIX rusage structure as described in getrusage(2). Depending on the operating system where the job was executed some of the fields may be 0. The following entries are provided: ru_utime ru_stime ru_maxrss ru_ixrss ru_ismrss ru_idrss ru_isrss ru_minflt ru_majflt ru_nswap ru_inblock ru_oublock ru_msgsnd ru_msgrcv ru_nsignals ru_nvcsw ru_nivcsw project The project which was assigned to the job. department The department which was assigned to the job. granted_pe The parallel environment which was selected for that job. slots The number of slots which were dispatched to the job by the scheduler. task_number Array job task index number. cpu The cpu time usage in seconds. mem The integral memory usage in Gbytes cpu seconds. io The amount of data transferred in input/output operations. category A string specifying the job category. iow The io wait time in seconds. pe_taskid If this identifier is set the task was part of a parallel job and was passed to Sun Grid Engine via the qrsh -inherit interface. maxvmem The maximum vmem size in bytes. arid Advance reservation identifier. If the job used resources of an advance reservation then this field contains a positive integer identifier otherwise the value is "0" . ar_submission_time If the job used resources of an advance reservation then this field contains the submission time (GMT unix time stamp) of the advance reservation, otherwise the value is "0" . SEE ALSO
sge_intro(1), qacct(1), qalter(1), qsub(1), getrusage(2), queue_conf(5). COPYRIGHT
See sge_intro(1) for a full statement of rights and permissions. SGE 6.2u5 $Date$ ACCOUNTING(5)
All times are GMT -4. The time now is 02:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy