Checking Uploads and Downloads via BOSProbe
bcecmd uses a multi-level command structure, where all commands start with bcecmd. You can use the upload and download detection functions provided by the BOSProbe with the following commands:
1$ bcecmd bosprobe <command> [options]
Parameter explanation
| Parameter item | Value | Description |
|---|---|---|
| command | Values include: upload and download. | For details about each command's functionality, consult the command function description. |
| +options | Values for BOSProbe command options include -a, -s or -b, etc. | The upload and download configuration options vary. For detailed guidance, please refer to the explanation provided for each command line. |
Command output
- Network detection results;
- Upload detection results;
- Error message;
- Suggestions;
- Save address for the detection report.
Upload detection
Description: Upload detection identifies and collects errors encountered during file upload, gathers network information, and generates reports as well as error prompts. You may upload a random 1M-sized file generated by BOSProbe or specify a file size manually.
Command format:
bcecmd bosprobe upload -b <bucket> [-a <ak>] [-s <sk>] [-f local-path] [-o object] [-e endpoint]
Description:
-bUpload to specified bucket (required);-aAK you use (not required if bucket has public write permission, optional);-sSK you use (not required if bucket has public write permission, optional);-fPath of the file to be uploaded. If null, bosprobe will generate a random file;-oName of the specified file to be uploaded in the bucket. If null, it is the local filename;-eEndpoint. If you specify the endpoint, data will be uploaded to this endpoint. If not specified, the endpoint will be derived from the bucket name.Note:
- If the bucket does not have public write permissions, specify AK/SK when running the command.
Example:
-
1. Randomly generate files and upload to the specified endpoint
Example:
bcecmd bosprobe upload –a 123 –s 456 –b mybucket -e su.bcebos.com -
2. Randomly generate files and upload to the specified ip
Example:
bcecmd bosprobe upload -a 123 -s 456 -b mybucket -e 123.234.1.233 -
3. Upload specified file
Example:
bcecmd bosprobe upload –a 123 –s 456 –b mybucket –f ./file -o filename -e su.bcebos.com
Detection result example
-
1. Upload successful
Plain Text1Network detection in progress.... Good network connection 2 Upload detection in progress.... Upload successful 3 4 ************************* Upload ************************** 5OBJECT NAME: probe20171219210323660.temp 6FILE SIZE : 1048576 7USED TIME : 316 ms 8SPEED : 3.16 MB/s 9 10 ************************* Suggestions ************************** 11 Test passed 12 13 If the prompt fails to solve the issue, you can also create a ticket in the Baidu AI Cloud management console and feedback the log file generated by BOSProbe (if no log file is generated 14, please copy all output information from BosProbe to a local file) to us. We will address it promptly! 15 16 The log of this test is saved at: /home/xxxx/bosprobe2017-xx-xx_xx_xx_xx_89568.log -
2. Upload failed
Plain Text1Network detection in progress.... Good network connection 2 Upload detection in progress.... Upload failed 3 4 ************************* Error Message ************************** 5ERROR CODE: NoSuchBucket 6ERROR MSG : [Code: NoSuchBucket; Message: The specified bucket does not exist.; RequestId: xxx] 7 8 ************************* Suggestions ************************** 9 Please check whether the bucket you specified exists. If yes, please confirm whether the bucket name is spelled correctly and whether the endpoint is correct! 10 11 If the prompt fails to solve the issue, you can also create a ticket in the Baidu AI Cloud management console and feedback the log file generated by BOSProbe (if no log file is generated 12, please copy all output information from BosProbe to a local file) to us. We will address it promptly! 13 14 The log of this test is saved at: /home/xxxx/bosprobe2017-xx-xx_xx_xx_xx_9729.log
Description:
- Error messages and suggestions vary depending on the cause of the error;
- You can solve the errors in the upload according to the suggestions given in the detection results. If the provided suggestions fail to solve your issue, you can create a ticket in the Baidu AI Cloud management console and provide the report document generated by BOSProbe (if no report document is generated, please copy all output information from BosProbe to a local file) to us. We will address it promptly!
Download detection
Description:
Download detection identifies and collects errors and network information during the download process. You may specify the name of the object to be downloaded, or leave it blank (if unspecified, BOSProbe will default to testing with the first object in the bucket).
Command format:
bcecmd bosprobe download [-a <ak>] [-s <sk>] [-f url] [-b bucket] [-o object] [-t to] [-e endpoint]
Description:
-aCurrent operator's AK (not required when bucket has public write permission or when testing URL downloads, optional);-sCurrent operator's SK (not required when bucket has public write permission or when testing URL downloads, optional);-fObject URL, which is required for URL download test;-bBucket where the file to be downloaded is located (optional for URL download test, required for non-URL download testing);-oName of the object to be downloaded (optional);-tLocal address for file saving (optional);-eEndpoint (optional).Note:
- You cannot specify both a URL and a bucket or object simultaneously, i.e.,
-fcannot be used with-b -o;- When testing URL downloads, you do not need to specify an endpoint, i.e.,
-ecannot be used with-f.
Example:
-
1. URL download test
Operation Example:
bcecmd bosprobe download -f http://bj.bcebos.com/mybucket/file1.txtOperation Example:bcecmd bosprobe download –f http://bj.bcebos.com/mybucket/file1.txt-t ./tmp/example.txt` -
2. Download and test randomly from the specified bucket
Example:
bcecmd bosprobe download –a 123 –s 456 –b mybucket - 3. Download specified object
Example:
bcecmd bosprobe download –a 123 –s 456 –b mybucket –o file1.txt -
4. Download specified object to local specified location
Example:
bcecmd bosprobe download –a 123 –s 456 –b mybucket –o file1.txt –t ./tmp/example.txt
Detection result example
-
1. Download Successful
Plain Text1Network detection in progress.... Good network connection 2 Download detection in progress.... Download Successful 3 4 ************************* Download ************************** 5 OBJECT NAME: file1.txt 6 FILE SIZE : 555 7 USED TIME : 144 ms 8 SPEED : 0.00 MB/s 9 10 ************************* Suggestions ************************** 11 Test passed 12 13 If the prompt fails to solve the issue, you can also create a ticket in the Baidu AI Cloud management console and feedback the log file generated by BOSProbe (if no log file is generated 14, please copy all output information from BosProbe to a local file) to us. We will address it promptly! 15 16 The log of this test is saved at: /home/xxxx/bosprobe2017-xx-xx_xx_xx_xx_84579.log -
2. Download Failed
Plain Text1Network detection in progress.... Good network connection 2 Download detection in progress.... Download failed 3 4 ************************* Error Message ************************** 5 ERROR CODE: NoSuchKey 6 ERROR MSG : [Code: NoSuchKey; Message: The specified key does not exist.; RequestId: xxx] 7 8 ************************* Suggestions ************************** 9 The specified object does not exist in BOS. Please check if the object name is spelled correctly! If the specified object key is a directory, 10 please append the suffix "/" to the object key. 11 12 If the prompt fails to solve the issue, you can also create a ticket in the Baidu AI Cloud management console and feedback the log file generated by BOSProbe (if no log file is generated 13, please copy all output information from BosProbe to a local file) to us. We will address it promptly! 14 15 The log of this test is saved at: /home/xxxx/bosprobe2017-xx-xx_xx_xx_xx_86018.log
