ossprobe

Last Updated: May 17, 2017

Introduction

The ossprobe is an OSS access detection tool used to troubleshoot problems caused by network errors or incorrect settings of basic parameters during the upload and download processes. If an error occurs after you run a command to upload or download data, the ossprobe displays the possible cause to help you identify the error quickly.

Version

Version: 1.0.0

Key functions

  • Checks whether the network environment is normal
  • Checks whether basic parameters are correct
  • Tests the upload and download speeds

Platforms

  • Linux
  • Windows
  • Mac

Download software

Detect download problems

Usage

  1. ossprobe --download [-i AccessKeyId] [-k AccessKeySecret] [-p EndPoint] [-b BucketName] [-o ObjectName] [-t LocalPath]
  2. [-f Url] [-a Address]
  3. -f --from ObjectUrl
  4. -i --id AccessKeyId
  5. -k --key AccessKeySecret
  6. -p --endpoint EndPoint
  7. -b --bucket BucketName
  8. -o --object ObjectName
  9. -t --to Save path for the downloaded content. By default, it is the path to a temporary file in the current directory.
  10. -a --addr Network address for detection. The default address is www.aliyun.com. If you are using private cloud, select an accessible address in the private cloud.
  11. TIP: If the -f parameter is present, a URL is used for download. If the -f parameter is not present, you must set the AccessKeyID, AccessKeySecret, EndPoint, and BucketName parameters.

Example

To check whether URL-based download is normal (How to obtain a URL), run the following commands:

Method Command
Download from a specified URL ossprobe --download -f Url
Download from a specified URL and save the downloaded content to a specified file ossprobe --download -f Url -t tmp/example.txt
Download from a specified URL and detect the network condition of a specified address ossprobe --download -f Url -a Addr

To check whether download using specified parameters (AccessKeyID, AccessKeySecret, EndPoint, and BucketName) is normal, run the following commands:

Method Command
Download a random file ossprobe --download -i AccessKeyId -k AccessKeySecret -p EndPoint -b BucketName
Download a specified file ossprobe --download -i AccessKeyId -k AccessKeySecret -p EndPoint -b BucketName -o ObjectName
Download a specified file and save the downloaded content to a specified local file ossprobe --download -i AccessKeyId -k AccessKeySecret -p EndPoint -b BucketName -o ObjectName -t tmp/example.txt
Download a random file and detect the network condition of a specified address ossprobe --download -i AccessKeyId -k AccessKeySecret -p EndPoint -b BucketName -a Addr

TIP:

  • The file you downloaded is a binary executable program, and you need to add the ossprobe executable permissions through chmod +x ossprobe in the Linux system.
  • By default, the -t parameter indicates the path to a temporary file in the current directory (the file name format is ossfilestore20160315060101).
  • If the -t parameter indicates a directory, a temporary file is generated in the directory to save data (the file name format is ossfilestore20160315060101).
  • If a file is downloaded from a URL, the file is named after the last string following the forward slash “/“ in the URL. For example, if the URL is http://aliyun.com/a.jpg, then the file is saved as a.jpg.

Detect upload problems

Usage

  1. ossprobe --upload -i AccessKeyId -k AccessKeySecret -p EndPoint -b BucketName [-m normal|append|multipart]
  2. [-s UploadFilePath] [-o ObjectName] [-a Addr]
  3. -i --id AccessKeyID
  4. -k --key AccessKeySecret
  5. -p --endpoint EndPoint
  6. -b --bucket BucketName
  7. -s --src Path to the file you want to upload. By default, it is the path to a local temporary file.
  8. -m --mode File upload mode. The default is normal upload.
  9. -o --object Uploaded object name. By default, the object name is the name of the uploaded file if -s is not null. If -s is null, by default, the object name is the name of the temporary file starting with tem.
  10. -a --addr Network address for detection. The default address is the address of the Alibaba Cloud website. If you are using private cloud, select an accessible address in the private cloud.

Example

Method Command
Generate a temporary file and upload it in normal mode ossprobe --upload -i AccessKeyId -k AccessKeySecret -p EndPoint -b BucketName
Generate a temporary file and upload it in append mode ossprobe --upload -i AccessKeyId -k AccessKeySecret -p EndPoint -b BucketName -o ObjectName -m append
Generate a temporary file and upload it in multipart mode ossprobe --upload -i AccessKeyId -k AccessKeySecret -p EndPoint -b BucketName -o ObjectName -m multipart
Upload specified content in multipart mode ossprobe --upload -i AccessKeyId -k AccessKeySecret -p EndPoint -b BucketName -o ObjectName -m multipart -s src
Upload specified content in multipart mode and specify the object name ossprobe --upload -i AccessKeyId -k AccessKeySecret -p EndPoint -b BucketName -m multipart -s src -o example.txt
Generate a temporary file, upload it in normal mode, and detect the network condition of a specified address ossprobe --upload -i AccessKeyId -k AccessKeySecret -p EndPoint -b BucketName -a Addr

TIP: The name of a randomly generated file starts with ossuploadtmp.

Platform differences

  • Windows
    Press Win+R to bring up the “Run” dialog box, enter cmd, and press Enter. On the command-line interface (CLI), enter the path to the tool and fill in related detection parameters to execute the tool.
    windows
  • Linux and Mac
    Open the terminal. On the displayed interface, enter the path to the tool and fill in related detection parameters to execute the tool.
    Linux platform difference

View report data

After command execution, a report named logOssProbe20060102150405.txt is generated (the numbers following logOssProbe indicate the formatted date of report generation). The possible error cause is printed in command line mode. If you think the error message is not specific, you can view the report. If the problem persists, you can submit a ticket attached with the detection report.

Console display

The console displays the following main information:

  • After execution, the steps marked with × fail, whereas the steps not marked with × are successful.
  • The result indicates whether the upload or download operation is successful. If the upload or download operation is successful, the console displays the file size and upload/download time.
  • The “Suggested Change” column shows the error cause or change suggestions.
  • If you are familiar with OSS error codes, you can perform troubleshooting based on the error message returned by OSS.
  • The “Log Info” columns shows the log name and address, allowing you to find the log.

(TIP: No change suggestions may be given when an error is detected. When this happens, perform troubleshooting based on the returned error code by referring to OSS error code.)

Log file

Different from console display, log files contain network detection details. Ping is used to detect a specified network or the network of a specified EndPoint, tracert is used to detect the route for EndPoint access, and nslookup is used for DNS detection.

References

Thank you! We've received your feedback.