Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak 0.3 docs #79

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
aae884e
Start on UNDERSTANDING document
richb-hanover Sep 15, 2024
b477c79
Update screen shots to 0.3 version;
richb-hanover Sep 17, 2024
e66966b
Merge branch 'master' into Tweak-0.3-docs
richb-hanover Sep 17, 2024
a0e038b
Better screen shots
richb-hanover Sep 17, 2024
e9547a1
Fix the results-with-stats screen shot and its description
richb-hanover Sep 17, 2024
9446b04
Merge branch 'master' into Tweak-0.3-docs
richb-hanover Sep 17, 2024
a9f92b5
Editorial pass
richb-hanover Sep 17, 2024
7eb3e36
Improved screen shots for numeric summaries
richb-hanover Sep 17, 2024
33ae0a2
Editorial tweaks
richb-hanover Sep 18, 2024
bd390eb
Editorial tweaks
richb-hanover Sep 18, 2024
d8e3d9b
Factor out BUILDING.md from other files;
richb-hanover Sep 18, 2024
58974ff
Update README.md
Zoxc Sep 19, 2024
97db21a
Update description of Throughput;
richb-hanover Sep 20, 2024
cef0ec2
Merge commit '58974ff026c25bbf434935bdda4fead4ef87dd71' into Tweak-0.…
richb-hanover Sep 20, 2024
dcf6830
Fix Monitor screen shot
richb-hanover Sep 21, 2024
4dc570f
Merge branch 'master' into Tweak-0.3-docs
richb-hanover Sep 23, 2024
d432bbc
Revised screenshots;
richb-hanover Sep 23, 2024
6a2ba56
Revert parts of "Editorial tweaks"
Zoxc Sep 24, 2024
a1e38cc
Clarify use of TCP & UDP ports 35481
richb-hanover Oct 3, 2024
f78a64a
Merge commit '6a2ba56a3421749299575ef4b1adeed44c38ce22' into Tweak-0.…
richb-hanover Oct 3, 2024
72bcbf1
Reorganize to include a _docs_ directory;
richb-hanover Nov 11, 2024
9ca60a6
Merge branch 'master' into Tweak-0.3-docs
richb-hanover Nov 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
145 changes: 145 additions & 0 deletions COMMANDLINE.md
richb-hanover marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
# Running Crusader from the command line

## Server

To host a Crusader server, run this on the _server_ machine:

```sh
crusader serve
```

## Client

To start a test, run this on the _client machine_.
See the [command-line options](.options-for-the-test-command) for details.

```sh
crusader test <server-ip>
```

## Remote

To host a web server that provides remote control of a Crusader client,
run the command below, then connect to
`http://ip-of-the-crusader-device:35482`

```sh
crusader remote
```

## Plot

Crusader creates a `.png` file from a `.crr` file using `./crusader plot path-to-crr-file`
The resulting `.png` is saved in the same directory as the input file.

## Export

Crusader exports raw data samples from a `.crr` file
into a `.json` file using `./crusader export path-to-crr-file`
The resulting `.json` is saved in the same directory as the input file.

## Options for the `test` command

**Usage: crusader test [OPTIONS] \<SERVER>**

**Arguments:** \<SERVER>

**Options:**

* **`--download`**
Run a download test
* **`--upload`**
Run an upload test
* **`--bidirectional`**
Run a test doing both download and upload
* **`--idle`**
Run a test only measuring latency. The duration is specified by `grace_duration`
* **`--port <PORT>`**
Specifies the TCP and UDP port used by the server
[default: 35481]
* **`--streams <STREAMS>`**
The number of TCP connections used to generate
traffic in a single direction
[default: 16]
* **`--stream-stagger <SECONDS>`**
The delay between the start of each stream
[default: 0.0]
* **`--load-duration <SECONDS>`**
The duration in which traffic is generated
[default: 5.0]
* **`--grace-duration <SECONDS>`**
The idle time between each test
[default: 1.0]
* **`--latency-sample-interval <MILLISECONDS>`**
[default: 5.0]
* **`--throughput-sample-interval <MILLISECONDS>`**
[default: 20.0]
* **`--plot-transferred`**
Plot transferred bytes
* **`--plot-split-throughput`**
Plot upload and download separately and plot streams
* **`--plot-max-throughput <BPS>`**
Sets the axis for throughput to at least this value.
SI units are supported so `100M` would specify 100 Mbps
* **`--plot-max-latency <MILLISECONDS>`**
Sets the axis for latency to at least this value
* **`--plot-width <PIXELS>`**
* **`--plot-height <PIXELS>`**
* **`--plot-title <PLOT_TITLE>`**
* **`--latency-peer-address <LATENCY_PEER_ADDRESS>`**
Specifies another server (peer) which will
also measure the latency to the server independently of the client
* **`--latency-peer`**
Use another server (peer) which will also measure the latency to the server independently of the client
* **`--out-name <OUT_NAME>`**
The filename prefix used for the test result raw data and plot filenames
* **`-h, --help`**
Print help (see a summary with '-h')

## Building Crusader from source
richb-hanover marked this conversation as resolved.
Show resolved Hide resolved

Use [pre-built binaries](https://github.com/Zoxc/crusader/releases)
for everyday tests if available.

To develop or debug Crusader, use the commands below
to build the full set of binaries.
Executables will be placed in `src/target/release`

### Required dependencies

* A Rust and C toolchain.

### Additional dependencies for `crusader-gui`

Development packages for:

* `fontconfig`

To install these on Ubuntu:

```sh
sudo apt install libfontconfig1-dev
```

## Building

To build the `crusader` command line executable:

```sh
cd src
cargo build -p crusader --release
```

To build both command line and GUI executables:

```sh
cd src
cargo build --release
```

To build a docker container running the server:

```sh
cd docker
docker build .. -t crusader -f server-static.Dockerfile
```
164 changes: 15 additions & 149 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@ Local server discovery uses UDP port 35483.
and Android are available on the
[Releases](https://github.com/Zoxc/crusader/releases) page.
The GUI is not prebuilt for Linux and must be built from source.
See the [COMMANDLINE.md](COMMANDLINE.md) page for running Crusader
richb-hanover marked this conversation as resolved.
Show resolved Hide resolved
from the command-line or to build it from source.
A **Docker container** for running the server may be found on
[dockerhub](https://hub.docker.com/r/zoxc/crusader).

**Status:** The latest Crusader release version is shown above.
The pre-built binaries always provide the latest version.
The [pre-built binaries](https://github.com/Zoxc/crusader/releases)
always provide the latest version.
See the [CHANGELOG.md](./CHANGELOG.md) file for details.

## Crusader GUI
Expand All @@ -44,9 +47,10 @@ Enter the address of another computer that's
running the Crusader server, then click **Start test**.
When the test is complete, the **Result** tab shows a
chart like the second image below.
(An easy way to run the server is to download a copy
of the Crusader GUI
to another computer, start it, then choose the **Server** tab.)

An easy way to use Crusader is to download
the Crusader GUI onto two computers, then
start the server on one computer, and the client on the other.

![Crusader Client Screenshot](./media/Crusader-Client.png)

Expand All @@ -55,7 +59,7 @@ The Crusader GUI has five tabs:
* **Client tab**
Runs the Crusader client program.
The options shown above are described in the
[Command-line options](./#command-line-options) section.
[Command-line options](./COMMANDLINE.md) page.

* **Server tab**
Runs the Crusader server, listening for connections from other clients
Expand Down Expand Up @@ -99,170 +103,32 @@ and back (round-trip time).
* The **Packet Loss** plot has green and blue marks
that indicate times when packets were lost.

## Running Crusader from the command line

### Server

To host a Crusader server, run this on the _server_ machine:

```sh
crusader serve
```

### Client

To start a test, run this on the _client machine_:

```sh
crusader test <server-ip>
```

### Remote

To host a web server that provides remote control of a Crusader client,
run the command below, then connect to
`http://ip-of-the-crusader-device:35482`

```sh
crusader remote
```

### Options for the `test` command

**Usage: crusader test [OPTIONS] \<SERVER>**

**Arguments:** \<SERVER>

**Options:**

* **`--download`**
Run a download test
* **`--upload`**
Run an upload test
* **`--bidirectional`**
Run a test doing both download and upload
* **`--idle`**
Run a test only measuring latency. The duration is specified by `grace_duration`
* **`--port <PORT>`**
Specifies the TCP and UDP port used by the server
[default: 35481]
* **`--streams <STREAMS>`**
The number of TCP connections used to generate
traffic in a single direction
[default: 16]
* **`--stream-stagger <SECONDS>`**
The delay between the start of each stream
[default: 0.0]
* **`--load-duration <SECONDS>`**
The duration in which traffic is generated
[default: 5.0]
* **`--grace-duration <SECONDS>`**
The idle time between each test
[default: 1.0]
* **`--latency-sample-interval <MILLISECONDS>`**
[default: 5.0]
* **`--throughput-sample-interval <MILLISECONDS>`**
[default: 20.0]
* **`--plot-transferred`**
Plot transferred bytes
* **`--plot-split-throughput`**
Plot upload and download separately and plot streams
* **`--plot-max-throughput <BPS>`**
Sets the axis for throughput to at least this value.
SI units are supported so `100M` would specify 100 Mbps
* **`--plot-max-latency <MILLISECONDS>`**
Sets the axis for latency to at least this value
* **`--plot-width <PIXELS>`**
* **`--plot-height <PIXELS>`**
* **`--plot-title <PLOT_TITLE>`**
* **`--latency-peer-address <LATENCY_PEER_ADDRESS>`**
Specifies another server (peer) which will
also measure the latency to the server independently of the client
* **`--latency-peer`**
Use another server (peer) which will also measure the latency to the server independently of the client
* **`--out-name <OUT_NAME>`**
The filename prefix used for the test result raw data and plot filenames
* **`-h, --help`**
Print help (see a summary with '-h')

## Building Crusader from source

Use [pre-built binaries](https://github.com/Zoxc/crusader/releases)
for everyday tests if available.

To develop or debug Crusader, use the commands below
to build the full set of binaries.
Executables will be placed in `src/target/release`

### Required dependencies

* A Rust and C toolchain.

### Additional dependencies for `crusader-gui`

Development packages for:

* `fontconfig`

To install these on Ubuntu:

```sh
sudo apt install libfontconfig1-dev
```

### Building

To build the `crusader` command line executable:

```sh
cd src
cargo build -p crusader --release
```

To build both command line and GUI executables:

```sh
cd src
cargo build --release
```

To build a docker container running the server:

```sh
cd docker
docker build .. -t crusader -f server-static.Dockerfile
```
For more details, see the
[Understanding Crusader Results](./UNDERSTANDING.md) page.

## Troubleshooting

* On macOS, the first time you double-click
the pre-built `crusader` or `crusader-gui` icon,
the OS requires you to use **System Preferences -> Security**
to permit Crusader to run.
the OS refuses to let it run.
You must use **System Preferences -> Security**
to approve Crusader to run.

* Crusader requires that TCP and UDP ports 35481 are open for its tests.
Crusader also uses ports 35482 for the remote webserver
and port 35483 for discovering other Crusader Servers.
Check that your firewall is letting those ports through.

* The [Releases](https://github.com/Zoxc/crusader/releases) page
has pre-built binaries.
You can build your own using the instructions above.

* Create a debug build by using `cargo build`
(instead of `cargo build --release`).
Binaries are saved in the _src/target/debug_ directory

* Current binaries display the full commit hash in the log files.
To get the git commit hash of the current checkout,
use `git rev-parse HEAD`.

* The message `Warning: Load termination timed out. There may be residual untracked traffic in the background.` is not harmful. It may happen due to the TCP termination being lost
or TCP incompatibilities between OSes.
It's likely benign if you see throughput and latency drop
to idle values after the tests in the graph.

* The up and down latency measurement rely on symmetric stable latency
* The up and down latency measurements rely on symmetric stable latency
measurements to the server.
These values may be wrong if those assumption don't hold on test startup.

Expand Down
Loading
Loading