Sponsored Content
Full Discussion: Help with programming
Top Forums Programming Help with programming Post 302359557 by magnetpest2k7 on Wednesday 7th of October 2009 01:41:37 AM
Old 10-07-2009
Power Help with programming

here is the detailed description: Can any one give me the code or guide.

Create a networking application using the socket interface to implement a "computing engine" service over TCP.
following describes the application, session, and presentation layers.

C language program that reads a list of numbers, integer or floating point, separated with newlines, from the client side, and outputs the average of these numbers. Lines that begin with the character | are called substitutions; substitutions should be executed and your program should use the elapsed running time (in seconds) for its calculation.

The server reads all lines, and return the average value of all of these values (include the elapsed running time of some execution)

Here is an example output:
Code:
$ average mercury 2345
     23
    543.2
    -32.1
    |/bin/sleep 2
    -13
    32.43 
     --


Last edited by pludi; 10-07-2009 at 03:20 AM.. Reason: code tags, please...
 

10 More Discussions You Might Find Interesting

1. Programming

c programming on vi

i am new in linux environment .I have used vi editor of Unix to get a programe compiled through "gcc ".kindly give me the options to get a program compiled & executed written in c on vi editor. I want the command to compile a file and the command to get that compiled file executed with any... (2 Replies)
Discussion started by: Rajraius
2 Replies

2. Programming

c programming or unix programming!?

i would like advice on the usbject of c programming (in the middle of reading a book on C). could i benefit more if i apply that knowledge in the unix format if i were able to, or would that take the point out of learning C, basically I want to stay away from strying too far away from unix and use... (1 Reply)
Discussion started by: moxxx68
1 Replies

3. Shell Programming and Scripting

Unix Systems Programming Vs Unix Programming

Several months ago I found a link that explained the difference between how a Unix Systems Admin would do scripting compared to what a Unix Programmer would do. It showed a basic script and then show several iterations that explained how the Systems Admin would change it to make it better. I was... (0 Replies)
Discussion started by: BCarlson
0 Replies

4. Programming

C++ programming

Sorry to ask this question here... where can I find a C++ programming thread? Thanks guys! (7 Replies)
Discussion started by: nadiamihu
7 Replies

5. Shell Programming and Scripting

New To Programming

Hello all!! I am new to programming, and to this forum. :D I am having sort of a problem. Me and my coworker are working on a code, both of us are stumped on a few things. One is we have a whole log file, i have found how to extract by column, but not by row. I need to extract by both.:confused:... (7 Replies)
Discussion started by: xkayla06
7 Replies

6. UNIX for Dummies Questions & Answers

Carreer:Networking Programming in Unix (C programming Language)

Hello, I am trying to learn Networking Programming in C in unix enviorment. I want to know how good it is to become a network programmer. i am crazy about Network programming but i also want to opt for the best carreer options. Anybody experienced Network Programmer, please tell me is my... (5 Replies)
Discussion started by: vibhory2j
5 Replies

7. Programming

C Programming - Hardware Programming

Can someone help me on suggesting some ways to access the memory content in RAM directly from C/C++ source code. Please provide me any book name or any URL so that I can get an exhaustive knowledge over it. If possible please give me some tips on interacting with hardwares directly through... (3 Replies)
Discussion started by: nandumishra
3 Replies

8. Shell Programming and Scripting

Sh programming

I have started writing one script. It is not taking the if block. Here is the script: #!/bin/sh set USER='/usr/ucb/whoami' ####################################################################### #Killing Process #######################################################################... (6 Replies)
Discussion started by: amarpreetka
6 Replies

9. UNIX for Dummies Questions & Answers

How does unix system administration, unix programming, unix network programming differ?

How does unix system administration, unix programming, unix network programming differ? Please help. (0 Replies)
Discussion started by: thulasidharan2k
0 Replies

10. UNIX for Dummies Questions & Answers

From iOS programming to Linux system programming

Hello. I like Linux and C programming language. Allways wanted to understand kernel and become a Linux system programmer. And I also like Objective-C and iOS. These two programming areas have relations: 1. Linux and iOS are UNIX-like systems, POSIX compliant. 2. It is useful to know C language... (2 Replies)
Discussion started by: Rockatansky
2 Replies
tcptrack(1)						      General Commands Manual						       tcptrack(1)

NAME
tcptrack - Monitor TCP connections on the network SYNOPSIS
tcptrack [ -dfhvp ] [ -r seconds ] -i interface [ filter expression ] DESCRIPTION
tcptrack displays the status of TCP connections that it sees on a given network interface. tcptrack monitors their state and displays information such as state, source/destination addresses and bandwidth usage in a sorted, updated list very much like the top(1) command. The filter expression is a standard pcap filter expression (identical to the expressions used by tcpdump(8)) which can be used to filter down the characteristics of TCP connections that tcptrack will see. See tcpdump(8) for more information about the syntax of this expres- sion. OPTIONS
-d Only track connections that were started after tcptrack was started. Do not try to detect existing connections. -f Enable fast average recalculation. TCPTrack will calculate the average speeds of connections by using a running average. TCPTrack will use more memory and CPU time, but averages will seem closer to real time and will be updated more than once per second and may be more accurate under heavy load. The number of times per second that averages will be recalculated in fast mode is a compile-time setting that defaults to 10 times per second. -h Display command line help -i [interface] Sniff packets from the specified network interface. -T [pcap file] Read packets from the specified file instead of sniffing from the network. Useful for testing. -p Do not put the interface being sniffed into promiscuous mode. -r [seconds] Wait this many seconds before removing a closed connection from the display. Defaults to 2 seconds. See also the pause interactive command (below). -v Display tcptrack version INTERACTIVE COMMANDS
The following keys may be pressed while tcptrack is running to change runtime options: p - Pause/unpause display. No new connections will be added to the display, and all currently displayed connections will remain in the dis- play. q - Quit tcptrack. s - Cycle through the sorting options: unsorted, sorted by rate, sorted by total bytes. The options for pausing and toggling sorting are useful if you're watching a very busy network and want to look at the display without con- nections jumping around (due to sorting and new connections being added) and disappearing (due to being closed for a certain time). When paused (via the p command) no new connections will be displayed, however tcptrack will still monitor and track all connections it sees as usual. This option affects the display only, not internals. When you unpause, the display will be updated with all current information that tcptrack has been gathering all along. EXAMPLES
tcptrack requires only one parameter to run: the -i flag followed by an interface name that you want tcptrack to monitor. This is the most basic way to run tcptrack: # tcptrack -i eth0 tcptrack can also take a pcap filter expression as an argument. The format of this filter expression is the same as that of tcpdump(8) and other libpcap-based sniffers. The following example will only show connections from host 10.45.165.2: # tcptrack -i eth0 src or dst 10.45.165.2 The next example will only show web traffic (ie, traffic on port 80): # tcptrack -i eth0 port 80 SEE ALSO
tcpdump(8), pcap(3), http://www.rhythm.cx/~steve/devel/tcptrack BUGS
When picking up a connection that was already running before tcptrack was started, there is no way tcptrack can know for sure which end of the connection is the client (ie, which peer started the connection) and which is the server (ie, which peer was listening). tcptrack makes a crude guess at which is which by looking at the port numbers; whichever end has the lower port number is considered the server side. This isn't always accurate of course, but future versions may have better heuristics to figure out which end is which. Currently the interface is not very flexible. Display timing settings (such as the refresh interval) can only be changed by editing the source code (defs.h in particular). See the TODO file included with the source distribution for further bugs. tcptrack(1)
All times are GMT -4. The time now is 04:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy