Script shell calculate mean arrival request duration
hello,
I have implemented this command :
the result of this command : test.txt:
so this file presents the arrival time and the name of the request or response of the sip protocol.
my purpose is to calculate :
1) the mean time duration of request = sum ( arrival_time_current_request - arrival_time_previous-request) / ( total number of request)
given that a sip request can be : ack, invite,cancel
1) I will repeat the same think with response :the mean time duration of response = sum ( arrival_time_current_resonset - arrival_time_previous-response) / ( total number of response)
given that a sip response can be : 180Ringing,200ok....etc
Thanks you.
---------- Post updated at 09:34 AM ---------- Previous update was at 06:49 AM ----------
Please how can help me ?
Last edited by Scott; 08-28-2013 at 09:18 AM..
Reason: Please use code tags
could you please find a solution for this
a complex command using pipes to Calculate the number of hits per client in Squid log file (access.log), the command should display most active hosts first.
Line example
1197979501.787 1 10.1.14.62 TCP_NEGATIVE_HIT/404 1463 GET http://url
The... (0 Replies)
hi all,
i recieve a file from other server, on a daily basis .... but the time of arrival is unpredictable ....
i need to move this file to another directory before the next file arrives ...
i have written a script that does this op and performs some manipulations on the data...
but i... (2 Replies)
Hi All,
I want to call a concurrent request set from a shell script. I am getting the syntax error "syntax error at line 417 : `(' unexpected" in the below script.
v_request_id=fnd_request.submit_request(application => 'APPL_SHORT_NAME'
,program => 'PROGRAM_SHORT_NAME'
... (4 Replies)
Hello All,
I have come across a small problem. It would be great if any of you could help me in resolving the issue.
one file named dummy.txt will be ftped to Unix machine twice daily. If i receive it second time in a day i need to do some processing with the file.
How to find the... (2 Replies)
Hi Everyone,
I was very sad after a long way but still cannot figure out the duration between two date.
$date1="20090812 23:48:56";
$date2="20090813 00:01:37";
The output will be "001241".
I did the following tries, like print localtime(UnixDate(ParseDate("20090812 23:48:56"),"%s"));... (2 Replies)
I have a txt file which now has the following output
Sat Mar 6 04:00:01
Sat Mar 6 04:02:09
processing 585
Sat Mar 6 17:00:01
Sat Mar 6 17:00:58
processing 109
Sun Mar 7 04:00:01
Sun Mar 7 04:00:51
processing 309
Sun Mar 7 17:00:01
Sun Mar 7 17:00:41
processing 48
I want output as... (1 Reply)
I've a master file which will contain 100 file names, The script should read file name from a master file and format the file as below in AIX.
input file
Filename
This
is
a
test
file
Output File
Filename|This is a test file
Thanks in advance
for file in $FileList; do (5 Replies)
Hi - I am looking for a little help to read in 2 date fields from a file in format:
20120508134012.3
yyyymmddhhmmss.tenths of a second
So i want to:
1. Read in the 1st date from the file
2. Read in the second date from the file
3. Calculate the difference in minutes (or seconds)
4. ... (5 Replies)
Hi All,
I have a script which does report the cpu usuage, there are few output parameter/fields displayed from the script. My problem is I have monitor the output and decide
which cpu number (column 2) has maximum value (column 6).
Since the output is displayed/updated every seconds, it's very... (1 Reply)
I want to calculate duration for below file in this format
SID | Date | Starttime |Date |End time
1607 |2019-04-05|13:06:42|2019-04-05|13:07:12
2327 |2019-04-05|13:57:26|2019-04-05|13:57:43
O/p should be like this:
SID | Date | Starttime |Date |Endtime... (4 Replies)
Discussion started by: anupmishra
4 Replies
LEARN ABOUT OPENSOLARIS
sip_disable_dialog_logging
sip_enable_trans_logging(3SIP) Session Initiation Protocol Library Functions sip_enable_trans_logging(3SIP)NAME
sip_enable_trans_logging, sip_enable_dialog_logging, sip_disable_dialog_logging, sip_disable_trans_logging - transaction and dialog logging
operations
SYNOPSIS
cc [ flag... ] file... -lsip [ library... ]
#include <sip.h>
int sip_enable_trans_logging(FILE *logfile, int flags);
int sip_enable_dialog_logging(FILE *logfile, int flags);
void sip_disable_dialog_logging();
void sip_disable_trans_logging();
DESCRIPTION
The sip_enable_trans_logging() and sip_enable_dialog_logging() functions enable transaction and dialog logging respectively. The logfile
argument points to a file to which the SIP messages are logged. The flags argument controls the amount of logging. The only flag defined in
<sip.h> is SIP_DETAIL_LOGGING. Either transaction or dialog logging, or both, can be enabled at any time. For dialog logging to work, the
SIP stack must be enabled to manage dialogs (using SIP_STACK_DIALOGS, see sip_stack_init(3SIP)) when the stack is initialized.
All the messages exchanged within a transaction/dialog is captured and later dumped to a log file when the transaction or dialog is deleted
or terminated. Upon termination, each dialog writes to the file the messages that were processed in its context. Similarly, upon termina-
tion each transaction writes to the file the messages that were processed in its context.
The sip_disable_trans_logging() and sip_disable_dialog_logging() functions disable the transaction or dialog logging. These functions do
not close the files. It is the responsibility of the application to close them.
The log contains the state of the transaction or dialog at the time the message was processed.
RETURN VALUES
Upon successful completion, sip_enable_trans_logging() and sip_enable_dialog_logging() return 0. They return EINVAL if logfile is NULL or
flags is unrecognized.
EXAMPLES
Example 1 Dialog logging
The following is an example of dialog logging.
FILE *logfile;
logfile = fopen("/tmp/ApplicationA", "a+");
sip_enable_dialog_logging(logfile, SIP_DETAIL_LOGGING);
/* Application sends INVITE, recieves 180 and 200 response and dialog is
created. */
/* Application sends ACK request */
/* Application sends BYE and recieves 200 response */
/* Application disables logging */
sip_disable_dialog_logging();
The log file will be of the following format.
************* Begin Dialog *************
Digest : 43854 43825 26120 9475 5415 21595 25658 18538
-----------------------------
Dialog State : SIP_DLG_NEW
Tue Nov 27 15:53:34 2007| Message - 1
INVITE sip:user@example.com SIP/2.0
From: "Me" < sip:me@mydomain.com > ; TAG=tag-from-01
To: "You" < sip:you@yourdomain.com >
Contact: < sip:myhome.host.com >
MAX-FORWARDS: 70
Call-ID: 1261K6A6492KF33549XM
CSeq: 111 INVITE
CONTENT-TYPE: application/sdp
Via: SIP/2.0/UDP 192.0.0.1 : 5060 ;branch=z9hG4bK-via-EVERYTHINGIDO-05
Record-Route: <sip:server1.com;lr>
Record-Route: <sip:server2.com;lr>
CONTENT-LENGTH : 0
Tue Nov 27 15:53:34 2007| Message - 2
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.0.0.1 : 5060 ;branch=z9hG4bK-via-EVERYTHINGIDO-05
From: "Me" < sip:me@mydomain.com > ; TAG=tag-from-01
To: "You" < sip:you@yourdomain.com >;tag=1
Call-ID: 1261K6A6492KF33549XM
CSeq: 111 INVITE
Contact: <sip:whitestar2-0.East.Sun.COM:5060;transport=UDP>
Record-Route: <sip:server1.com;lr>
Record-Route: <sip:server2.com;lr>
Content-Length: 0
-----------------------------
Dialog State : SIP_DLG_EARLY
/* Entire 200 OK SIP Response */
-----------------------------
Dialog State : SIP_DLG_CONFIRMED
/* Entire ACK Request */
/* Entire BYE Request */
/* Entire 200 OK Response */
-----------------------------
************* End Dialog *************
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Committed |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO sip_stack_init(3SIP), attributes(5)SunOS 5.11 11 Jan 2008 sip_enable_trans_logging(3SIP)