iperf for linux

PERF(1) User Commands IPERF(1)

NAME
iperf - measure network performance

SYNOPSIS
iperf [-s|-c host] [options]

iperf [-h|--help] [-v|--version]

DESCRIPTION
Client/Server:
-f, --format
[kmKM] format to report: Kbits, Mbits, KBytes, MBytes

-i, --interval
# seconds between periodic bandwidth reports

-l, --len
#[KM] length of buffer to read or write (default 8 KB)

-m, --print_mss
print TCP maximum segment size (MTU - TCP/IP header)

-p, --port
# server port to listen on/connect to

-u, --udp
use UDP rather than TCP

-w, --window
#[KM] TCP window size (socket buffer size)

-B, --bind
bind to , an interface or multicast address

-C, --compatibility
for use with older versions does not sent extra msgs

-M, --mss
# set TCP maximum segment size (MTU - 40 bytes)

-N, --nodelay
set TCP no delay, disabling Nagle’s Algorithm

-V, --IPv6Version
Set the domain to IPv6

Server specific:
-s, --server
run in server mode

-U, --single_udp
run in single threaded UDP mode

-D, --daemon
run the server as a daemon

Client specific:
-b, --bandwidth #[KM]
for UDP, bandwidth to send at in bits/sec (default 1 Mbit/sec,
implies -u)

-c, --client
run in client mode, connecting to

-d, --dualtest
Do a bidirectional test simultaneously

-n, --num
#[KM] number of bytes to transmit (instead of -t)

-r, --tradeoff
Do a bidirectional test individually

-t, --time
# time in seconds to transmit for (default 10 secs)

-F, --fileinput
input the data to be transmitted from a file

-I, --stdin
input the data to be transmitted from stdin

-L, --listenport #
port to recieve bidirectional tests back on

-P, --parallel
# number of parallel client threads to run

-T, --ttl
# time-to-live, for multicast (default 1)

Miscellaneous:
-h, --help
print this message and quit

-v, --version
print version information and quit

[KM] Indicates options that support a K or M suffix for kilo- or mega-

The TCP window size option can be set by the environment variable
TCP_WINDOW_SIZE. Most other options can be set by an environment vari?
able IPERF_, such as IPERF_BANDWIDTH.


example to use it: http://www.nanog.org/meetings/nanog43/presentations/Dugan_Iperf_N43.pdf

To setup in SunOs: http://www.mail-archive.com/iperf-users@lists.sourceforge.net/msg00074.html

---

mathhoang

The Cauchy-Schwarz Master Class: An Introduction to the Art of Mathematical Inequalities (Maa Problem Books Series.)




Title: The Cauchy-Schwarz Master Class: An Introduction to the Art of Mathematical Inequalities
Author:
Book Description:

Paperback: 316 pages
Publisher: Cambridge University Press (April 26, 2004)
Language: English
ISBN-10: 052154677X

Michael Steele describes the fundamental topics in mathematical inequalities and their uses. Using the Cauchy-Schwarz inequality as a guide, Steele presents a fascinating collection of problems related to inequalities and coaches readers through solutions, in a style reminiscent of George Polya, by teaching basic concepts and sharpening problem solving skills at the same time. Undergraduate and beginning graduate students in mathematics, theoretical computer science, statistics, engineering, and economics will find the book appropriate for self-study.
Download Link:

Link (PDF, 2.2MB)

Eclipse Rich Client Platform (2nd Edition)

Author/s : Jeff McAffer, Jean-Michel Lemieux, Chris Aniszczyk
Publisher : Addison-Wesley Professional
Category : Advanced Java
Review by : Christophe Verre
Rating : 10 horseshoes

Eclipse Rich Client Platform will teach you how to create professional and redistributable RCP applications. Part I and II look like a tutorial, but the rest of the book goes far beyond. First, you will create a chat application, adding views, editors, actions, help, integrating a third party library... The style is clear, and the progression is logical. API details are left for Part III, where RCP indispensable components are discussed, and that is where the simple tutorial ends.

Part IV introduces more advanced features like p2, dynamic plug-ins, product configurations for various platforms, testing... I found that this part required more thinking than the rest of the book, but it is invaluable if you aim at making a professional application. The last part is a reference about Eclipse and OSGi.

If you plan to make an Eclipse RCP application, if you have some interest in it or in Eclipse plug-ins, if you just like the Eclipse IDE, this book is for you. You'll learn a lot about the Eclipse architecture, and you will learn it the easy way. I also own another book of the Eclipse Series, Eclipse Plug-ins, 3rd Edition, which I enjoyed a lot. I was not disappointed by Eclipse Rich Client Platform, 2nd Edition. I highly recommend it.

download link

TANDEM

this will be posted tonight !
http://en.wikipedia.org/wiki/Tandem_Computers

Upstream và Downstream là gì ?

Upstream refers to the bandwidth for traffic from the end user PC to the Internet.

downstream refers to the bandwidth for traffic from internet to the end user.

For Internet surfing, the downstream traffic is much more than upstream traffic.

Tính toán Mbps

Instructions

    • 1

      Express the size of the computer file in bytes. The prefixes kilo-, mega- and giga- refer to multiples of 1,024, rather than 1,000.

      Assume a file is 32 MB in size. Expressing the file size in bytes would be 32 X 1,024 X 1,024 = 33,554,432 bytes.

    • 2

      Multiply the file's number of bytes by eight to find the number of bits.

      Continuing with the same example file size, the file would contain 33,554,432 bytes X 8 bits/byte = 268,435,456 bits.

    • 3

      Divide the number of bits transferred by the elapsed time, in seconds, it takes to transfer the file. Convert minutes into seconds by multiplying the number of minutes by 60.

      Continuing the example, assume the transfer required 26 minutes and 50.60 seconds.

      26 x 60 = 1,560 seconds

      1560 + 50.60 = 1,610.60 seconds

      268,435,456 / 1,610.60 = 166,667.99 bps

    • 4

      Express the speed as Mbps by dividing bps by 1,000,000.

      Using the example, the network runs at a speed of 0.17 Mbps.

mathhoang - vietnam_hoangminhnguyen: [Ebook]Chuyên đề bất đẳng thức

[Ebook]Chuyên đề bất đẳng thức

How Chinese learn mathematics

1 cuốn sách hay giúp các bạn có thêm phương pháp về học toán.

How Chinese learn mathematics


---
name: nguyen minh hoang
Y!M : vietnam_hoangminhnguyen@yahoo.com
net name: mathhoang


std::string as struct member variable

below is the problem !!!


Hi have this code

Expand|Select|Wrap|Line Numbers
  1. struct SF {
  2. std::string mnemonic;//mnemonic that represents it
  3. std::string name;//a descriptive name
  4. ushort num_val1;// number of the first value
  5. uchar possiblevalues_num; //number of the possible values.
  6. uchar type; /* = 1 if the feature is utilized in the models*/
  7. };
basically i am trying to declare a std::string object in a struct to later fill it with information

the next step i allocate an array of SF structs and try to do it

Expand|Select|Wrap|Line Numbers
  1. SF * FTab;
  2. FTab = (SF *) calloc(6, sizeof(SF));
  3. FTab[0].num_val1 = (ushort) 5;
  4. FTab[0].mnemonic("xpto");
the ushort type i can acess, the std::string generates a segmentation fault error, and i can't understant why. Does anyone know what i am doing wrong?

PS- sorry for the bad english.

Below is solution

E
M
M
Join Date: Mar 2007
Location: North Bend Washington USA
Posts: 6,292
#2: Oct 16 '07

re: std::string as struct member variable


It's the call to calloc.

C++ uses constructors and destructors to initialize and clean up objects. calloc doesn't know about this so never called them. Your string members are garbage.

Do not use C memory allocation in C++.

Use only new an delete. Here is the corrected code:

Expand|Select|Wrap|Line Numbers
  1. struct SF {
  2. std::string mnemonic;//mnemonic that represents it
  3. std::string name;//a descriptive name
  4. unsigned short num_val1;// number of the first value
  5. unsigned char possiblevalues_num; //number of the possible values.
  6. unsigned char type; /* = 1 if the feature is utilized in the models*/
  7. };
  8. int main()
  9. {
  10. SF * FTab;
  11. FTab = new SF[5];
  12. FTab[0].num_val1 = 5;
  13. FTab[0].mnemonic ="xpto";
  14. }
Decide now whether you will write in C++ or not. If yes, then do not:
1) malloc, calloc, alloc, etc.....
2) memcpy, mem... anything
3) free
4) exit(1)
5) strcpy, str... anything

for openers.
Related Posts Plugin for WordPress, Blogger...