doc-exports/docs/dws/tool/dws_07_0129.html
Lu, Huayi 346ac31da9 DWS TG 8.1.3.200 VERSION
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Reviewed-by: Jiang, Beibei <beibei.jiang@t-systems.com>
Co-authored-by: Lu, Huayi <luhuayi@huawei.com>
Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
2023-08-28 09:20:17 +00:00

62 lines
18 KiB
HTML

<a name="EN-US_TOPIC_0000001233922183"></a><a name="EN-US_TOPIC_0000001233922183"></a>
<h1 class="topictitle1">gds_ctl.py</h1>
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_s1f53e60f27ba42ed9c12257637b7b779"><h4 class="sectiontitle">Context</h4><p id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_en-us_topic_0059778776_p794262513361"><strong id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_en-us_topic_0058968094_b842352706173450">gds_ctl.py</strong> can be used to start and stop <strong id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_en-us_topic_0058968094_b842352706173649">gds</strong> if <strong id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_en-us_topic_0058968094_b84235270617376">gds.conf</strong> has been configured.</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_s71294b3074d64c5bae2e428918c46847"><h4 class="sectiontitle"><strong id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_b842352706101438">Prerequisites</strong></h4><p id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_a320ed3732b534e35a13a67eba6329429">Run the following commands on Linux OS: You need to ensure that the directory structure is as follows before the execution:</p>
<p id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_a655fdcad298048fdb1acb22e8e459955">|----gds</p>
<p id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_abd495caa17f54f83bdc5a9ebb9762a9f">|----gds_ctl.py</p>
<p id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_a184c38f456c247c79a8e9835caf625f2">|----config</p>
<p id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_ae19686c2db3f4d6894d2b2fcdb0f90e9">|-------gds.conf</p>
<p id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_aa6b69076399d4af789cbecb4cabe286f">|-------gds.conf.sample</p>
<p id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_a4a757730ed7545629285b3eb13a7ffdd">or</p>
<p id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_a7fd4b207dc044f4eaa4ab25ff8bb8056">|----gds</p>
<p id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_a399d48883ddb4e6c8e18eb2a72545af7">|----gds_ctl.py</p>
<p id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_a83081f231c9d463dbb7a7493316a34d8">|-------gds.conf</p>
<p id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_a0c01aef9d9e5454da40064543ea60bc2">|-------gds.conf.sample</p>
<p id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_ad1a6c385827b45129db5ae2308ccc251"></p>
<p id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_ac4fc8a97da6f437699602a794810cdf9">Content of <strong id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_b84235270610191">gds.conf</strong>:</p>
<pre class="screen" id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_s76c9df4c27644514a3162cedf1ad2064">&lt;?xml version="1.0"?&gt;
&lt;config&gt;
&lt;gds name="gds1" ip="127.0.0.1" port="8098" data_dir="/data" err_dir="/err" data_seg="100MB" err_seg="1000MB" log_file="./gds.log" host="10.10.0.1/24" daemon='true' recursive="true" parallel="32"&gt;&lt;/gds&gt;
&lt;/config&gt;</pre>
<p id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_a04b33c1eeb144a03a73990f095f4d83a">Configuration description of <strong id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_b842352706101921">gds.conf</strong>:</p>
<ul id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_ube8e98548af44446b8a1d6ac9a77dca9"><li id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_lb61d6815b464411da61e082c5f7caf71">name: tag name</li><li id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_le4a1ee22175a4282bdaf2355a307a87a">ip: IP addresses to be listened to</li><li id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_lbc7233fe08694f579ea6f0d2e086b89b">port: Port number to be listened to<p id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_a54c3ed5e13be4a03b1a1588b4d9f7e5b"><a name="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_lbc7233fe08694f579ea6f0d2e086b89b"></a><a name="en-us_topic_0000001188521070_en-us_topic_0000001145770619_lbc7233fe08694f579ea6f0d2e086b89b"></a>Value range: an integer ranging from 1024 to 65535</p>
<p id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_ad16c3fc03fc345ba978d2e80efc8bd9a">Default value: <strong id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_b842352706195527">8098</strong></p>
</li><li id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_lc233448b0d21431b993f9258d58eab91"><strong id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_b84235270620364">data_dir</strong>: data file directory</li><li id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_lf0ae6daf4e1e4af28cd61fddc1a0aec6"><strong id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_b842352706203611">err_dir</strong>: error log file directory</li><li id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_lac0d7eaba53a44c4af7a3c384e14168a"><strong id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_b842352706203635">log_file</strong>: log file path</li><li id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_laa771515359e477aa879e4141139dccf"><strong id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_b842352706203629">host</strong>: hosts that can be connected to the GDS.</li><li id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_l6a2b61a1b4784492bad7d2bffe3b3a3f"><strong id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_b7814119786">recursive</strong>: whether the data file directory is recursive<p id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_abf26da049f6b45b7aec3d09de15c7b41"><strong id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_b842352706203652">Value range</strong>:</p>
<ul id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_ue3faaa17718f4a3390808cb43ce3b76e"><li id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_l77111c71709442949eaab4c351546547"><strong id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_b842352706104956">true</strong>: indicates the recursion data file directory.</li><li id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_lc331dff694844821987c7ef045f0ea6d"><strong id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_b842352706105046">false</strong>: indicates the data file directory is not recursive.</li></ul>
</li><li id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_l8f5ad7748ee34ebb81fc86167b15353a"><strong id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_b842352706203751">daemon</strong>: specifies whether the service is running in DAEMON mode.<p id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_a9e1905681b38404bac1bada086164642"><strong id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_b842352706203658">Value range</strong>:</p>
<ul id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_u2ccacb81487546ddb4a6e7e8c0ac0db3"><li id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_l9112e1536729422ab4a8c317272e4b3e"><strong id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_b84235270611137">true</strong> indicates the server is running in the DAEMON mode.</li><li id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_l2a0101df51ee43f4a517990d13f79819"><strong id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_b84235270611159">false</strong> indicates the server is not running in the DAEMON mode.</li></ul>
</li><li id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_ld4b8a42ae77a49fa81586d9dc4007485"><strong id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_b842352706203811">parallel</strong>: indicates the number of concurrently imported and exported working threads.<p id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_a7f027d0fdfb34e87a7a68274e3f1fb47">The default number of concurrencies is <strong id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_b17325321818">8</strong> and the maximum number is <strong id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_b14347441111">200</strong>.</p>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_s1c0382bcd60d4f6c8a75f35a7b65c76e"><h4 class="sectiontitle">Syntax</h4><pre class="screen" id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_sb40bb9220c204287940646f464047a1f">gds_ctl.py [ start | stop all | stop [ ip: ] port | stop | status ]</pre>
</div>
<div class="section" id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_sa4a5a2459360465aaccb7f83874bb04c"><h4 class="sectiontitle">Description</h4><p id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_ab3fce97d1cf54546b5305bb4b7fd8614"><strong id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_b842352706111334">gds_ctl.py</strong> can be used to start or stop GDS if <strong id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_b842352706111413">gds.conf</strong> is configured.</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_s85dc14ccafa9463fafac4924323ab227"><h4 class="sectiontitle">Parameter Description</h4><ul id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_u24cdb25a97464dd68b0914bc8517189f"><li id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_lc784227a8082499299e2a09b5debf38b">start<p id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_a4096e7b72abe44ce950a6f1c2f2ee155"><a name="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_lc784227a8082499299e2a09b5debf38b"></a><a name="en-us_topic_0000001188521070_en-us_topic_0000001145770619_lc784227a8082499299e2a09b5debf38b"></a>Enable the GDS configured in <strong id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_b842352706111551">gds.conf</strong>.</p>
</li><li id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_lf717d27a639242a5af850917f5385deb">stop<p id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_a93a0f9dc48ce4a538c0d056f9779a95a"><a name="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_lf717d27a639242a5af850917f5385deb"></a><a name="en-us_topic_0000001188521070_en-us_topic_0000001145770619_lf717d27a639242a5af850917f5385deb"></a>Stop the running instance started by the configuration file in the GDS that can be disabled by the current users.</p>
</li><li id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_l34270398e5cf471ebbe74d46c1cef33b">stop all<p id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_a37837aa2a18c49048c8951a54265229f"><a name="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_l34270398e5cf471ebbe74d46c1cef33b"></a><a name="en-us_topic_0000001188521070_en-us_topic_0000001145770619_l34270398e5cf471ebbe74d46c1cef33b"></a>Stop all the running instances in the GDS that can be disabled by the current users.</p>
</li><li id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_lf0ae20f75dba46bf9c5953ac1c0e9259">stop [ ip: ] port<p id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_a00a026394c044ba0a8f1617ef38be9b5"><a name="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_lf0ae20f75dba46bf9c5953ac1c0e9259"></a><a name="en-us_topic_0000001188521070_en-us_topic_0000001145770619_lf0ae20f75dba46bf9c5953ac1c0e9259"></a>Stop the specific running GDS instance that can be closed by the current user. If <strong id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_b842352706114328">ip:port</strong> is specified when the GDS is started, stop the corresponding <strong id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_b842352706114623">ip:port</strong> 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.</p>
</li><li id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_lc8dc2febf91449b28ea398de18915ee0">status<p id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_aa290cf646e6b4efaaade523b86413ab9"><a name="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_lc8dc2febf91449b28ea398de18915ee0"></a><a name="en-us_topic_0000001188521070_en-us_topic_0000001145770619_lc8dc2febf91449b28ea398de18915ee0"></a>Query the running status of the GDS instance started by the <strong id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_b842352706172934">gds.conf</strong>.</p>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_sc1312c5151164a8fb82d3dbd869ef35c"><h4 class="sectiontitle">Examples</h4><p id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_a9aa112c53daf49f1b7fadc667a03973c">Start the GDS.</p>
<pre class="screen" id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_s2d8031ba57a549dbb4e6dfde6aad1ebe">python3 gds_ctl.py <em id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_a93609d4f867341bc9aad33911e1c0f73">start</em></pre>
<p id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_aa576d09f41b04d7c818531155b4bd4ea">Stop the GDS started by the configuration file.</p>
<pre class="screen" id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_s1ccd87ab7af64186a44a440ba6f2c497">python3 gds_ctl.py <em id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_a387847f8d12740eda624234acf7a6174">stop</em></pre>
<p id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_a9520e6fbface47759d1bfc9573d858b2">Stop all the GDS instances that can be stopped by the current user.</p>
<pre class="screen" id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_s2ee41223ae944a538f011bc66d962ff6">python3 gds_ctl.py <em id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_a8c3f377f59a741aca43691e241334a36">stop all</em></pre>
<p id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_af78195db572f45c488716cb8d6667509">Stop the GDS instance specified by <strong id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_b842352706173317">[ip:]port</strong> that can be stopped by the current user.</p>
<pre class="screen" id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_s7fdf366c5ae34bbb888065888501f84a">python3 gds_ctl.py <em id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_afcf4aa7a3eae436491b507610c18b1b0">stop 127.0.0.1:8098</em></pre>
<p id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_af6bd7dad6fe44500b4266b0c7af995b6">Query the GDS status.</p>
<pre class="screen" id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_sa3be887ecc864c65a42361a518a3bc93">python3 gds_ctl.py <em id="EN-US_TOPIC_0000001233922183__en-us_topic_0000001188521070_en-us_topic_0000001145770619_a645eac869dfd488c906b4cc6a4f8dfdc">status</em></pre>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_gds_index.html">GDS</a></div>
</div>
</div>