alibabacloud-oss-manage-network-probe
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDetailed description of the scenario's application and purpose.
场景应用与用途详细说明
Diagnose network connectivity, upload/download bandwidth, download time, and local symlink anomalies between the local workstation and OSS using integrated with the Alibaba Cloud CLI.
ossutil 2.0Architecture: Local Workstation + Alibaba Cloud CLI 3.3.3+ + + OSS Bucket + Optional target object or presigned URL + Optional probe domain
aliyun ossutil| Scenario | Recommended Command | Output |
|---|---|---|
| Upload connectivity probe | | Upload duration, object name, log file |
| Download connectivity probe | | Download duration, local file path, log file |
| Upload bandwidth suggestion | | Suggested concurrency value |
| Download bandwidth suggestion | | Suggested concurrency value |
| Download time measurement | | Concurrency/part-size/duration statistics |
| Symlink anomaly check | | Whether abnormal symlinks exist |
Important implementation boundary
is a composite client-side diagnostic command provided byprobe; there is no equivalentaliyun ossutil.aliyun oss api probe can only detect abnormal symlinks — it cannot safely auto-fix target paths.cycle-symlink- Probe output can locate symptoms and suggest concurrency, but cannot guarantee an automatic precise root cause for all network anomalies.
requires 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 viadownload-speedbefore probing.aliyun ossutil cp
使用集成在阿里云CLI中的诊断本地工作站与OSS之间的网络连通性、上传/下载带宽、下载时间以及本地软链接异常。
ossutil 2.0架构:本地工作站 + 阿里云CLI 3.3.3+ + + OSS Bucket + 可选目标对象或预签名URL + 可选探测域名
aliyun ossutil| 场景 | 推荐命令 | 输出 |
|---|---|---|
| 上传连通性探测 | | 上传时长、对象名称、日志文件 |
| 下载连通性探测 | | 下载时长、本地文件路径、日志文件 |
| 上传带宽建议 | | 推荐并发值 |
| 下载带宽建议 | | 推荐并发值 |
| 下载时长测算 | | 并发/分片大小/时长统计数据 |
| 软链接异常检查 | | 是否存在异常软链接 |
重要使用边界
是probe提供的复合客户端诊断命令,不存在对应的aliyun ossutil接口。aliyun oss api probe 仅能检测异常软链接,无法安全自动修复目标路径。cycle-symlink- 探测输出可定位问题现象并给出并发建议,但无法保证自动精准定位所有网络异常的根因。
需要真实存在的对象,官方建议使用5 MiB以上的对象。如果没有合适的对象,用户必须先确认现有对象路径,或者先通过download-speed上传本地文件后再进行探测。aliyun ossutil cp
Installation
安装
Pre-check: Aliyun CLI >= 3.3.3 required Runto verify >= 3.3.3. If not installed or version too low, seealiyun versionfor installation instructions. Then run the credential gatereferences/cli-installation-guide.md. Only afteraliyun configure listshows a valid profile, runconfigure listandaliyun configure set --auto-plugin-install true.aliyun ossutil version
Run the version and credential gate first:
bash
aliyun version
aliyun configure listOnly after confirms a valid profile, proceed:
configure listbash
aliyun configure set --auto-plugin-install true
aliyun configure ai-mode enable
aliyun ossutil versionAI safety mode:activates 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.configure ai-mode enable
前置检查:需要阿里云CLI版本 >= 3.3.3 执行确认版本不低于3.3.3。如果未安装或版本过低,参考aliyun version的安装说明操作。 然后执行凭证校验命令references/cli-installation-guide.md。 仅当aliyun configure list显示有效配置文件后,再执行configure list和aliyun configure set --auto-plugin-install true。aliyun ossutil version
先执行版本和凭证校验命令:
bash
aliyun version
aliyun configure list仅当确认存在有效配置文件后,再继续执行:
configure listbash
aliyun configure set --auto-plugin-install true
aliyun configure ai-mode enable
aliyun ossutil versionAI安全模式:会激活CLI内置的安全防护机制,在CLI层面拦截危险操作(例如删除关键资源)。执行任何ossutil命令前必须先启用该模式。configure ai-mode enable
Environment Variables
环境变量
| Environment Variable | Required/Optional | Description | Default Value |
|---|---|---|---|
| Optional | Specify which CLI profile to use | Current default profile |
| Optional | HTTP proxy address in proxied environments | None |
| Optional | HTTPS proxy address in proxied environments | None |
| Optional | Proxy bypass list | None |
| 环境变量 | 必填/可选 | 说明 | 默认值 |
|---|---|---|---|
| 可选 | 指定使用的CLI配置文件 | 当前默认配置文件 |
| 可选 | 代理环境下的HTTP代理地址 | 无 |
| 可选 | 代理环境下的HTTPS代理地址 | 无 |
| 可选 | 代理绕过列表 | 无 |
Parameter Confirmation
参数确认
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 Name | Required/Optional | Description | Default Value |
|---|---|---|---|
| Optional | CLI profile to use | Current default profile |
| Optional | Region where the bucket is located; use when auto-detection is unreliable or explicit specification is needed | None |
| Required for bucket-based probes | Target bucket name | None |
| Required for | Full object path, e.g. | None |
| Optional | Local upload file path, symlink scan directory, or download save path | None |
| Required for URL-based download probe | Public-read URL or signed private URL | None |
| Optional | Use only when the user explicitly provides it or the error message clearly points to a specific endpoint | None |
| Optional | Domain for | |
| Optional | Upload probe mode | |
| Optional | Max runtime in seconds for | CLI default |
| Optional | Single-file concurrency for | |
| Optional | Part size in bytes for | CLI auto/default |
重要提示:参数确认 — 执行任何命令或API调用前,所有用户可自定义参数(例如RegionId、实例名称、CIDR块、密码、域名、资源规格等)必须与用户确认。未经用户明确许可,不得假设或使用默认值。
| 参数名称 | 必填/可选 | 说明 | 默认值 |
|---|---|---|---|
| 可选 | 使用的CLI配置文件 | 当前默认配置文件 |
| 可选 | Bucket所在的地域,自动检测不可靠或需要明确指定时使用 | 无 |
| 基于Bucket的探测必填 | 目标Bucket名称 | 无 |
| | 对象完整路径,例如 | 无 |
| 可选 | 本地上传文件路径、软链接扫描目录或下载保存路径 | 无 |
| 基于URL的下载探测必填 | 公共读URL或签名后的私有URL | 无 |
| 可选 | 仅当用户明确提供或错误信息明确指向特定endpoint时使用 | 无 |
| 可选 | | 仅当用户明确同意时使用 |
| 可选 | 上传探测模式 | |
| 可选 | | CLI默认值 |
| 可选 | | |
| 可选 | | CLI自动/默认值 |
Authentication
身份认证
Pre-check: Alibaba Cloud Credentials RequiredSecurity Rules:
- NEVER read, echo, or print AK/SK values (e.g.,
is FORBIDDEN)echo $ALIBABA_CLOUD_ACCESS_KEY_ID- NEVER ask the user to input AK/SK directly in the conversation or command line
- NEVER use
with literal credential valuesaliyun configure set- NEVER read credential files such as
, or dump environment variables to inspect credentials~/.aliyun/config.json- 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
to check credential statusaliyun configure listbashaliyun 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
in terminal or environment variables in shell profile)aliyun configure- Return and re-run after
shows a valid profilealiyun configure list
If multiple profiles exist, explicitly add in subsequent commands, placed after and before , e.g. .
--profile <profile>aliyunossutilaliyun --profile <profile> ossutil version前置检查:需要阿里云凭证安全规则:
- 严禁读取、回显或打印AK/SK值(例如禁止执行
)echo $ALIBABA_CLOUD_ACCESS_KEY_ID- 严禁要求用户在对话或命令行中直接输入AK/SK
- 严禁使用字面量凭证值执行
命令aliyun configure set- 严禁读取
等凭证文件,或导出环境变量查看凭证~/.aliyun/config.json- 严禁将带有查询字符串签名参数的完整预签名URL写入日志或最终输出;如果必须提及,隐藏
之后的所有内容?- 仅可使用
检查凭证状态aliyun configure listbashaliyun configure list检查输出中是否存在有效配置文件(AK、STS或OAuth身份)。如果不存在有效配置文件,立即停止操作。
- 从阿里云控制台获取凭证
- 在当前会话之外配置凭证(通过终端执行
或在shell配置文件中设置环境变量)aliyun configure- 待
显示有效配置文件后,返回重新执行aliyun configure list
如果存在多个配置文件,在后续命令中显式添加参数,放在之后、之前,例如。
--profile <profile>aliyunossutilaliyun --profile <profile> ossutil versionRAM Policy
RAM权限策略
The minimum OSS permissions required by this skill depend on the probe mode. Refer to for per-scenario permission tables and policy examples.
references/ram-polices.md- Upload probes, upload bandwidth probes, temporary object probes: require at least ,
oss:GetObject,oss:PutObjectoss:DeleteObject - Download probes, download bandwidth probes, download time probes: require at least
oss:GetObject - If using to pre-upload a test object: requires
aliyun ossutil cposs:PutObject - If using to clean up an explicitly specified test object: requires
aliyun ossutil rmoss:DeleteObject
本技能所需的最低OSS权限取决于探测模式。各场景的权限表和策略示例参考。
references/ram-polices.md- 上传探测、上传带宽探测、临时对象探测:至少需要、
oss:GetObject、oss:PutObject权限oss:DeleteObject - 下载探测、下载带宽探测、下载时长探测:至少需要权限
oss:GetObject - 如果使用预上传测试对象:需要
aliyun ossutil cp权限oss:PutObject - 如果使用清理明确指定的测试对象:需要
aliyun ossutil rm权限oss:DeleteObject
Core Workflow
核心工作流
1. Validate the CLI environment
1. 校验CLI环境
Execute in the following order — do not skip steps:
- Check CLI version first:
bash
aliyun version- Then check credentials/profile:
bash
aliyun configure list- If does not show a valid profile, or reports a missing config file, STOP immediately.
configure list- Do NOT proceed with
configure set --auto-plugin-install true - Do NOT proceed with
ossutil version - Do NOT fabricate bucket, object, profile, region, or probe success results
- Do NOT proceed with
- Only after the profile is valid, proceed to prepare the plugin, enable AI safety mode, and verify :
ossutil
bash
aliyun configure set --auto-plugin-install true
aliyun configure ai-mode enable
aliyun ossutil version按以下顺序执行,不得跳过步骤:
- 首先检查CLI版本:
bash
aliyun version- 然后检查凭证/配置文件:
bash
aliyun configure list- 如果未显示有效配置文件,或提示配置文件缺失,立即停止操作。
configure list- 不得继续执行
configure set --auto-plugin-install true - 不得继续执行
ossutil version - 不得伪造Bucket、对象、配置文件、地域或探测成功结果
- 不得继续执行
- 仅当配置文件有效后,再继续准备插件、启用AI安全模式并校验:
ossutil
bash
aliyun configure set --auto-plugin-install true
aliyun configure ai-mode enable
aliyun ossutil version1.1 Log file naming and command substitution
1.1 日志文件命名和命令替换
- When saving execution logs, use static strings for filenames (e.g. ). Do not use
probe_download_time.log,$(date ...), or backtick shell command substitutions in filenames, because different execution environments have inconsistent shell interpolation support, which can easily cause syntax errors.$(...) - Some execution environments block 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.
$()
- 保存执行日志时,文件名使用静态字符串(例如)。文件名中不得使用
probe_download_time.log、$(date ...)或反引号shell命令替换,因为不同执行环境的shell插值支持不一致,容易引发语法错误。$(...) - 部分执行环境完全禁止命令替换。当需要将命令输出捕获到变量中(例如预签名URL场景),使用文件+脚本模式:将输出重定向到临时文件,然后创建读取该文件并使用值的shell脚本。具体示例参考§B。
$()
2. Choose the probe mode
2. 选择探测模式
A. Upload connectivity probe
A. 上传连通性探测
- If the user only wants network/upload connectivity diagnostics without keeping the object, omit and
local_pathand letobject_nameuse a temporary file that is auto-cleaned after completion.probe - If the user wants to verify a specific real file's upload path, confirm .
local_path - If the upload probe returns , quote the error as-is and explain that at least
AccessDenied,oss:GetObject,oss:PutObjectare required; do not enumerate buckets, regions, or fall back to legacy command forms.oss:DeleteObject
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-SkillsWhen is not provided, remove that positional parameter entirely — do not pass an empty string.
LOCAL_PATH_IF_ANY- 如果用户仅需要网络/上传连通性诊断,不需要保留对象,可省略和
local_path,让object_name使用执行完成后自动清理的临时文件。probe - 如果用户需要验证特定真实文件的上传路径,确认参数。
local_path - 如果上传探测返回,原封不动引用错误信息,并说明至少需要
AccessDenied、oss:GetObject、oss:PutObject权限;不要枚举Bucket、地域,或回退到旧版本命令格式。oss:DeleteObject
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如果未提供,直接移除该位置参数,不要传入空字符串。
LOCAL_PATH_IF_ANYB. Download probe via URL
B. 基于URL的下载探测
- Public-read objects: have the user confirm a directly accessible URL.
- Private objects: generate a presigned URL first, then run .
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 > /tmp/_presign_url.txtStep 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
PROBE_SCRIPT
bash /tmp/_run_presign_probe.shImportant — you MUST usewith the presigned URL:probe --download --url
- Never copy-paste the full presigned URL directly into the
parameter — use the file+script pattern above so the URL is never exposed in command history or execution logs.--url- If
is not writable, use the current workspace directory for the temporary file and script instead./tmp/
--urloss://bucket/object- A successful only means the signed URL was generated; it does not guarantee the bucket or object exists, nor that the subsequent download will succeed.
ossutil presign - If you need to log the execution, do not persist the full presigned URL; at most keep the object address without the query string, or redact all signature parameters after .
? - If returns 404/403, quote the raw HTTP error first; if the bucket/object was already confirmed input, you may do one
probe --download --urlvalidation with the sameossutil stat. Do not try to "guess" the root cause by listing buckets, trying random regions, or reading local credential files.bucket + object + region
- 公共读对象:让用户确认可直接访问的URL。
- 私有对象:首先生成预签名URL,然后执行。
probe --download --url
生成预签名URL,保存到临时文件,然后通过shell脚本执行探测。这种两步式方案可避免完整URL暴露在命令历史中,同时适用于禁止命令替换的环境。
$()步骤1 — 生成预签名URL并将输出重定向到临时文件:
bash
aliyun ossutil presign \
"oss://<BUCKET_NAME>/<OBJECT_NAME>" \
--expires-duration 1h \
--region "<REGION_ID_IF_NEEDED>" \
--user-agent AlibabaCloud-Agent-Skills > /tmp/_presign_url.txt步骤2 — 创建探测脚本,从文件中读取URL并执行下载探测:
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
PROBE_SCRIPT
bash /tmp/_run_presign_probe.sh重要提示 — 必须将预签名URL配合使用:probe --download --url
- 严禁直接将完整预签名URL复制粘贴到
参数中 — 使用上述的文件+脚本模式,避免URL暴露在命令历史或执行日志中。--url- 如果
不可写,改用当前工作目录存放临时文件和脚本。/tmp/
--urloss://bucket/object- 执行成功仅表示签名URL生成成功,不保证Bucket或对象存在,也不保证后续下载会成功。
ossutil presign - 如果需要记录执行日志,不要持久化完整预签名URL;最多保留不带查询字符串的对象地址,或隐藏之后的所有签名参数。
? - 如果返回404/403,首先引用原始HTTP错误;如果已经确认过Bucket/对象输入,可以使用相同的
probe --download --url执行一次Bucket + 对象 + 地域校验。不要通过列出Bucket、尝试随机地域、读取本地凭证文件的方式来“猜测”根因。ossutil stat
C. Download probe via Bucket/Object
C. 基于Bucket/对象的下载探测
- If the user confirmed , the command will download that object directly.
object_name - If the user does not provide ,
object_namewill create a temporary object, download it, and delete the temporary object after completion.probe
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- If the command reports ,
NoSuchBucket, or other object-level errors, prefer runningNoSuchKeyfor same-target validation.ossutil stat "oss://<BUCKET_NAME>/<OBJECT_NAME>" --region "<REGION_ID_IF_NEEDED>" - Do not list all buckets, try unconfirmed regions, or switch to /
aliyun oss apior other commands outside this skill's scope to confirm whether the object exists.GetBucketLocation
- 如果用户确认了,命令会直接下载该对象。
object_name - 如果用户未提供,
object_name会创建临时对象,下载完成后自动删除临时对象。probe
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- 如果命令返回、
NoSuchBucket或其他对象级错误,优先执行NoSuchKey进行同目标校验。ossutil stat "oss://<BUCKET_NAME>/<OBJECT_NAME>" --region "<REGION_ID_IF_NEEDED>" - 不要列出所有Bucket、尝试未确认的地域,或切换到/
aliyun oss api等超出本技能范围的命令来确认对象是否存在。GetBucketLocation
D. Local symlink anomaly probe
D. 本地软链接异常探测
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-
If the command returns, 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.
stat <path>: no such file or directory -
When the local path does not exist, you must NEVER:
- Interpret it as "this is a containerized/sandbox environment limitation"
- Automatically rewrite it as "the user should run on another machine/production environment"
- Generate a script file saying "run this command in the correct environment"
- Check the parent directory with and then give up
ls
Correct approach: Quote the raw error, 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.stat <path>: no such file or directory
When reporting results of this probe, include at minimum:
- This is a local-only flow — no OSS access occurred
- Which symlinks are abnormal and which link chains were directly verified; if only partial chains can be verified, clearly distinguish "confirmed chain segments" from "anomaly points proven by probe errors", e.g. , and resolving
loop-b -> loop-areportsloop-atoo many levels of symbolic links - If the probe output contains raw errors, quote at least one key error, e.g.
too many levels of symbolic links - Minimum fix prerequisites, e.g. break one of the cyclic links or re-point the abnormal link to a real target before retrying
If you need to clarify the abnormal link chain, you may perform read-only local forensics on the same path (e.g. , ). 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.
readlinkstat -f "%N -> %Y"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.
该模式仅检查本地目录/文件路径 — 不会访问OSS。
bash
aliyun ossutil probe \
--probe-item cycle-symlink \
"<LOCAL_DIRECTORY_OR_FILE>" \
--user-agent AlibabaCloud-Agent-Skills-
如果命令返回,明确说明当前执行环境中不存在该本地路径;该流程仍为纯本地流程,未访问OSS。
stat <path>: no such file or directory -
当本地路径不存在时,严禁执行以下操作:
- 将其解释为“这是容器化/沙箱环境的限制”
- 自动改写为“用户应该在其他机器/生产环境运行”
- 生成脚本文件提示“在正确环境中运行该命令”
- 用检查父目录后直接放弃
ls
正确处理方式:引用原始错误,明确告知用户当前环境中不存在该路径,询问用户是否提供了正确路径。除非用户主动说明当前会话不在目标机器上,不要替用户做出该判断。stat <path>: no such file or directory
上报该探测结果时,至少包含以下内容:
- 该流程为纯本地流程 — 未发生OSS访问
- 哪些软链接存在异常,以及哪些链接链是直接验证过的;如果仅能验证部分链,明确区分“已确认的链段”和“探测错误证明的异常点”,例如,解析
loop-b -> loop-a时返回loop-atoo many levels of symbolic links - 如果探测输出包含原始错误,至少引用一个关键错误,例如
too many levels of symbolic links - 最低修复前提,例如断开其中一个循环链接,或将异常链接重新指向真实目标后重试
如果需要明确异常链接链,可以对同一路径执行只读本地排查(例如、)。仅当这些补充结果实际可读取时,才写入精确的链接链;如果补充排查本身失败,仅上报已验证的链段 — 不要伪造完整循环。
readlinkstat -f "%N -> %Y"如果输出列出了异常软链接,必须由用户或本地脚本根据业务语义修复;本技能不会自动重写软链接目标。
E. Upload bandwidth probe with suggested concurrency
E. 上传带宽探测(带推荐并发值)
Basic command:
bash
aliyun ossutil probe \
--probe-item upload-speed \
--bucket "<BUCKET_NAME>" \
--region "<REGION_ID_IF_NEEDED>" \
--user-agent AlibabaCloud-Agent-SkillsTo 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-SkillsSuccessful output will contain .
suggest parallel is <N>基础命令:
bash
aliyun ossutil probe \
--probe-item upload-speed \
--bucket "<BUCKET_NAME>" \
--region "<REGION_ID_IF_NEEDED>" \
--user-agent AlibabaCloud-Agent-Skills如需限制运行时长,添加对应参数:
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执行成功的输出会包含。
suggest parallel is <N>F. Download bandwidth probe with suggested concurrency
F. 下载带宽探测(带推荐并发值)
- is required.
object_name - Official recommendation: target object should be larger than 5 MiB.
- If the user has no suitable object, first confirm a local file path, then upload a cleanable test object via .
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-SkillsRun 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- 为必填参数。
object_name - 官方建议:目标对象应大于5 MiB。
- 如果用户没有合适的对象,首先确认本地文件路径,然后通过上传可清理的测试对象。
aliyun ossutil cp
可选准备步骤:
bash
aliyun ossutil cp \
"<LOCAL_FILE_TO_UPLOAD>" \
"oss://<BUCKET_NAME>/<OBJECT_NAME>" \
--region "<REGION_ID_IF_NEEDED>" \
--user-agent AlibabaCloud-Agent-Skills执行下载带宽探测:
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-SkillsG. Download time probe
G. 下载时长探测
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-SkillsTo 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--parallel--part-sizedownload-timeupload-speed基础命令:
bash
aliyun ossutil probe \
--probe-item download-time \
--bucket "<BUCKET_NAME>" \
--object "<OBJECT_NAME>" \
--region "<REGION_ID_IF_NEEDED>" \
--user-agent AlibabaCloud-Agent-Skills如需显式控制并发数和分片大小,添加对应参数:
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--parallel--part-sizedownload-timeupload-speed3. Interpret the output
3. 解读输出
- When upload/download probes succeed, the output will contain or
upload file:successdownload file:success - When bandwidth probes succeed, the output will contain multiple statistics and
parallel:<N>suggest parallel is <N> - When download time probes succeed, the output will contain ,
total bytes,costavg speed - All probe modes typically generate a local log file; after probe execution, you must check whether
logOssProbe*.logwas generated in the current directory and report the log path in the final answerlogOssProbe*.log - If a real command returns an error or has no success marker, the final conclusion must explicitly state failure/blocked and quote the raw error message — do not write "task completed successfully" or describe a failure as successful verification
- When a command fails, the final answer must explicitly state the termination reason (e.g. "stopped due to AccessDenied", "stopped due to path not found") — do not end silently
- For errors like , 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 own
The bucket you are attempting to access must be addressed using the specified endpoint
See for more detailed verification steps.
references/verification-method.md- 上传/下载探测成功时,输出会包含或
upload file:successdownload file:success - 带宽探测成功时,输出会包含多个统计数据和
parallel:<N>suggest parallel is <N> - 下载时长探测成功时,输出会包含、
total bytes、costavg speed - 所有探测模式通常会生成本地日志文件;探测执行完成后,必须检查当前目录是否生成了
logOssProbe*.log,并在最终结果中上报日志路径logOssProbe*.log - 如果真实命令返回错误或没有成功标记,最终结论必须明确说明失败/受阻,并引用原始错误信息 — 不要写“任务执行成功”,或将失败描述为成功验证
- 命令失败时,最终结果必须明确说明终止原因(例如“因AccessDenied终止”、“因路径不存在终止”) — 不要无声结束
- 对于这类错误,仅表示当前访问endpoint与Bucket要求不匹配;立即停止操作,要求用户确认正确的地域/endpoint — 不要自行推断或尝试其他地域/endpoint
The bucket you are attempting to access must be addressed using the specified endpoint
更详细的校验步骤参考。
references/verification-method.mdSuccess Verification Method
成功校验方法
Follow the steps in to confirm each item:
references/verification-method.md- CLI version and profile are valid
- Probe output contains success markers or suggested concurrency
- You must run 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
ls logOssProbe*.log - If an explicit test object was used, confirm whether it should be retained or enter the cleanup step
- If any of the above steps fail, the final answer must explicitly state failure and quote the raw error with termination reason
按照中的步骤确认每个项:
references/verification-method.md- CLI版本和配置文件有效
- 探测输出包含成功标记或推荐并发值
- 必须执行检查本地是否生成了日志文件,并在最终结果中上报日志路径;如果未生成日志文件,说明探测可能未进入实际探测阶段
ls logOssProbe*.log - 如果使用了显式测试对象,确认是否需要保留或进入清理步骤
- 以上任意步骤失败时,最终结果必须明确说明失败,并引用原始错误和终止原因
Cleanup
清理
- Upload/download connectivity probes without an explicit will auto-clean temporary objects
--object - If you explicitly uploaded a test object in the preparation step, decide whether to delete it based on user confirmation after probing
download-speed
Delete an OSS test object:
bash
aliyun ossutil rm \
"oss://<BUCKET_NAME>/<OBJECT_NAME>" \
--user-agent AlibabaCloud-Agent-SkillsIf 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- 未显式指定的上传/下载连通性探测会自动清理临时对象
--object - 如果在准备步骤中显式上传了测试对象,探测完成后根据用户确认决定是否删除
download-speed
删除OSS测试对象:
bash
aliyun ossutil rm \
"oss://<BUCKET_NAME>/<OBJECT_NAME>" \
--user-agent AlibabaCloud-Agent-Skills如果本地下载了临时测试文件,也应根据用户确认决定删除或保留。
所有探测和清理步骤完成后,禁用AI安全模式:
bash
aliyun configure ai-mode disableAPI and Command Tables
API与命令对照表
For all commands, underlying OSS capability mappings, and which steps are local client-side logic only, see .
references/related-apis.md所有命令、底层OSS能力映射、哪些步骤仅为本地客户端逻辑,参考。
references/related-apis.mdBest Practices
最佳实践
- Always use — do not fabricate non-existent commands like
aliyun ossutil probealiyun oss api probe - Confirm all user-variable parameters before execution, especially ,
bucket_name,object_name,download_urllocal_path - Only retain probe objects when the user explicitly confirms; otherwise prefer temporary objects or explicit cleanup
- For , choose a real object larger than 5 MiB for more stable results
download-speed - In proxy, dedicated line, or custom domain scenarios, explicitly confirm ,
--addr,--region--endpoint - Use as an empirical baseline, then do small-scale validation combined with actual business concurrency
suggest parallel is <N> - For , only diagnose — do not auto-fix
cycle-symlink - After command failure, prefer same-target validation (e.g. ) — do not expand into listing buckets, guessing regions, trying unsupported flags, or reading local credential files
ossutil stat - Do not expose AK/SK, STS tokens, or full presigned URL query strings in logs or final results
- A successful presign, resolvable DNS, or reachable ping/traceroute does not guarantee the object exists or that the probe will succeed; conclusions must be based on actual probe/validation results
- 始终使用— 不要伪造
aliyun ossutil probe这类不存在的命令aliyun oss api probe - 执行前确认所有用户可变参数,尤其是、
bucket_name、object_name、download_urllocal_path - 仅当用户明确确认时保留探测对象,否则优先使用临时对象或显式清理
- 对于场景,选择5 MiB以上的真实对象以获得更稳定的结果
download-speed - 在代理、专线或自定义域名场景下,显式确认、
--addr、--region参数--endpoint - 将作为经验基线,结合实际业务并发做小规模验证
suggest parallel is <N> - 对于场景,仅做诊断 — 不要自动修复
cycle-symlink - 命令失败后,优先做同目标校验(例如) — 不要扩展到列出Bucket、猜测地域、尝试不支持的参数、读取本地凭证文件等操作
ossutil stat - 不要在日志或最终结果中暴露AK/SK、STS令牌或完整预签名URL查询字符串
- 预签名成功、DNS可解析、ping/traceroute可达不代表对象存在或探测会成功;结论必须基于实际探测/校验结果
Reference Links
参考链接
| Reference | Purpose |
|---|---|
| Installing and upgrading Aliyun CLI |
| Checking success by probe mode |
| Command to underlying OSS capability/permission mapping |
| RAM permission checklist and policy examples |
| Skill acceptance criteria and counter-examples |
| Boundaries that cannot be fully automated via CLI or code |
| 参考文件 | 用途 |
|---|---|
| 安装和升级阿里云CLI |
| 按探测模式检查执行结果 |
| 命令与底层OSS能力/权限映射 |
| RAM权限检查清单和策略示例 |
| 技能验收标准和反例 |
| 无法通过CLI或代码完全自动化的边界 |