Hi,
I have start time as a string like 06:04:01 and end time like 06:05:01
i need do a simple math to get the duration. What is the best way
to do this in Korn Shell scripting? Thanks (2 Replies)
I am writting a script in the ksh shell and am trying to find a way to report the total execution time of the script without requiring the user to specify the time function when executing the script.
Does anyone have any examples they have used. I have been setting up two date variables (one at... (9 Replies)
Hi Team,
I am currently in the process of writing a script which will take a filename in the format
SKADEV.0.db2.NODE0000.CATN0000.20080714231015.001
where the sixth string(with "." as the seperator) is the time stamp of the time of creation of the file.
now here is my issue .
I need to be... (2 Replies)
I have a file with over 100,000 lines of data with looking to compare times of about 2000 lines to get a total time of a process. The lines of unique data are as follows.
FINER: CacSoapServer:reserveNetworkResource got the sessionID
and
INFO: Created CAC session ID
The command... (5 Replies)
Hi all;
I'm relatively new to scripting,I am working on a monitoring script.....where in i have to write subroutine
which does the follows:
It will check the time stamp of a file ( Oracle remarchive files) and compare it with existing time.If the time difference happen to be more than 90... (6 Replies)
I've gone through bunch of threads on time calculations but none of them helps on my problem
I've to get the time difference in HHMM format from following inputs
Input 1 :
01/08/2010 01:30
01/08/2010 03:20
Input 2 :
01/06/2010 22:00
01/07/2010 16:00
First input is easy but... (8 Replies)
hello guys,
I had been to many forums and many topics in this site as well for my question but did not get any solution.
My question is how i can get y'day date with time stamp
today is 20100729103819 and i am looking for output as 20100728103819.
in simple words as we do in oracle sysdate-1... (4 Replies)
1 TB of data needs to read through 4 I/O channesl, each channels supports - 100 MB/s, What is average time taken to read the data ?
Please give the formula for my understanding (2 Replies)
Hi,
I'm looking for a way to do a simple math calc during a shell script as a means of logging how long a particular task takes.
For example...
STARTTIME=whenever this script starts
./path/to/command.sh >>logfile.log
TOTALTIME=<time at this stage of the script after above command... (7 Replies)
Hi Gurus,
I need to get one hour before time is yyyymmddhh format.
ex. date +"%Y%m%d%H" gives 2017052814 but I need 2017052813
Thankx
Please use CODE tags as required by forum rules! (6 Replies)
Discussion started by: nalakaatslt
6 Replies
LEARN ABOUT XFREE86
timeout
TIMEOUT(1) User Commands TIMEOUT(1)NAME
timeout - run a command with a time limit
SYNOPSIS
timeout [OPTION] DURATION COMMAND [ARG]...
timeout [OPTION]
DESCRIPTION
Start COMMAND, and kill it if still running after DURATION.
Mandatory arguments to long options are mandatory for short options too.
--preserve-status
exit with the same status as COMMAND, even when the
command times out
--foreground
when not running timeout directly from a shell prompt,
allow COMMAND to read from the TTY and get TTY signals; in this mode, children of COMMAND will not be timed out
-k, --kill-after=DURATION
also send a KILL signal if COMMAND is still running
this long after the initial signal was sent
-s, --signal=SIGNAL
specify the signal to be sent on timeout;
SIGNAL may be a name like 'HUP' or a number; see 'kill -l' for a list of signals
--help
display this help and exit
--version
output version information and exit
DURATION is a floating point number with an optional suffix: 's' for seconds (the default), 'm' for minutes, 'h' for hours or 'd' for days.
If the command times out, and --preserve-status is not set, then exit with status 124. Otherwise, exit with the status of COMMAND. If no
signal is specified, send the TERM signal upon timeout. The TERM signal kills any process that does not block or catch that signal. It
may be necessary to use the KILL (9) signal, since this signal cannot be caught, in which case the exit status is 128+9 rather than 124.
BUGS
Some platforms don't currently support timeouts beyond the year 2038.
AUTHOR
Written by Padraig Brady.
REPORTING BUGS
GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
Report timeout translation bugs to <http://translationproject.org/team/>
COPYRIGHT
Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
SEE ALSO kill(1)
Full documentation at: <http://www.gnu.org/software/coreutils/timeout>
or available locally via: info '(coreutils) timeout invocation'
GNU coreutils 8.28 January 2018 TIMEOUT(1)