jnetperf/README.md

55 lines
1.5 KiB
Markdown
Raw Normal View History

2023-07-05 13:52:45 +00:00
# jnetperf
2023-06-22 06:40:31 +00:00
2023-07-05 13:52:45 +00:00
Small utility to measure (single threaded) network performance between two hosts.
2023-06-22 06:40:31 +00:00
## Requirements
2023-06-29 18:47:58 +00:00
You need Java (JRE) version 8 or later to run jnetperf.
2023-06-22 06:40:31 +00:00
## Usage Instructions
2023-07-05 14:06:40 +00:00
- Install the jnetperf package (*.deb*, *.rpm* or *.jar*) from [Packages](https://git.data.coop/nellemann/jnetperf/packages) or compile from source.
2023-07-05 13:52:45 +00:00
- Run **/opt/jnetperf/bin/jperf**, if installed from package, or as **java -jar /path/to/jnetperf.jar**
2023-06-22 06:40:31 +00:00
```shell
2023-07-13 19:59:38 +00:00
Usage: jnetperf [-huV] [-l=SIZE] [-n=NUM] [-p=PORT] (-c=SERVER | -s)
2023-07-05 13:52:45 +00:00
For more information visit https://git.data.coop/nellemann/jnetperf
-c, --connect=SERVER Connect to remote server.
-h, --help Show this help message and exit.
2023-07-13 19:59:38 +00:00
-l, --pkt-len=SIZE Packet size in bytes [default: 1432].
2023-07-05 13:52:45 +00:00
-n, --pkt-num=NUM Number of packets to send [default: 150000].
-p, --port=PORT Network port [default: 4445].
-s, --server Run server and wait for client.
2023-07-13 19:59:38 +00:00
-u, --udp Use UDP network protocol [default: false].
2023-07-05 13:52:45 +00:00
-V, --version Print version information and exit.
2023-06-22 06:40:31 +00:00
```
2023-07-05 13:52:45 +00:00
## Examples
On *host A* run jnetperf as a server waiting for a connection from a client:
```shell
java -jar jnetperf-x.y.z-all.jar -s
```
On *host B* run jnetperf as a client connecting to the server and sending data:
```shell
java -jar jnetperf-x.y.z-all.jar -c server-ip
```
2023-06-22 06:40:31 +00:00
## Development Information
2023-06-29 18:47:58 +00:00
You need Java (JDK) version 8 or later to build jnetperf.
2023-06-22 06:40:31 +00:00
2023-07-05 14:06:40 +00:00
2023-06-22 06:40:31 +00:00
### Build & Test
Use the gradle build tool, which will download all required dependencies:
```shell
2023-06-26 10:56:46 +00:00
./gradlew clean build
2023-06-22 06:40:31 +00:00
```