gds_ctl.py
Context
gds_ctl.py can be used to start and stop gds if gds.conf has been configured.
Prerequisites
Run the following commands on Linux OS: You need to ensure that the directory structure is as follows before the execution:
|----gds
|----gds_ctl.py
|----config
|-------gds.conf
|-------gds.conf.sample
or
|----gds
|----gds_ctl.py
|-------gds.conf
|-------gds.conf.sample
Content of gds.conf:
<?xml version="1.0"?> <config> <gds name="gds1" ip="127.0.0.1" port="5000" data_dir="/input_data/" err_dir="/err" data_seg="100MB" err_seg="1000MB" log_file="/log/gds_log.txt" host="10.10.0.1/24" daemon='true' recursive="true" parallel="32"></gds> </config>
Configuration description of gds.conf:
- name: tag name.
- ip: listening IP address, that is, the IP address of the server where GDS is located.
- port: listening port number. Value range: An integer ranging from 1024 to 65535. Default value: 8098. Recommended value: 5000.
- data_dir: directory for storing data files.
- err_dir: directory for storing error log files. The directory must be created by a user who has the GDS read and write permissions.
- data_seg: size of a single data file, for example, 100 MB.
- err_seg: size of each error log file, for example, 1000 MB.
- log_file: path for storing log files. For example, logs are stored in the /log/gds_log.txt file. The directory must be created by a user who has the GDS read and write permissions.
- host: hosts that can be connected to the GDS. For example, if this parameter is set to 10.10.0.1/24, only hosts whose IP address is in the 10.10.0.* can be connected.
- daemon: whether the server runs in DAEMON mode.
Value range:
- true indicates the server runs in DAEMON mode.
- false indicates the server does not run in DAEMON mode.
- recursive: whether the data file directory is recursive
Value range:
- true: indicates the recursion data file directory.
- false: indicates the data file directory is not recursive.
- parallel: indicates the number of concurrently imported and exported working threads.
The default number of concurrencies is 8 and the maximum number is 200.
Syntax
gds_ctl.py [ start | stop all | stop [ ip: ] port | stop | status ]
Description
gds_ctl.py can be used to start or stop GDS if gds.conf is configured.
Parameter Description
- start
- stop
Stop the running instance started by the configuration file in the GDS that can be disabled by the current users.
- stop all
Stop all the running instances in the GDS that can be disabled by the current users.
- stop [ ip: ] port
Stop the specific running GDS instance that can be closed by the current user. If ip:port is specified when the GDS is started, stop the corresponding ip:port to be specified. If the IP address is not specified when the GDS is started, you need to stop the specified port only. The stop fails if different information is specified when the GDS is started or stopped.
- status
Query the running status of the GDS instance started by the gds.conf.
Examples
Start the GDS.
python3 gds_ctl.py start
Stop the GDS started by the configuration file.
python3 gds_ctl.py stop
Stop all the GDS instances that can be stopped by the current user.
python3 gds_ctl.py stop all
Stop the GDS instance specified by [ip:]port that can be stopped by the current user.
python3 gds_ctl.py stop 127.0.0.1:8098
Query the GDS status.
python3 gds_ctl.py status
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot