You need to enable JavaScript to run this app.
Torch Object Storage

Torch Object Storage

Copy page
Download PDF
Auxiliary commands
One-click network diagnosis (netdig)
Copy page
Download PDF
One-click network diagnosis (netdig)
You can use the netdig command to perform network diagnostics and identify issues with a single click.​
Notes​
  • This command can only be executed on Linux or macOS systems.​
  • These diagnostics rely on multiple built-in command-line tools, including:​
  • dig​
  • ping​
  • traceroute​
  • curl​
  • tcpdump​
Command syntax​
​
./tosutil netdig domain/ipaddress [-aoe] [-ipv6] [-w] [-we=xxx] [-p] [-pss=xxx] [-tr] [-c] [-dp=xxx] [-di=xxx] [-u] [-ucl=xxx]​
​
Parameters​
​
Parameter​
Type​
Description​
domain​
String​
The domain name of the host you want to check. For more information on TOS regions and endpoints, see Regions and endpoints.​
ipaddress​
String​
The IP address of the host you want to check.​
-aoe​
Bool​
Cancel the command if an error occurs during execution.​
-ipv6​
Bool​
Resolve domain names to IPv6 addresses.​
-w​
Bool​
Use the dig command to check the egress IP for DNS lookup.​
-we​
String​
The diagnostic domain used when checking the egress IP for DNS lookup. The default is whoami.byte008.com.​
-p​
Bool​
Use the ping command to test MTU with large and small packets.​
-pss​
String​
The packet sizes used for the ping command, separated by #. The default value is 64#1295#1472.​
-tr​
Bool​
Use the traceroute command to trace routes using UDP or ICMP protocol.​
-c​
Bool​
Use the curl command to test request latency.​
-dp​
String​
Use the tcpdump command to capture network packets generated by the probe command. This parameter's value is passed as an optional parameter to the probe command.​
warning​
The value for this parameter must be enclosed in double quotation marks ("").​
-di​
String​
The network interface used to capture packets with the tcpdump command.​
-u​
Bool​
Package and upload the collected network information to the TOS bucket.​
-ucl​
String​
The bucket and prefix used when packaging and uploading the information collected. The format is tos://bucket/[prefix].​
​
Example​
Use the following command to run network diagnostics, and then package and upload the collected information to the specified bucket. Example:​
  • Command​
​
./tosutil netdig tos-cn-beijing.volces.com -w -p -tr -c -dp "-pt upload -timeout 15" -u -ucl tos://bucket-test​
​
  • Output​
​
Start to exec command [dig whoami.byte008.com]​
​
Start to exec command [ping -c 10 -s 64 tos-cn-beijing.volces.com]​
​
Start to exec command [ping -c 10 -s 1295 tos-cn-beijing.volces.com]​
​
Start to exec command [ping -c 10 -s 1472 tos-cn-beijing.volces.com]​
​
Start to exec command [traceroute -P UDP -n -w 1 tos-cn-beijing.volces.com]​
​
Start to exec command [traceroute -P ICMP -n -w 1 tos-cn-beijing.volces.com]​
​
Start to exec command [curl -o /dev/null -s -w time_namelookup:\t%{time_namelookup}\ntime_connect:\t\t%{time_connect}\ntime_appconnect:\t%{time_appconnect}\ntime_pretransfer:\t%{time_pretransfer}\ntime_starttransfer:\t%{time_starttransfer}\ntime_total:\t\t%{time_total}\ntime_redirect:\t\t%{time_redirect}\n http://tos-cn-beijing.volces.com]​
​
Start to exec command [tcpdump -nn -w 618b7d5a-2bf1-11ef-ade1-b645e116****.pcap (tcp[tcpflags] & (tcp-syn|tcp-fin|tcp-rst) != 0 or tcp[13] & 0x3f = 0x3f) and host tos-cn-beijing.volces.com]​
​
Start to test the uploading speed for region cn-beijing​
​
Average upload rate: 6.73MB/s​
​
Time consuming details​
Resolve dns cost: 24 ms​
Build connection cost: 36 ms​
Tls handshake cost: -1 ms​
Send request cost: 14938 ms​
Wait response cost: -1 ms​
Total cost: 15000 ms​
​
Collect network info finished, start to upload it as key [2024-06-16T15:01:59Z/618b7e18-2bf1-11ef-ade1-b645e116****] in bucket [bucket-test]​
​
[-------------------------------------------------] 100.00% ?/s 99.60MB/? 127ms​
​
Upload network info finished, the uploaded url is:​
http://bucket-test.tos-cn-beijing.volces.com/2024-06-16T15:01:59Z/618b7e18-2bf1-11ef-ade1-b645e116****?X-Tos-Algorithm=TOS4-HMAC-SHA256&X-Tos-Credential=AKLTY2E1ZTExYjgzMjk0NGJkYTgyYTQ3OWE5NjVjYzV****%2F20240616%2Fbeijing%2Ftos%2Frequest&X-Tos-Date=20240616T150410Z&X-Tos-Expires=25200&X-Tos-Signature=6aedd32bec9f224414afeda5f2859d9f8684f493714cb86e0b320a3a5ab****&X-Tos-SignedHeaders=host​
Capture network packet finished, start to upload it as key [2024-06-16T15:01:59Z/618b7d5a-2bf1-11ef-ade1-b645e1163e54.pcap] in bucket [bucket-test]​
​
[--------------------------------------------------] 100.00% ?/s 99.60MB/? 40ms​
​
Upload network packet finished, the uploaded url is:​
http://bucket-test.tos-cn-beijing.volces.com/2024-06-16T15:01:59Z/618b7d5a-2bf1-11ef-ade1-b645e1163e54.pcap?X-Tos-Algorithm=TOS4-HMAC-SHA256&X-Tos-Credential=AKLTY2E1ZTExYjgzMjk0NGJkYTgyYTQ3OWE5NjVjYzViZTQ%2F20240616%2Fbeijing%2****Frequest&X-Tos-Date=20240616T150410Z&X-Tos-Expires=25200&X-Tos-Signature=95601b6fe804552b5256410fa2242062a32c2b850d3822a27485b4665ef7****&X-Tos-SignedHeaders=host​
​
​
Last updated: 2025.12.17 18:33:43