Sponsored Content
Full Discussion: Calculate processing time
Top Forums Shell Programming and Scripting Calculate processing time Post 302424264 by gubbu on Monday 24th of May 2010 06:49:46 PM
Old 05-24-2010
Calculate processing time

I have a log file which has a lot of output but I am interested in the following

Processed records: 34749; Processed files: 67445
Job run run at Thu May 6 03:00:01 PDT 2010
Job finished at Thu May 6 12:22:14 PDT 2010

So I would like to have the output as
Total time Records Files
9:22 34749 67445
 

10 More Discussions You Might Find Interesting

1. HP-UX

how to calculate CPU time under HP-UX

Hi, I am loking for a c++ function that calculate CPU time under HP-UX Thank you (1 Reply)
Discussion started by: limame
1 Replies

2. AIX

calculate time

Hi, How do I calculate time? I need to create an alert if a process is running more than 30 minutes. I need to get the first time and then get another, calculate it if more than 30 mins and then alert it to pager. Can't find it in internet. Thanks in advance, itik (2 Replies)
Discussion started by: itik
2 Replies

3. Shell Programming and Scripting

How to calculate the time difference...

Hi All, I've written a script which reads all the systems backup information and saves it in a log file. ssh -l ora${sid} ${primaryhost} "tail -2 /oracle/$ORACLE_SID/sapbackup/back$ORACLE_SID.log" |head -1 | awk '{print echo "PREVIOUS:-- Start Date&Time: " $3,$4,echo "|| End Date&Time:... (1 Reply)
Discussion started by: suri.tyson
1 Replies

4. UNIX for Dummies Questions & Answers

calculate the time

hello i want to display the time firstly when i run my shell script and after 25 min i want to display a message it says that the time left is 5 min. When the calculated time is 30 mins, the script should exit. can any one help me with that! Thanks in advance Regards :o (5 Replies)
Discussion started by: dndoon
5 Replies

5. Shell Programming and Scripting

Need to calculate elapsed time

Hi there, How to calculate the elapsed time in minutes for a particular job run under unix. I tried the following $ ps -efo user,pid,etime,comm,args | grep myscript | grep -v grep | awk -F" " '{print $3}' OUTPUT: 01:02:49 I need to get this output in minutes. Can someone help me... (1 Reply)
Discussion started by: karthickrn
1 Replies

6. Shell Programming and Scripting

How to calculate time difference between start and end time of a process!

Hello All, I have a problem calculating the time difference between start and end timings...! the timings are given by 24hr format.. Start Date : 08/05/10 12:55 End Date : 08/09/10 06:50 above values are in mm/dd/yy hh:mm format. Now the thing is, 7th(08/07/10) and... (16 Replies)
Discussion started by: smarty86
16 Replies

7. Shell Programming and Scripting

Calculate age of a file | calculate time difference

Hello, I'm trying to create a shell script (#!/bin/sh) which should tell me the age of a file in minutes... I have a process, which delivers me all 15 minutes a new file and I want to have a monitoring script, which sends me an email, if the present file is older than 20 minutes. To do... (10 Replies)
Discussion started by: worm
10 Replies

8. Shell Programming and Scripting

How to calculate time

Hello Guys, I am trying to calculate total hours and minutes a given user has used the system since the beginning of the current month. #!/usr/bin/sh hr=0 min=0 last $1 | grep -w `date "+%b"` | grep -v '\(0:.*\)' | grep -vw sshd | cut -c 66- | tr -d "\(\)" | cut -f1 -d ":" | grep -v '.*' |... (9 Replies)
Discussion started by: kasparov
9 Replies

9. Programming

How to calculate compilation time using c?

is there function with library "time.h" to calculate the processing time of the code? (3 Replies)
Discussion started by: fwrlfo
3 Replies

10. Shell Programming and Scripting

Calculate Time diff in milli milliseconds(Time format : HH:MM:SS,NNN)

Hi All, I have one file which contains time for request and response. I want to calculate time difference in milliseconds for each line. This file can contain 10K lines. Sample file with 4 lines. for first line. Request Time: 15:23:45,255 Response Time: 15:23:45,258 Time diff... (6 Replies)
Discussion started by: Raza Ali
6 Replies
TheSchwartz::Job(3pm)					User Contributed Perl Documentation				     TheSchwartz::Job(3pm)

NAME
TheSchwartz::Job - jobs for the reliable job queue SYNOPSIS
my $client = TheSchwartz->new( databases => $DATABASE_INFO ); my $job = TheSchwartz::Job->new_from_array('MyWorker', foo => 'bar'); $client->dispatch_async($job); $job = TheSchwartz::Job->new( funcname => 'MyWorker', uniqkey => 7, arg => [ foo => 'bar' ], ); $client->dispatch_async($job); DESCRIPTION
"TheSchwartz::Job" models the jobs that are posted to the job queue by your application, then grabbed and performed by your worker processes. "TheSchwartz::Job" is a "Data::ObjectDriver" model class. See Data::ObjectDriver::BaseObject. FIELDS
"TheSchwartz::Job" objects have these possible fields: "jobid" The unique numeric identifier for this job. Set automatically when saved. "funcid" The numeric identifier for the type of job to perform. "TheSchwartz" clients map function names (also known as abilities and worker class names) to these numbers using "TheSchwartz::FuncMap" records. "arg" Arbitrary state data to supply to the worker process for this job. If specified as a reference, the data is frozen to a blob with the "Storable" module. "uniqkey" An arbitrary string identifier used to prevent applications from posting duplicate jobs. At most one with the same "uniqkey" value can be posted to a single "TheSchwartz" database. "insert_time" The "insert_time" field is not used. "run_after" The UNIX system time after which the job can next be attempted by a worker process. This timestamp is set when a job is first created or is released after a failure. "grabbed_until" The UNIX system time after which the job can next be available by a worker process. This timestamp is set when a job is grabbed by a worker process, and reset to 0 when is released due to failure to complete the job. "priority" The "priority" field is not used. "coalesce" A string used to discover jobs that can be efficiently pipelined with a given job due to some shared resource. For example, for email delivery jobs, the domain of an email address could be used as the "coalesce" value. A worker process could then deliver all the mail queued for a given mail host after connecting to it once. USAGE
"TheSchwartz::Job->new( %args )" Returns a new job object with the given data. Members of %args can be keyed on any of the fields described above, or "funcname". "TheSchwartz::Job->new_from_array( $funcname, $arg )" Returns a new job with the given function name (also called ability or worker class), and the scalar or reference $arg for an argument. "$job->funcname([ $funcname ])" Returns the function name for the given job, after setting it to $funcname, if specified. "$job->handle([ $handle ])" Returns the "TheSchwartz::JobHandle" object describing this job, after setting it to $handle, if specified. A job handle is a convenience class for accessing other records related to jobs; as its convenience methods are also available directly from "TheSchwartz::Job" instances, you will usually not need to work directly with job handles. "$job->driver()" Returns the "Data::ObjectDriver" object driver for accessing the database in which $job is stored. See Data::ObjectDriver. "$job->add_failure( $msg )" Records and returns a new "TheSchwartz::Error" object representing a failure to perform $job, for reason $msg. "$job->exit_status()" Returns the exit status specified by the worker that either completed the job or declared it failed permanently. The exit status for a job will be available for a period of time after the job has exited the queue. That time is defined in the job's worker class's "keep_exit_status_for()" method. "$job->failure_log()" Returns a list of the error messages specified to "add_failure()" when a worker failed to perform the given job. "$job->failures()" Returns the number of times a worker has grabbed this job, only to fail to complete it. "$job->set_exit_status( $status )" Records the exit status of the given job as $status. "$job->did_something([ $value ])" Returns whether the given job has been completed or failed since it was created or loaded, setting whether it has to $value first, if specified. "$job->debug( $msg )" Sends the given message to the job's "TheSchwartz" client as debug output. "$job->set_as_current()" Set $job as the current job being performed by its associated "TheSchwartz" client. WORKING
"TheSchwartz::Worker" classes should use these methods to update the status of their jobs: "$job->completed()" Records that the given job has been fully performed and removes it from the job queue. Completing a job records its exit status as 0. "$job->failed( $msg, $exit_status )" Records that the worker performing this job failed to complete it, for reason $msg. If workers have not failed to complete the job more times than the maximum number of retries for that type of job, the job will be reattempted after its retry delay has elapsed. The maximum number of retries and the delay before a retry are defined in the job's worker class definition as "max_retries()" and "retry_delay()" respectively. If workers have exceeded the maximum number of reattempts for this job, the job's exit status is recorded as $exit_status, and the job is removed from the queue. If $exit_status is not defined or 0, the job will be recorded with an exit status of 1, to indicate a failure. "$job->permanent_failure( $msg, $exit_status )" Records that the worker performing this job failed to complete it, as in "failed()", but that the job should not be reattempted, no matter how many times the job has been attempted before. The job's exit status is thus recorded as $exit_status (or 1), and the job is removed from the queue. "$job->replace_with( @jobs )" Atomically replaces the single job $job with the given set of jobs. This can be used to decompose one "metajob" posted by your application into a set of jobs workers can perform, or to post a job or jobs required to complete the process already partly performed. SEE ALSO
Data::ObjectDriver, Data::ObjectDriver::BaseObject, Storable perl v5.10.0 2007-12-20 TheSchwartz::Job(3pm)
All times are GMT -4. The time now is 01:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy