Check of Upload and Download by BOSProbe
The bcecmd uses multi-layer command structure, and all commands start with bcecmd. You can use the upload and download detection function provided by BOSProbe with the following commands:
$ bcecmd bosprobe<command> [options]
Parameter Interpretation
Parameter item | Value | Description |
---|---|---|
command | Value taken as: upload,download | Please see the command function description for the role of each command. |
+options | The Option of command BOSProbe is taken as-a, -s or -b, etc. | The option configurable for upload and download is not the same. See each command line explanation for detailed method for use. |
Command Output
- Network test results;
- Upload test results;
- Error message;
- Suggestions;
- Address where the test report is stored.
Upload Detection
Description The upload detection is to detect and collect the errors encountered during the upload process, and to collect the network information, and generate reports and error message. The file uploaded can be a random file of 1M generated by BOSProbe, or a file of random size you specify manually.
Command Format
bcecmd bosprobe upload -b<bucket> [-a<ak>] [-s<sk>] [-f local-path] [-o object] [-e endpoint]
Description
-b
: upload to specified bucket (must be specified);-a
: AK you use (it is not required to specify it if the bucket indicates a public write, and it is not a must);-s
: SK you use (it is not required to specify it if the bucket indicates a public write, and it is not a must);-f
: the path of the file to be uploaded, in case of a null, the file shall be the one generated randomly by bosprobe;-o
: specify the name of the uploaded file that is stored in the bucket, or in case of a null, it shall be the name of a local file;-e
: endpoint, if you have specified the endpoint, the file is uploaded to such endpoint, and if not, the endpoint is deduced based on bucket name.Note:
- If the bucket is not for public read and write, please specify AK/SK when the command is executed.
Example
-
1.The randomly generated file is uploaded to the specified endpoint
Example for operation:
bcecmd bosprobe upload �Va 123 �Vs 456 �Vb mybucket -e su.bcebos.com
-
2.The randomly generated file is uploaded to the specified ip
Example for operation:
bcecmd bosprobe upload -a 123 -s 456 -b mybucket -e 123.234.1.233
-
3.Upload the specified file
Example for operation:
bcecmd bosprobe upload �Va 123 �Vs 456 �Vb mybucket �Vf ./file -o filename -e su.bcebos.com
Example for Test Results
-
1.Upload succeeded
Network is under detection ....[Network performs well] Upload is under detection ....[Upload succeeded] ************************* Upload************************** OBJECT NAME: probe20171219210323660.temp FILE SIZE : 1048576 USED TIME : 316 ms SPEED : 3.16 MB/s ************************* Suggestions************************** Pass the test If the prompt fails to solve the problem, you can create a work order at the administrative console of Baidu AI Cloud, and send the log file generated by BOSProbe to us (if no log files are generated, please copy all the output information of BOSProbe to the local file), we will handle the problem as soon as possible! This test log is saved in:/home/xxxx/bosprobe2017-xx-xx_xx_xx_xx_89568.log
-
2.Upload Failed
Network is under detection ....[Network performs well] Upload is under detection ....[Upload failed] ************************* Error message************************** ERROR CODE: NoSuchbucket ERROR MSG : [Code: NoSuchbucket; Message: The specified bucket does not exist.; RequestId: xxx] ************************* Suggestions************************** Please check whether the bucket you specify exists, and if so, please make sure that the bucket name is spelled correctly and the endpoint is correct! If the prompt fails to solve the problem, you can create a work order at the administrative console of Baidu AI Cloud, and send the log file generated by BOSProbe to us (if no log files are generated, please copy all the output information of BOSProbe to the local file), we will handle the problem as soon as possible! This test log is saved in:/home/xxxx/bosprobe2017-xx-xx_xx_xx_xx_9729.log
Note:
- The error messages and suggestions may vary depending on the causes of error;
- You can solve the upload error based on the suggestions given in the test results, and if the suggestions given cannot solve your problem, you can create a work order in the administrative console of Baidu AI Cloud, and upload the report file generated by BOSProbe (in case of no report file generated, please copy all the output information of BosProbe to local files) to us, we will deal with the problem as soon as possible!
Download Detection
Description
The download detection is to detect and collect the errors and network information encountered during the download process. During the download detection, you can specify or do not specify the object name of download (if not, BOSProbe selects the first object in the bucket for download detection).
Command Format
bcecmd bosprobe download [-a<ak>] [-s<sk>] [-f url] [-b bucket] [-o object] [-t to] [-e endpoint]
Note:
-a
: AK of the current executing user (it is not required to specify it if the bucket indicates a public write and use url for download test, and it is not a must);-s
: SK of the current executing user (it is not required to specify it if the bucket indicates a public write and use url for download test, and it is not a must);-f
: Url of object, it is required when url download is tested;-b
: The bucket where the file to be downloaded is located (it is not required when the url download is tested, and it is required when non-url download is tested);-o
: Name of the object to be downloaded (non-required);-t
: Local address that the file is stored (non-required);-e
: Endpoint (non-required).Note:
- It is unable to specify url or bucket or object, that is,
-f
cannot be used in conjunction with-b -o
at the same time;- It is not required to specify endpoint when url download is tested, that is,
-e
cannot be used in conjunction with-f
together.
Example:
-
1.Url download test
Example for operation:
bcecmd bosprobe download -f http://bj.bcebos.com/mybucket/file1.txt
Example for operation:bcecmd bosprobe download �Vf http://bj.bcebos.com/mybucket/file1.txt
-t ./tmp/example.txt` -
1.Download test randomly from specified bucket
Example for operation:
bcecmd bosprobe download -a 123 -s 456 -b mybucket
- 3.Download specified object
Example for operation:
bcecmd bosprobe download -a 123 -s 456 -b mybucket -o file1.txt
-
4.Download specified object to local specified address
Example for operation:
bcecmd bosprobe download -a 123 -s 456 -b mybucket -o file1.txt -t ./tmp/example.txt
Example for Test Results
-
1.Download succeeded
Network is under detection ....[Network performs well] Download is under detection.... [Download succeeded] ************************* Download************************** OBJECT NAME: file1.txt FILE SIZE : 555 USED TIME : 144 ms SPEED : 0.00 MB/s ************************* Suggestions************************** Pass the test If the prompt fails to solve the problem, you can create a work order at the administrative console of Baidu AI Cloud, and send the log file generated by BOSProbe to us (if no log files are generated, please copy all the output information of BOSProbe to the local file), we will handle the problem as soon as possible! This test log is saved in:/home/xxxx/bosprobe2017-xx-xx_xx_xx_xx_84579.log
-
2.Download Failed
Network is under detection ....[Network performs well] Download is under detection.... [Download failed] ************************* Error message************************** ERROR CODE: NoSuchKey ERROR MSG : [Code: NoSuchKey; Message: The specified key does not exist.; RequestId: xxx] ************************* Suggestions************************** The object you specified does not exist in BOS. Please check whether the object name is spelled correctly! If the object key specified is a directory, Please suffix the object key with "/". If the prompt fails to solve the problem, you can create a work order at the administrative console of Baidu AI Cloud, and send the log file generated by BOSProbe to us (if no log files are generated, please copy all the output information of BOSProbe to the local file), we will handle the problem as soon as possible! This test log is saved in:/home/xxxx/bosprobe2017-xx-xx_xx_xx_xx_86018.log