Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Script shell calculate mean arrival request duration Post 302850467 by Smiling Dragon on Wednesday 4th of September 2013 10:44:12 PM
Old 09-04-2013
To assist us in this, try breaking the problem up a bit - I can't spek fo the others here but I'm reluctant to expend a bunch of energy understanding how that packet dump format works and what the chain of events should be.

What specific questions do you have?
Are you having trouble making a script that identifies which lines in the output make up one 'conversation'? (If so, list what one conversation would look like and then show it in the larger output)
Are you having trouble scripting the maths to calculate the time differences? (If so, show exactly what values you are trying to perform the maths on).

Sorry I can't help more yet but you should find plenty of assistance once the problem is more clear.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell Script calculate the hits ?!

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)
Discussion started by: anything
0 Replies

2. Shell Programming and Scripting

need to invoke a script upon arrival of a file

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)
Discussion started by: sais
2 Replies

3. Shell Programming and Scripting

Calling a request set from Unix shell Script

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)
Discussion started by: swatipevekar
4 Replies

4. Shell Programming and Scripting

shell script to get the arrival count of file

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)
Discussion started by: RSC1985
2 Replies

5. Shell Programming and Scripting

date duration fail to calculate

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)
Discussion started by: jimmy_y
2 Replies

6. Shell Programming and Scripting

Calculate Date from shell script

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)
Discussion started by: gubbu
1 Replies

7. Shell Programming and Scripting

Shell script request

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)
Discussion started by: udayakumar
5 Replies

8. Shell Programming and Scripting

Convert Date from File and Calculate Duration

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)
Discussion started by: Newbie2012
5 Replies

9. Shell Programming and Scripting

Shell script to calculate the max cpu usage from the main script

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)
Discussion started by: Optimus81
1 Replies

10. UNIX for Beginners Questions & Answers

How to calculate time duration in Linux?

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
PHONE(1)						      General Commands Manual							  PHONE(1)

NAME
phone - communicate with other users in real-time SYNOPSIS
phone [ user@host [tty] ] DESCRIPTION
Phone allows for two or more people to interact in a conversation across a machine or network, providing a form of conference calling. Each participant has a window in which to type. The first line of each window is a header showing who is in the window, like: ---- root@cory on console (Commodore Cory) -------------- The login name and tty are automatically determined, and the real name is taken from the password file, which may be overridden by setting the NAME environment variable (see csh(1) for further details.) Users may join or leave a conversation at any point in time, and the win- dows will be automatically resized and redrawn. USAGE
When you are being paged by another person, a message like this will appear on your screen: Message from the Telephone_Operator@host at time ... phone: connection requested by user@host phone: respond with "phone user@host" You may answer the phone simply by typing "phone", which will answer the pending call, and connect you directly. Phone has two modes, much like the vi editor. These two modes are called conversation and command modes, and are toggled through the escape (<esc>) and return (<ret>) keys. When in the conversation mode, anything typed on the keyboard is sent to everyone in the current conversation. This is the default mode. The command mode is used to execute commands, and is entered by pressing the escape key. When in this mode, phone will clear the bottom line of the screen and print the prompt "Command>". At this point anything typed in is added to the command buffer, and will be executed when the return key is pressed. To exit command mode without executing the acommand, press the escape key a second time. To ivite another user to join the current conversation from within phone, enter command mode by pressing the escape key, then type call user@host followed by the <return> key. The user will receive a message like the one shown above if he is logged in. The host part of the name may be omitted if the both you and the other person are on the same machine. Phone also allows a user to execute shell commands inside his window with any keyboard input being fed to the process. The program's out- put is sent to all users in the conversation. A shell command is executed within phone through the use of the run or ! command. An exam- ple of this is: run adb a.out core to run the adb command with the arguments a.out and core. Note that tilde expansion (ie. ~user) is done by phone, but wildcarding, piping, and i/o redirection are performed by the user's shell. It is unlikely that anyone actually cares, of course. Also, the use of visually- oriented programs such as vi and rogue is not recommended, as this usually results in strange and unpredictable things happening. If your terminal goes up in a puff of smoke, you were warned. To find about the other commands available with phone, type help or ? in command mode. You can allow or disallow phone messages to your terminal through the use of the mesg command. When you first log on, messages are enabled. BUGS
Csh is unhappy being fed through pipes, but it's a dumb program anyway. The manual page is horrendous at best. Please send any problems, questions, or suggestions to the author. AUTHOR
Jonathan C. Broome (broome@ucb-vax.berkeley.edu) The original user interface is borrowed from a previous program (also called phone) posted to the network in late 1984, author unknown. FILES
/etc/hosts to find the recipient's machine /etc/utmp to find the recipient's tty /etc/passwd to find each user's real name SEE ALSO
mail(1), mesg(1), talk(1), who(1), write(1) 4.2 Berkeley Distribution PHONE(1)
All times are GMT -4. The time now is 09:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy