Sponsored Content
Top Forums UNIX for Dummies Questions & Answers While we are on the subject of dates. Another date question Post 7047 by MizzGail on Tuesday 18th of September 2001 08:16:13 AM
Old 09-18-2001
thank you , I guess I should have been more specific. I know how to get the date and time.
I need to obtain the time difference between the start times of my jobs.
ie. the job kicks off at 8:30:00 then again at 8:47:00 I need to calculate the difference between these two times. then I can do a reasonbility check for the time span - if the time span is greater than 15mins, I want to send a notify to a pager. I know how to send the notify, what I am looking for is how to determine the time span / difference.

thanks
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

using 'date' to get previous days' dates

I am familiar with using the 'date' command to get the current date but I have a situation where I need to get the previous day's date as well as the date two days prior. Theoretically I could use 'expr' to compute these values but I need it to work in instances where the previous month's dates... (2 Replies)
Discussion started by: slant-40
2 Replies

2. Shell Programming and Scripting

Display the last five dates from the given date

Hi all, In Oracle we have got sysdate -1 to find the previous date. Is there any similar way to display date in unix shell scripting? Kindly help me to display the last five dates from the given date Thanks, Geetha (11 Replies)
Discussion started by: iamgeethuj
11 Replies

3. Shell Programming and Scripting

Generate quarter dates with begin date and end date

Hi All, I am trying to generate quarter dates with user giving input as begin date and end date. Example: Input by user: begin_date = "2009-01-01" end_date = 2010-04-30" required output: 2009-01-01 2009-03-31 09Q01 2009-04-01 2009-06-30 09Q02 . . till 2010-01-01 2010-03-31 10Q01 ... (9 Replies)
Discussion started by: sol_nov
9 Replies

4. Solaris

Date after 5 dates in YYYYMMDD format

Hi Experts, How to get date 5 days after current date in YYYYMMDD format? How do we compare date in YYYYMMDD format? Thanks (1 Reply)
Discussion started by: needyourhelp10
1 Replies

5. Shell Programming and Scripting

Using 'date' to list a range of dates

Hi guys, I have been trying to create a list of dates from a certain range, ie. range from 01011950 to 31122000 But when my below code reaches certain dates, it comes up with a; 'date: invalid date 'yyyy-mm-dd -d 1day' Sofar I have come up with the following, slow and ugly; ... (4 Replies)
Discussion started by: TAPE
4 Replies

6. Shell Programming and Scripting

Need to capture all dates between start date and End date.

Hi All, I enter Start date and end date as parameters. I need to capture dates between start date and end date. Please let me know if you have any idea the same. Thanks in advance. Nagaraja Akkivalli. (5 Replies)
Discussion started by: Nagaraja Akkiva
5 Replies

7. Shell Programming and Scripting

Need to capture dates between start date and end date Using perl.

Hi All, Want to get all dates and Julian week number for that date between the start date and end date. How can I achive this using perl? (To achive above functionality, I was connecting to the database from DB server. Need to execute the same script in application server, since databse... (6 Replies)
Discussion started by: Nagaraja Akkiva
6 Replies

8. Shell Programming and Scripting

ksh compare dates INSIDE a file (ie date A is > date B)

In KSH, I am pasting 2 almost identical files together and each one has a date and time on each line. I need to determine if the first instance of the date/time is greater than the 2nd instance of the date/time. If the first instance is greater, I just need to echo that line. I thought I would... (4 Replies)
Discussion started by: right_coaster
4 Replies

9. UNIX for Advanced & Expert Users

Date between 2 dates

Hi All, Can you help me in finding the business dates (Mon-Fri) between two date ranges.. (forget abt holidays in weekdays) searched and tried a lot but cant figure this. ISs there any special function availble in unix for this (5 Replies)
Discussion started by: Deena1984
5 Replies

10. UNIX for Beginners Questions & Answers

Splitting week start date and end date based on custom period start dates

Below are my custom period start and end dates based on a calender, these dates are placed in a file, for each period i need to split into three weeks for each period row, example is given below. Could you please help out to achieve solution through shell script.. File content: ... (2 Replies)
Discussion started by: nani2019
2 Replies
dat_ep_recv_query(3DAT) 			     Direct Access Transport Library Functions				   dat_ep_recv_query(3DAT)

NAME
dat_ep_recv_query - provide Endpoint receive queue consumption on SRQ SYNOPSIS
cc [ flag... ] file... -ldat [ library... ] #include <dat/udat.h> DAT_RETURN dat_ep_recv_query ( IN DAT_EP_HANDLE ep_handle, OUT DAT_COUNT *nbufs_allocated, OUT DAT_COUNT *bufs_alloc_span ) PARAMETERS
ep_handle Handle for an instance of the EP. nbufs_allocated The number of buffers at the EP for which completions have not yet been generated. bufs_alloc_span The span of buffers that EP needs to complete arriving messages. DESCRIPTION
The dat_ep_recv_query() function provides to the Consumer a snapshot for Recv buffers on EP. The values for nbufs_allocated and bufs_alloc_span are not defined when DAT_RETURN is not DAT_SUCCESS. The Provider might not support nbufs_allocated, bufs_alloc_span or both. Check the Provider attribute for EP Recv info support. When the Provider does not support both of these counts, the return value for the operation can be DAT_MODEL_NOT_SUPPORTED. If nbufs_allocated is not NULL, the count pointed to by nbufs_allocated will return a snapshot count of the number of buffers allocated to ep_handle but not yet completed. Once a buffer has been allocated to an EP, it will be completed to the EP recv_evd if the EVD has not overflowed. When an EP does not use SRQ, a buffer is allocated as soon as it is posted to the EP. For EP that uses SRQ, a buffer is allocated to the EP when EP removes it from SRQ. If bufs_alloc_span is not NULL, then the count to which bufs_alloc_span pointed will return the span of buffers allocated to the ep_handle. The span is the number of additional successful Recv completions that EP can generate if all the messages it is currently receiving will complete successfully. If a message sequence number is assigned to all received messages, the buffer span is the difference between the latest message sequence number of an allocated buffer minus the latest message sequence number for which completion has been generated. This sequence number only counts Send messages of remote Endpoint of the connection. The Message Sequence Number (MSN) represents the order that Send messages were submitted by the remote Consumer. The ordering of sends is intrinsic to the definition of a reliable service. Therefore every send message does have a MSN whether or not the native transport has a field with that name. For both nbufs_allocated and bufs_alloc_span, the Provider can return the reserved value DAT_VALUE_UNKNOWN if it cannot obtain the requested count at a reasonable cost. RETURN VALUES
DAT_SUCCESS The operation was successful. DAT_INVALID_PARAMETER Invalid parameter. DAT_INVALID_HANDLE The DAT handle ep_handle is invalid. DAT_MODEL_NOT_SUPPORTED The requested Model was not supported by the Provider. USAGE
If the Provider cannot support the query for nbufs_allocated or bufs_alloc_span, the value returned for that attribute must be DAT_VALUE_UNKNOWN. An implementation that processes incoming packets out of order and allocates from SRQs on an arrival basis can have gaps in the MSNs asso- ciated with buffers allocated to an Endpoint. For example, suppose Endpoint X has received buffer fragments for MSNs 19, 22, and 23. With arrival ordering, the EP would have allocated three buffers from the SRQ for messages 19, 22, and 23. The number allocated would be 3, but the span would be 5. The difference of two represents the buffers that will have to be allocated for messages 20 and 21. They have not yet been allocated, but messages 22 and 23 will not be delivered until after messages 20 and 21 have not only had their buffers allocated but have also completed. An implementation can choose to allocate 20 and 21 as soon as any higher buffer is allocated. This makes sense if you presume that this is a valid connection, because obviously 20 and 21 are in flight. However, it creates a greater vulnerability to Denial Of Service attacks. There are also other implementation tradeoffs, so the Consumer should accept that different RNICs for iWARP will employ different strate- gies on when to perform these allocations. Each implementation will have some method of tracking the receive buffers already associated with an EP and knowing which buffer matches which incoming message, though those methods might vary. In particular, there are valid implementations such as linked lists, where a count of the outstanding buffers is not instantly available. Such implementations would have to scan the allocated list to determine both the number of buffers and their span. If such a scan is necessary, it is important that it be only a single scan. The set of buffers that was counted must be the same set of buffers for which the span is reported. The implementation should not scan twice, once to count the buffers and then again to determine their span. Not only is it inefficient, but it might produce inconsistent results if buffers were completed or arrived between the two scans. Other implementations can simply maintain counts of these values to easily filter invalid packets. If so, these status counters should be updated and referenced atomically. The implementation must never report n buffers in a span that is less than n. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard: uDAPL, 1.2 | +-----------------------------+-----------------------------+ |MT-Level |Unsafe | +-----------------------------+-----------------------------+ SEE ALSO
dat_ep_create(3DAT), dat_srq_create(3DAT), dat_srq_free(3DAT), dat_srq_query(3DAT), dat_ep_set_watermark(3DAT), libdat(3LIB), attributes(5) SunOS 5.11 16 Jul 2004 dat_ep_recv_query(3DAT)
All times are GMT -4. The time now is 07:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy