Diagnose network connectivity, upload/download bandwidth, download time, and local symlink anomalies between the local workstation and OSS using ossutil 2.0 integrated with the Alibaba Cloud CLI.
Architecture: Local Workstation + Alibaba Cloud CLI 3.3.3+ + aliyun ossutil + OSS Bucket + Optional target object or presigned URL + Optional probe domain
ScenarioRecommended CommandOutputUpload connectivity probealiyun ... ossutil probe --uploadUpload duration, object name, log fileDownload connectivity probealiyun ... ossutil probe --downloadDownload duration, local file path, log fileUpload bandwidth suggestionaliyun ... ossutil probe --probe-item upload-speedSuggested concurrency valueDownload bandwidth suggestionaliyun ... ossutil probe --probe-item download-speedSuggested concurrency valueDownload time measurementaliyun ... ossutil probe --probe-item download-timeConcurrency/part-size/duration statisticsSymlink anomaly checkaliyun ... ossutil probe --probe-item cycle-symlinkWhether abnormal symlinks exist
Important implementation boundary
probeis a composite client-side diagnostic command provided byaliyun ossutil; there is no equivalentaliyun oss api probe.cycle-symlinkcan only detect abnormal symlinks — it cannot safely auto-fix target paths.- Probe output can locate symptoms and suggest concurrency, but cannot guarantee an automatic precise root cause for all network anomalies.
download-speedrequires a real existing object, and the official recommendation is objects larger than 5 MiB. If no suitable object exists, the user must first confirm an existing object path, or confirm a local file to upload viaaliyun ossutil cpbefore probing.
Pre-check: Aliyun CLI >= 3.3.3 required Run
aliyun versionto verify >= 3.3.3. If not installed or version too low, seereferences/cli-installation-guide.mdfor installation instructions. Then run the credential gatealiyun configure list. Only afterconfigure listshows a valid profile, runaliyun configure set --auto-plugin-install trueandaliyun ossutil version.
Run the version and credential gate first:
bash
aliyun version
aliyun configure list
Only after configure list confirms a valid profile, proceed:
bash
aliyun configure set --auto-plugin-install true
aliyun configure ai-mode enable
aliyun configure ai-mode set-user-agent --user-agent "AlibabaCloud-Agent-Skills/alibabacloud-oss-manage-network-probe"
aliyun ossutil version
aliyun plugin update
AI safety mode:
configure ai-mode enableactivates the CLI's built-in safety guard, which blocks dangerous operations (e.g. deleting critical resources) at the CLI level. This must be enabled before executing any ossutil commands.
[MUST] CLI User-Agent — Every aliyun CLI command invocation must include:
--user-agent AlibabaCloud-Agent-Skills/alibabacloud-oss-manage-network-probe
Environment VariableRequired/OptionalDescriptionDefault ValueALIBABA_CLOUD_PROFILEOptionalSpecify which CLI profile to useCurrent default profileHTTP_PROXYOptionalHTTP proxy address in proxied environmentsNoneHTTPS_PROXYOptionalHTTPS proxy address in proxied environmentsNoneNO_PROXYOptionalProxy bypass listNone
IMPORTANT: Parameter Confirmation — Before executing any command or API call, ALL user-customizable parameters (e.g., RegionId, instance names, CIDR blocks, passwords, domain names, resource specifications, etc.) MUST be confirmed with the user. Do NOT assume or use default values without explicit user approval.
Parameter NameRequired/OptionalDescriptionDefault ValueprofileOptionalCLI profile to useCurrent default profileregion_idOptionalRegion where the bucket is located; use when auto-detection is unreliable or explicit specification is neededNonebucket_nameRequired for bucket-based probesTarget bucket nameNoneobject_nameRequired for download-speed and download-time; optional for other bucket-based probesFull object path, e.g. dir/example.txt; for download-speed, objects larger than 5 MiB are recommended for stable resultsNonelocal_pathOptionalLocal upload file path, symlink scan directory, or download save pathNonedownload_urlRequired for URL-based download probePublic-read URL or signed private URLNoneendpointOptionalUse only when the user explicitly provides it or the error message clearly points to a specific endpointNoneaddrOptionalDomain for --addr network connectivity checkwww.aliyun.com only if user explicitly acceptsupmodeOptionalUpload probe modenormal``runtimeOptionalMax runtime in seconds for upload-speed / download-speedCLI defaultparallelOptionalSingle-file concurrency for download-time``1``part_sizeOptionalPart size in bytes for download-timeCLI auto/default
Pre-check: Alibaba Cloud Credentials Required
Security Rules:
- NEVER read, echo, or print AK/SK values (e.g.,
echo $ALIBABA_CLOUD_ACCESS_KEY_IDis FORBIDDEN)- NEVER ask the user to input AK/SK directly in the conversation or command line
- NEVER use
aliyun configure setwith literal credential values- NEVER read credential files such as
~/.aliyun/config.json, or dump environment variables to inspect credentials- NEVER write a full presigned URL with query-string signature parameters into logs or final output; if you must mention it, redact everything after
?- ONLY use
aliyun configure listto check credential statusbash
aliyun configure listCheck the output for a valid profile (AK, STS, or OAuth identity).
If no valid profile exists, STOP here.
- Obtain credentials from Alibaba Cloud Console
- Configure credentials outside of this session (via
aliyun configurein terminal or environment variables in shell profile)- Return and re-run after
aliyun configure listshows a valid profile
If multiple profiles exist, explicitly add --profile <profile> in subsequent commands, placed after aliyun and before ossutil, e.g. aliyun --profile <profile> ossutil version.
The minimum OSS permissions required by this skill depend on the probe mode. Refer to references/ram-polices.md for per-scenario permission tables and policy examples.
oss:GetObject, oss:PutObject, oss:DeleteObjectoss:GetObjectaliyun ossutil cp to pre-upload a test object: requires oss:PutObjectaliyun ossutil rm to clean up an explicitly specified test object: requires oss:DeleteObjectExecute in the following order — do not skip steps:
bash
aliyun version
bash
aliyun configure list
configure list does not show a valid profile, or reports a missing config file, STOP immediately.
configure set --auto-plugin-install trueossutil versionossutil:bash
aliyun configure set --auto-plugin-install true
aliyun configure ai-mode enable
aliyun configure ai-mode set-user-agent --user-agent "AlibabaCloud-Agent-Skills/alibabacloud-oss-manage-network-probe"
aliyun ossutil version
probe_download_time.log). Do not use $(date ...), $(...), or backtick shell command substitutions in filenames, because different execution environments have inconsistent shell interpolation support, which can easily cause syntax errors.$() command substitution entirely. When you need to capture command output into a variable (e.g. for presigned URLs), use the file+script pattern: redirect output to a temporary file, then create a shell script that reads the file and uses the value. See §B for a concrete example.local_path and object_name and let probe use a temporary file that is auto-cleaned after completion.local_path.AccessDenied, quote the error as-is and explain that at least oss:GetObject, oss:PutObject, oss:DeleteObject are required; do not enumerate buckets, regions, or fall back to legacy command forms.bash
aliyun ossutil probe \
--upload "<LOCAL_PATH_IF_ANY>" \
--bucket "<BUCKET_NAME>" \
--object "<OBJECT_NAME_IF_USER_WANTS_TO_KEEP_IT>" \
--addr "<ADDR_IF_CONFIRMED>" \
--upmode "<UPMODE_IF_CONFIRMED>" \
--region "<REGION_ID_IF_NEEDED>" \
--user-agent AlibabaCloud-Agent-Skills/alibabacloud-oss-manage-network-probe
When LOCAL_PATH_IF_ANY is not provided, remove that positional parameter entirely — do not pass an empty string.
probe --download --url.Generate a presigned URL, save it to a temporary file, then run the probe via a shell script. This two-step approach avoids exposing the full URL in command history and works in environments where $() command substitution is blocked.
Step 1 — Generate the presigned URL and redirect output to a temporary file:
bash
aliyun ossutil presign \
"oss://<BUCKET_NAME>/<OBJECT_NAME>" \
--expires-duration 1h \
--region "<REGION_ID_IF_NEEDED>" \
--user-agent AlibabaCloud-Agent-Skills/alibabacloud-oss-manage-network-probe > /tmp/_presign_url.txt
Step 2 — Create a probe script that reads the URL from the file and runs the download probe:
bash
cat > /tmp/_run_presign_probe.sh << 'PROBE_SCRIPT'
#!/bin/bash
PRESIGN_URL=$(cat /tmp/_presign_url.txt)
aliyun ossutil probe \
--download \
--url "$PRESIGN_URL" \
"<LOCAL_PATH_IF_USER_WANTS_TO_RENAME>" \
--user-agent AlibabaCloud-Agent-Skills/alibabacloud-oss-manage-network-probe
PROBE_SCRIPT
bash /tmp/_run_presign_probe.sh
Important — you MUST use
probe --download --urlwith the presigned URL:
- Never copy-paste the full presigned URL directly into the
--urlparameter — use the file+script pattern above so the URL is never exposed in command history or execution logs.- If
/tmp/is not writable, use the current workspace directory for the temporary file and script instead.
--url only accepts HTTP/HTTPS URLs — it cannot take oss://bucket/object.
ossutil presign only means the signed URL was generated; it does not guarantee the bucket or object exists, nor that the subsequent download will succeed.?.probe --download --url returns 404/403, quote the raw HTTP error first; if the bucket/object was already confirmed input, you may do one ossutil stat validation with the same bucket + object + region. Do not try to "guess" the root cause by listing buckets, trying random regions, or reading local credential files.object_name, the command will download that object directly.object_name, probe will create a temporary object, download it, and delete the temporary object after completion.bash
aliyun ossutil probe \
--download \
--bucket "<BUCKET_NAME>" \
--object "<OBJECT_NAME_IF_ANY>" \
--addr "<ADDR_IF_CONFIRMED>" \
"<LOCAL_PATH_IF_USER_WANTS_TO_RENAME>" \
--region "<REGION_ID_IF_NEEDED>" \
--user-agent AlibabaCloud-Agent-Skills/alibabacloud-oss-manage-network-probe
NoSuchBucket, NoSuchKey, or other object-level errors, prefer running ossutil stat "oss://<BUCKET_NAME>/<OBJECT_NAME>" --region "<REGION_ID_IF_NEEDED>" for same-target validation.aliyun oss api / GetBucketLocation or other commands outside this skill's scope to confirm whether the object exists.This mode only checks local directory/file paths — it does not access OSS.
bash
aliyun ossutil probe \
--probe-item cycle-symlink \
"<LOCAL_DIRECTORY_OR_FILE>" \
--user-agent AlibabaCloud-Agent-Skills/alibabacloud-oss-manage-network-probe
If the command returns stat <path>: no such file or directory, explicitly state that the local path does not exist in the current execution environment; this is still a local-only flow with no OSS access.
When the local path does not exist, you must NEVER:
ls and then give upCorrect approach: Quote the raw error stat <path>: no such file or directory, explicitly tell the user the path does not exist in the current environment, and ask whether they provided the correct path. Unless the user proactively states the current session is not on the target machine, do not make that judgment for them.
When reporting results of this probe, include at minimum:
loop-b -> loop-a, and resolving loop-a reports too many levels of symbolic linkstoo many levels of symbolic linksIf you need to clarify the abnormal link chain, you may perform read-only local forensics on the same path (e.g. readlink, stat -f "%N -> %Y"). Only write precise chains when these supplementary results are actually readable; if the supplementary forensics itself fails, report only verified segments — do not fabricate a complete cycle.
If the output lists abnormal symlinks, the user or a local script must fix them according to business semantics; this skill does not auto-rewrite symlink targets.
Basic command:
bash
aliyun ossutil probe \
--probe-item upload-speed \
--bucket "<BUCKET_NAME>" \
--region "<REGION_ID_IF_NEEDED>" \
--user-agent AlibabaCloud-Agent-Skills/alibabacloud-oss-manage-network-probe
To limit runtime, add:
bash
aliyun ossutil probe \
--probe-item upload-speed \
--bucket "<BUCKET_NAME>" \
--runtime "<RUNTIME_IF_CONFIRMED>" \
--region "<REGION_ID_IF_NEEDED>" \
--user-agent AlibabaCloud-Agent-Skills/alibabacloud-oss-manage-network-probe
Successful output will contain suggest parallel is <N>.
object_name is required.aliyun ossutil cp.Optional preparation step:
bash
aliyun ossutil cp \
"<LOCAL_FILE_TO_UPLOAD>" \
"oss://<BUCKET_NAME>/<OBJECT_NAME>" \
--region "<REGION_ID_IF_NEEDED>" \
--user-agent AlibabaCloud-Agent-Skills/alibabacloud-oss-manage-network-probe
Run download bandwidth probe:
bash
aliyun ossutil probe \
--probe-item download-speed \
--bucket "<BUCKET_NAME>" \
--object "<OBJECT_NAME>" \
--runtime "<RUNTIME_IF_CONFIRMED>" \
--region "<REGION_ID_IF_NEEDED>" \
--user-agent AlibabaCloud-Agent-Skills/alibabacloud-oss-manage-network-probe
Basic command:
bash
aliyun ossutil probe \
--probe-item download-time \
--bucket "<BUCKET_NAME>" \
--object "<OBJECT_NAME>" \
--region "<REGION_ID_IF_NEEDED>" \
--user-agent AlibabaCloud-Agent-Skills/alibabacloud-oss-manage-network-probe
To explicitly control concurrency and part size, add:
bash
aliyun ossutil probe \
--probe-item download-time \
--bucket "<BUCKET_NAME>" \
--object "<OBJECT_NAME>" \
--parallel "<PARALLEL_IF_CONFIRMED>" \
--part-size "<PART_SIZE_IF_CONFIRMED>" \
--region "<REGION_ID_IF_NEEDED>" \
--user-agent AlibabaCloud-Agent-Skills/alibabacloud-oss-manage-network-probe
--parallel and --part-size are only meaningful in the download-time scenario; do not misuse them with upload-speed.
upload file:success or download file:successparallel:<N> statistics and suggest parallel is <N>total bytes, cost, avg speedlogOssProbe*.log local log file; after probe execution, you must check whether logOssProbe*.log was generated in the current directory and report the log path in the final answerThe bucket you are attempting to access must be addressed using the specified endpoint, this only means the current access endpoint does not match the bucket's requirements; stop immediately, ask the user to confirm the correct region/endpoint — do not infer or try other region/endpoints on your ownSee references/verification-method.md for more detailed verification steps.
Follow the steps in references/verification-method.md to confirm each item:
ls logOssProbe*.log to check whether log files were generated locally, and report the log path in the final answer; if no log files were generated, it means the probe may not have reached the actual probing stage--object will auto-clean temporary objectsdownload-speed preparation step, decide whether to delete it based on user confirmation after probingDelete an OSS test object:
bash
aliyun ossutil rm \
"oss://<BUCKET_NAME>/<OBJECT_NAME>" \
--user-agent AlibabaCloud-Agent-Skills/alibabacloud-oss-manage-network-probe
If a temporary test file was downloaded locally, it should also be deleted or retained based on user confirmation.
After all probe and cleanup steps are finished, disable AI safety mode:
bash
aliyun configure ai-mode disable
For all commands, underlying OSS capability mappings, and which steps are local client-side logic only, see references/related-apis.md.
aliyun ossutil probe — do not fabricate non-existent commands like aliyun oss api probebucket_name, object_name, download_url, local_pathdownload-speed, choose a real object larger than 5 MiB for more stable results--addr, --region, --endpointsuggest parallel is <N> as an empirical baseline, then do small-scale validation combined with actual business concurrencycycle-symlink, only diagnose — do not auto-fixossutil stat) — do not expand into listing buckets, guessing regions, trying unsupported flags, or reading local credential filesReferencePurposereferences/cli-installation-guide.mdInstalling and upgrading Aliyun CLIreferences/verification-method.mdChecking success by probe modereferences/related-apis.mdCommand to underlying OSS capability/permission mappingreferences/ram-polices.mdRAM permission checklist and policy examplesreferences/acceptance-criteria.mdSkill acceptance criteria and counter-examplesreferences/implementation-boundaries.mdBoundaries that cannot be fully automated via CLI or code