Hi All,
I am working on a korn shell script.
I have a problem.i am calculating the next 27 hours
from the time stamp.
say TSTAMP=20060724000000
if i add 27 hours to the above time stamp,
i will get 20060724143000
this is the code:
YEAR=`echo $TSTAMP | awk... (0 Replies)
Hi
i want to print the time of a process in hours only..(or) in minutes only.Is there anyway to print the process such like that
when i give the commnand like following
#ps -eo pid,time
PID TIME
412 01:49:32
481 00:03
it shows in HH:MM:SS format:
Could anyone... (1 Reply)
Dear Folks,
I want to calculate the elapsed hours between two time columns. I am using timestampdiff method for the same. I am able to get the value. But facing an issue of decimal values. For example the elapsed hours between 09:00:00 and 20:30:00 is coming as 11 instead of 11.5. I am using below... (1 Reply)
Hi,
I am trying to design a script, which will monitor a log file, and it should dump all the rows that were logged between now and past four hours.
The date format within the logs is "2/Jan/2011:03:13:27". So I am using below command to substract four hours from the current time :
$... (8 Replies)
I want to add a crontab entry which should execute for every 4 hours and that 4 hours calculation should begin from the current time.
Normally if I set the crontab entry like this,
00 */4 30 05 * root date >>/tmp/cronout
The above will execute the date command for every 4 hours like... (7 Replies)
Hi Experts,
Can you please help me in transposing Datefield from rows to column and calculate the time difference for each of the Jobids:
Input File:
08/23/2012 12:36:09,JOB_5340
08/23/2012 12:36:14,JOB_5340
08/23/2012 12:36:22,JOB_5350
08/23/2012 12:36:26,JOB_5350
Required Output:... (6 Replies)
I have created the script to grep the errors from weblogic logs files and redirecting output to file.txt ...From file.txt I'm using awk command to collect the past 20 mins output...The script running from cron every 15 mins... The script working well...
Now the challenges, I'm trying to use... (27 Replies)
Guys i have 3 files,
but i want to compare and diff only the 2nd column
path=`/home/whois/doms`
for i in `cat domain.tx`
do
whois $i| sed -n '/Registry Registrant ID:/,/Registrant Email:/p' > $path/$i.registrant
whois $i| sed -n '/Registry Admin ID:/,/Admin Email:/p' > $path/$i.admin... (10 Replies)
Gents,
Is there the way to increase hours (+3) to the data with the format following.
example
JDhhmmss
335193508
input
335193508
335203508
335213508
335223508
335233508
output
335223508
335233508
336003508
336013508 (14 Replies)
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
LEARN ABOUT CENTOS
__pmmktime
PMMKTIME(3) Library Functions Manual PMMKTIME(3)NAME
__pmMktime - convert a tm structure to a calendar time
C SYNOPSIS
#include <time.h>
#include <pcp/pmapi.h>
#include <pcp/impl.h>
time_t *__pmMktime(struct tm *timeptr);
cc ... -lpcp
DESCRIPTION
__pmMktime is very similar to mktime(3), except the timezone used is the current ``reporting timezone'' (rather than the default TZ envi-
ronment variable scheme).
Like mktime(3) the time to be converted is passed via timeptr, and the function result contains the calendar time (the number of seconds
since 00:00:00 UTC, January 1, 1970).
The default current reporting timezone is as defined by the TZ environment variable, so __pmMktime and mktime(3) will initially produce
similar conversions.
Use pmNewZone(3), pmNewContextZone(3) or pmUseZone(3) to establish a new current reporting timezone that will effect __pmMktime but not
mktime(3).
SEE ALSO mktime(3), PMAPI(3), pmCtime(3), pmLocaltime(3), pmNewContextZone(3), pmNewZone(3) and pmUseZone(3).
Performance Co-Pilot PCP PMMKTIME(3)