iPerf テストを実行
設定可能なサーバー、プロトコル、方向、タイミングでテストを実行。Shortcutsフローのデフォルト時間は通常5秒です。
開発者ドキュメント
組み込みアクションとコールバックエンドポイントを使用して、スループットチェック、エンドポイント検証、結果収集を自動化。
iPerf3クライアント&サーバーは2つのオートメーションレイヤーを公開しています:
コールバックベースのオートメーションにはiperf3cs://x-callback-url/...を使用。
現在のAppleプラットフォーム要件はiOS/iPadOS 16.6以降、macOS 13.5以降、visionOS 1.0以降です。
これらのアクションはApple Shortcutsアプリで直接利用可能です:
設定可能なサーバー、プロトコル、方向、タイミングでテストを実行。Shortcutsフローのデフォルト時間は通常5秒です。
ローカル履歴から最新の完了結果を返します。
完全な実行前にエンドポイントの可用性を確認します。
メニュー駆動のオートメーション用に設定済みサーバーを返します。
Runs a test and returns the result through the callback URLs.
| パラメーター | タイプ | 必須 | 説明 |
|---|---|---|---|
serverId | String | いいえ | Saved server to use: host:port, a server UUID, or default. Omit it and the default server is used. |
serverName | String | いいえ | Pick the server by its saved name instead of serverId. Takes precedence when both are present. |
autoAdd | Boolean | いいえ | Create the server if it is not in the library yet. addServer is accepted as an alias. |
durationSec | Integer | いいえ | Test length in seconds. Defaults to 5. |
protocol | String | いいえ | tcp (default) or udp. |
direction | String | いいえ | download, upload or bidirectional. |
streams | Integer | いいえ | Parallel stream count. |
bandwidthMbps | Number | いいえ | Target bandwidth for UDP tests, in Mbps. |
format | String | いいえ | json (default) or text. |
x-success | String | いいえ | Callback URL. Receives result with the payload, or resultRef when the payload is too large to pass in a URL. |
x-error | String | いいえ | Callback URL. Receives errorCode and errorMessage. |
x-cancel | String | いいえ | Callback URL for a cancelled run. |
Returns the most recent saved result. Useful for periodic logging.
| パラメーター | タイプ | 必須 | 説明 |
|---|---|---|---|
serverId | String | いいえ | Limit the lookup to one server: host:port, a UUID, or default. Omit it for the latest result overall. |
serverName | String | いいえ | Same lookup by saved name. Takes precedence over serverId. |
format | String | いいえ | json (default) or text. |
x-success | String | いいえ | Callback URL. Receives result with the payload, or resultRef when the payload is too large to pass in a URL. |
x-error | String | いいえ | Callback URL. Receives errorCode and errorMessage. |
x-cancel | String | いいえ | Callback URL for a cancelled run. |
Fetches a payload the app handed back as a reference. When a result is too large for a callback URL, the app returns <code>resultRef</code> instead of <code>result</code>, and this endpoint exchanges that reference for the full payload.
| パラメーター | タイプ | 必須 | 説明 |
|---|---|---|---|
resultRef | String | はい | Reference returned earlier in place of result. |
format | String | いいえ | json (default) or text. |
x-success | String | いいえ | Callback URL. Receives result with the payload, or resultRef when the payload is too large to pass in a URL. |
x-error | String | いいえ | Callback URL. Receives errorCode and errorMessage. |
x-cancel | String | いいえ | Callback URL for a cancelled run. |
iperf3cs://x-callback-url/run-test?serverId=iperf.example.com:5201&autoAdd=1&protocol=tcp&direction=download&durationSec=8&format=json&x-success=shortcuts://run-shortcut?name=StoreResult iperf3cs://x-callback-url/get-last-result?format=json&x-success=shortcuts://run-shortcut?name=PushSummary open "iperf3cs://x-callback-url/run-test?serverId=10.0.1.5:5201&protocol=udp&direction=bidirectional&durationSec=5" {
"success": true,
"startTime": "2026-08-21T09:42:02Z",
"endTime": "2026-08-21T09:42:10Z",
"duration": 8,
"receivedMegabitsPerSecond": 942.7,
"sentMegabitsPerSecond": 876.4,
"receivedBytes": 942700000,
"summaryText": "942.7 Mbps down, 876.4 Mbps up"
} アクションが失敗しx-errorが存在する場合、コールバックはエラーオブジェクトを受け取ります。
| コード | 説明 |
|---|---|
| invalidParameter | A parameter is missing, malformed or out of range. |
| serverNotFound | No saved server matched the lookup, and autoAdd was not set. |
| networkUnavailable | The device has no usable network path to the endpoint. |
| connectionTimeout | The connection or the test exceeded its timeout. |
| testFailed | The test started and ended without a usable result. |
| cancelled | The run was cancelled before it finished. |
| requiresAppOpen | The action needs the app in the foreground. |
| unsupportedOnOSVersion | The action is not available on this OS version. |
{
"errorCode": "serverNotFound",
"errorMessage": "No saved server matches iperf.example.com:5201"
} コールバックURLがURLエンコードされており、スキームがデバイスで許可されていることを確認してください。クエリ値にスペースやエスケープされていない記号を使用しないでください。
確実な実行のため、テスト実行中はアプリをアクティブな状態に保ってください。Shortcutsのスケジュール機能を使用して特定の時間にテストを起動してください。
すべての呼び出しにx-errorを指定し、errorCodeで分岐してください。まずdurationSec=5の短い実行から始め、serverNotFoundやconnectionTimeoutが返る場合は長いテストを走らせる意味がありません。