Summary
The DRX CLI is divided into status inquiries and control / notification commands for the replicated resources and provides the same interface regardless of platform through the drx-ctl utility.
CLI
The DRX's CLI is divided into views, controls, and notifications.
The command format of the CLI is drx-ctl {option} [command] [command argument ...]. The output type is determined by "command" and "command argument", and "option" for selecting the detail mode (-v) can be omitted. "Command argument" can use the connection name and "resource".
The output format of the CLI depends on the "command" and you can use "command arguments" to specify the desired output items.
CLI List
Categorize | Item | Option | Command | Alias | Etc. |
---|
query | DRX version | N/A | drx-ctl version | ver | drx version |
DRX info | " | drx-ctl info | - | start or stop status of the DRX process |
license | " | drx-ctl license | lic | license info |
resource configuration | " | drx-ctl dump [res|all] | - | - resource configuration, drx.conf
- Since resource configuration file is processed by drbdadm, enter resource.
|
information during up | " | drx-ctl show [res|conn|all] | - | Configuration information during up. |
connection | -v | drx-ctl connection [res|conn|all] | co | - connection information
- verbose mode (-v): IP, Up Since, Remove arrow
|
statistics | -v | drx-ctl statistics [res|conn|all] | st | - Statistical information
- verbose mode (-v): Tx/Rx packet, compress/crypto Cur, Min, Max
|
BAB | -v | drx-ctl memusage [res|conn|all] | mem | - BAB information
- verbose mode (-v) : Begin, End, BAB Latency
|
log | N/A | drx-ctl log [connect name or main] | - | - Output the currently logged log file
- Rolled log files are not output.
|
control
| resource up | " | drx-ctl up [res|conn|all] | - | up resource |
resource down | " | drx-ctl down [res|conn|all] | - | down resource |
resource adjust | " | drx-ctl adjust [res|conn|all] | - | update resources |
compress | " | drx-ctl set compress [type] [level] [res|conn|all] | - | Resource Compression Settings |
crypto | " | drx-ctl set crypto [on or off] [res|conn|all] | - | Resource Encryption Settings |
bwlimit | " | drx-ctl set bwlimit [limit] [res|conn|all] | - | - unit : Bytes Per Second (K, M, G available)
- limit : Bandwidth of input resource
|
| " | drx-ctl set license [file-path] | - | - file-path : License file path.
- Validate the license on the specified path and replace it.
- When replacing with a valid license, the terminated DRX is retained.
|
reset statistics | " | drx-ctl reset statistics [res|conn|all] | st | - Option alias : statistics is only st.
|
notification | event notification | NA | drx-ctl events {conn|all} | - | event notification |
Notification List
Event | Item | Type | 타깃 | DATA | 설명 |
---|
Common | Action | start | common | [start] | Start Event Notification |
stop | common | [stop] | Stop Event Notification |
shutdown | [success or fail] | Termination by command |
Set | set | license | [temporary, permanent, invalid] | Set specific license |
loglevel | [none, trace, debug, info, warning, critical] | log level (file, console) |
Individual | connect | up | [connect name ] | [success or fail] | connection activation result |
down | [connect name ] | [success or fail] | connection deletion result |
[drx or drbd]_accept | [connect name ] | [IP:Port] | accept result |
[accept or connector]_state | [connect name ] | [stopped/stopping, waiting, bridging/bridged, connecting/connected, establishing/established] | - Connection Status and Results
- add the state subject and connect name
|
Set | set | [connect name ] | compressor [none, zlib, lz4] [level] | compression settings |
[connect name ] | crypto [none, openssl] | encryption settings |
[connect name ] | bwlimit [size] | bandwidth of resource |
reset | [connect name ] | [success or fail] | reset statistics |
status | packet | [connect name ] | [receive_fail] [origin size] [receive size] | notification of failure only |
compress | [connect name ] | [compress or decompress]_fail [origin size] [receive size] [return value] | notification of failure only |
crypto | [connect name ] | [encrypto or decrypto]_fail [origin size] [receive size] [return value] | notification of failure only |
Considerations
- DRX's control commands are performed asynchronously. That is, the point at which the CLI control command is executed and returned is not the final completion of the state control. Therefore, after executing the control command, it is necessary to check whether the status has changed normally through the inquiry command.
- To determine if the state change has been completed, you must check the DRX events in real time after running the event notification command.
- The drx-ctl command performs only one command at a time by default on the receiving drx server, which can cause a timeout for some queued commands if multiple commands are delivered simultaneously by DRX. To avoid timeouts, you need to ensure that the drx-ctl command is executed sequentially.
The return value of drx-ctl is as follows.
Command | Return value | Description |
---|
Windows | Linux |
---|
drx-ctl
| 0 | 0 | success |
-1 | 255 | failure |
-2 | 254 | timeout |
-3 | 253 | DRX not running (not working) |
128 | 128 | Invalid argument |
In Linux, the return value is limited to 0-255, so negative values are represented by adding 256.
Operation
DRX configures the resource information into a file and controls each resource with the drx-ctl command.
The following are typical examples of configuring and starting replication resources.
- configures the resource
- start DRX service.
- Reset the BAB size incorrectly.
- Performs a "down" operation on resource r0.
- Change BAB size of resource r0 to 700M
- Performs a "up" operation on resource r0.
- Apply LZ4 compression algorithm to active resources
- Enter "drx-ctl set compress lz4 1 r0" command
- Use "drx-ctl mem r0" command to check BAB usage rate of resource r0
- To permanently apply compression settings, add settings to the resource file.
Query command
- drx-ctl version
- Option alias : ver
- Print version information of DRX.
- Setting example
< test version >
[root@c69-r1 dgkim]# drx-ctl ver
drx : Test version: Nov 29 2018, 16:13:46
[root@c69-r1 dgkim]#
< Release version >
[root@c69-r1 dgkim]# drx-ctl ver
drx : 1.2(2018-11-29_16-52-41_TEST1) GIT-hash: b62c996 Nov 29 2018, 16:55:04
[root@c69-r1 dgkim]#
- drx-ctl license
- Option alias : lic
- Outputs license information.
- Setting example
[root@c73-p1 drbd.d]# drx-ctl lic
Product type : DRX
License status : Temporary, Expire date: 30-nov-2018, Validity day: 9
[root@c73-p1 drbd.d]#
- drx-ctl dump [res|all]
- drx-ctl show [res|conn|all]
- drx-ctl connections [res|conn|all]
- Option alias : co
- verbose option : -v
- Outputs connection information for a resource.
- Setting example
< normal mode >
[root@74-p1 ~]# drx-ctl co all
-------------------------------------------------------------------------------------------------
Name Type local-drbd-ip State local-drx-ip State remote-drx-ip
-------------------------------------------------------------------------------------------------
r0-74-p2-74-p1 meta (local-drbd) -established-> (local-drx) <-bridged----- (remote-drx)
r0-74-p2-74-p1 data (local-drbd) <-established- (local-drx) -----bridged-> (remote-drx)
-------------------------------------------------------------------------------------------------
All connections : 2, Established : 2
[root@74-p1 ~]#
< verbose mode >
[root@74-p1 ~]# drx-ctl co all -v
----------------------------------------------------------------------------------------------------------------------------------
Name Type local-drbd-ip State local-drx-ip State remote-drx-ip Up since
----------------------------------------------------------------------------------------------------------------------------------
r0-74-p2-74-p1 meta 31.1.1.121:8800 established 31.1.1.138:8801/31.1.1.138:8802 bridged 31.1.1.139:8802 -
r0-74-p2-74-p1 data 31.1.1.121:8800 established 31.1.1.138:8801/31.1.1.138:8802 bridged 31.1.1.139:8802 2018-11-23 18:07:49
----------------------------------------------------------------------------------------------------------------------------------
All connections : 2, Established : 2
[root@74-p1 ~]#
- drx-ctl statistics [res|conn|all]
- Option alias : st
- normal mode : Outputs the average latency of TX speed/RX speed/Compress/Unlock/Encrypt.
- verbose mode : Outputs the current value, maximum value, and minimum value for RAW data/Compression/Decompression/Encryption of RX/TX.
- Filter output mode: Outputs the desired column.
- The output unit(B, KB, MB, GB) is fixed to KiloBytes and is omitted. Values less than KiloBytes are output as zero.
- options
- verbose option : v
- fileter option : --filter
- Abbreviation explanation
Abbreviation | Description | Abbreviation | Description | Abbreviation | Description |
---|
tx | TX speed | ratio | compress average ratio | ec | encrypto |
rx | RX speed | cur | compress current ratio | dc | decrypto |
t-net | TX-Network 전송 사이즈 | worst | compress worst ratio |
|
|
t-raw | TX RAW 사이즈 | best | compress best ratio |
|
|
r-raw | RX-Network 전송 사이즈 | cp | compress |
|
|
r-net | RX RAW 사이즈 | de | decompress |
|
|
- Setting example
< normal mode >
C:\Users\Administrator>drx-ctl st all
---------------------------------------------------------------
name type tx rx ratio cp-avg ec-avg dc-avg de-avg
---------------------------------------------------------------
w1-w2-w16-2-w16-1 meta 0 0
w1-w2-w16-2-w16-1 data 0 0 0.00 0 0 0 0
---------------------------------------------------------------
All connections : 2, Established : 2
C:\Users\Administrator>
< verbose mode >
C:\Users\Administrator>drx-ctl st all -v
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
name type tx rx t-raw t-net r-raw r-net ratio cur best worst cp-avg cp-cur cp-min cp-max ec-avg ec-cur ec-min ec-max dc-avg dc-cur dc-min dc-max de-avg de-cur de-min de-max
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
w1-w2-w16-2-w16-1 meta 0 0
w1-w2-w16-2-w16-1 data 90 0 63118 63135 0 0 0.00 0.00 0.00 0.00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
All connections : 2, Established : 2
C:\Users\Administrator>
< filter mode >
C:\Users\Administrator>drx-ctl st all -v --filter=name,tx,rx,cp-avg,cp-cur,cp-min,cp-max
----------------------------------------------------
name tx rx cp-avg cp-cur cp-min cp-max
----------------------------------------------------
w1-w2-w16-2-w16-1 0 0
w1-w2-w16-2-w16-1 0 0 0 0 0 0
----------------------------------------------------
All connections : 2, Established : 2
C:\Users\Administrator>
- drx-ctl memusage [res|conn|all]
- Outputs the BAB information for the resource.
- The output unit(B, KB, MB, GB) is fixed to KiloBytes and is omitted. Values less than KiloBytes are output as zero.
- Option alias : mem
- verbose option
- option : v
- Outputs BAB Latency (TX, RX, compression / release) information of the connected resource.
Setting example
< normal mode >
[root@c73-p1 dgkim]# drx-ctl mem all
--------------------------------------------------------------------------------------
Name Capacity Use (Size) Full Counts
--------------------------------------------------------------------------------------
DR-1-3-c73-p2-c73-p1 716800 [>>>>>>>.....................] 23% (163277) 0
10240 [............................] 0% (0) -
--------------------------------------------------------------------------------------
DR-2-3-c73-p2-c73-p1 512000 [............................] 0% (0) 0
10240 [............................] 0% (0) -
--------------------------------------------------------------------------------------
Active bab counts : 2
<verbose mode>
[root@c73-p1 dgkim]# drx-ctl mem all -v
----------------------------------------------------------------------------------------------------------
Name Capacity Begin End Use (Size) Full Counts
----------------------------------------------------------------------------------------------------------
DR-1-3-c73-p2-c73-p1 716800 340236152 504137496 [>>>>>>>.....................] 22% (160060) 0
10240 0 0 [............................] 0% (0) -
----------------------------------------------------------------------------------------------------------
DR-2-3-c73-p2-c73-p1 512000 64273922 64273922 [............................] 0% (0) 0
10240 0 0 [............................] 0% (0) -
----------------------------------------------------------------------------------------------------------
Active bab counts : 2
----------------------------------------------------------------------------------------------------------
name Latency cur avg max min
----------------------------------------------------------------------------------------------------------
DR-1-3-c73-p2-c73-p1 TX BAB 00:00:00.000000 00:00:00.443516 00:00:06.765142 00:00:00.000101
RX BAB 00:00:00.000000 00:00:00.000000 00:00:00.000000 00:00:00.000000
Compress 00:00:00.000088 00:00:00.000087 00:00:00.001439 00:00:00.000001
Decompress 00:00:00.000000 00:00:00.000000 00:00:00.000000 00:00:00.000000
----------------------------------------------------------------------------------------------------------
DR-2-3-c73-p2-c73-p1 TX BAB 00:00:00.000000 00:00:00.001627 00:00:00.004173 00:00:00.000261
RX BAB 00:00:00.000000 00:00:00.000000 00:00:00.000000 00:00:00.000000
Compress 00:00:00.000000 00:00:00.000113 00:00:00.001440 00:00:00.000001
Decompress 00:00:00.000000 00:00:00.000000 00:00:00.000000 00:00:00.000000
----------------------------------------------------------------------------------------------------------
Active bab counts : 2
[root@c73-p1 dgkim]#
- drx-ctl log [res|conn|all]
- Outputs the contents of the log being recorded.
- options
- If no options are entered, only the common (main) log is output.
- Outputs a log of all resources or input resources.
- m : output the main log.
- n [number] : print the last n logs.
Setting example
< main log >
[root@c69-r1 ~]# drx-ctl log
Online mode. (main)
I1126 08:50:17.448040 t30088 main] Resource create complete (success: 2, failed: 0)
^C[root@c69-r1 ~]#
< resource log >
[root@c69-r1 ~]# drx-ctl log r0
Online mode. (without main, r0-c69-r2-c69-r1)
D1126 08:53:50.977215 t30109 r0-c69-r2-c69-r1:ad:o] <<=== drxp_type::ping
^C[root@c69-r1 ~]#
[root@c69-r1 ~]# drx-ctl log r0_1
Online mode. (without main, r0_1-c69-r3-c69-r1)
D1126 08:54:08.696168 t30133 r0_1-c69-r3-c69-r1:cd:o] <<=== drxp_type::ping
D1126 08:54:14.707857 t30129 r0_1-c69-r3-c69-r1:am:o] ===>> send stream payload_len (16) meta
D1126 08:54:14.708035 t30127 r0_1-c69-r3-c69-r1:am:o] <<=== drxp_type::stream (crypto:NONE) (compress:NONE) [16]
D1126 08:54:14.708129 t30128 r0_1-c69-r3-c69-r1:am:o] ===>> send stream payload_len (16) meta
D1126 08:54:14.708208 t30127 r0_1-c69-r3-c69-r1:am:o] <<=== drxp_type::stream (crypto:NONE) (compress:NONE) [16]
^C[root@c69-r1 ~]#
< All logs of common and resources >
[root@c69-r1 ~]# drx-ctl log -m all
Online mode. (main, r0-c69-r2-c69-r1, r0_1-c69-r3-c69-r1)
D1126 08:54:24.708287 t30126 r0_1-c69-r3-c69-r1:am:o] <<=== drxp_type::stream (crypto:NONE) (compress:NONE) [16]
^C[root@c69-r1 ~]#
[root@c69-r1 ~]#
< prints the last 10 logs and all logs (common, resources) >
[root@c69-r1 ~]# drx-ctl log -m -n 10 all
Online mode. (main, r0-c69-r2-c69-r1, r0_1-c69-r3-c69-r1)
D1126 08:54:34.708110 t30129 r0_1-c69-r3-c69-r1:am:o] <<=== drxp_type::stream (crypto:NONE) (compress:NONE) [16]
D1126 08:54:34.708215 t30126 r0_1-c69-r3-c69-r1:am:o] ===>> send stream payload_len (16) meta
D1126 08:54:34.708425 t30127 r0_1-c69-r3-c69-r1:am:o] <<=== drxp_type::stream (crypto:NONE) (compress:NONE) [16]
D1126 08:54:38.992691 t30114 r0-c69-r2-c69-r1:cm:o] <<=== drxp_type::stream (crypto:NONE) (compress:NONE) [16]
D1126 08:54:38.992832 t30114 r0-c69-r2-c69-r1:cm:o] ===>> send stream payload_len (16) meta
D1126 08:54:40.696530 t30131 r0_1-c69-r3-c69-r1:cd:o] <<=== drxp_type::ping
D1126 08:54:44.707844 t30127 r0_1-c69-r3-c69-r1:am:o] ===>> send stream payload_len (16) meta
D1126 08:54:44.708060 t30129 r0_1-c69-r3-c69-r1:am:o] <<=== drxp_type::stream (crypto:NONE) (compress:NONE) [16]
D1126 08:54:44.708151 t30126 r0_1-c69-r3-c69-r1:am:o] ===>> send stream payload_len (16) meta
D1126 08:54:44.708223 t30129 r0_1-c69-r3-c69-r1:am:o] <<=== drxp_type::stream (crypto:NONE) (compress:NONE) [16]
^C[root@c69-r1 ~]#
[root@c69-r1 ~]#
Control
- drx-ctl up [res|conn|all]
- the input resource is up.
- Setting example
< resource up >
[root@c73-p1 dgkim]# drx-ctl up r0
DR-1-3-c73-p2-c73-p1: up.
Result: 1 resource(s) up.
[root@c73-p1 dgkim]#
< all resource up >
[root@c73-p1 dgkim]# drx-ctl up all
DR-1-3-c73-p2-c73-p1: up.
DR-2-3-c73-p2-c73-p1: up.
Result: 2 resource(s) up.
[root@c73-p1 dgkim]#
- drx-ctl down [res|conn|all]
- the input resource is down.
- Setting example
< resource down >
[root@c73-p1 dgkim]# drx-ctl down r0
DR-1-3-c73-p2-c73-p1: resource down.
Result: 1 resource(s) down.
[root@c73-p1 dgkim]#
< resource down >
[root@c73-p1 dgkim]# drx-ctl down all
DR-1-3-c73-p2-c73-p1: resource down.
DR-2-3-c73-p2-c73-p1: resource down.
Result: 2 resource(s) down.
[root@c73-p1 dgkim]#
- drx-ctl adjust [res|conn|all]
- The active resource is updated, and the inactive resource is started.
- Setting example
[root@c73-p1 drbd.d]# drx-ctl adjust all
DR-1-3-c73-p2-c73-p1: up.
DR-2-3-c73-p2-c73-p1: up.
Result: 2 resource(s) updated.
[root@c73-p1 drbd.d]#
- The BAB size of the active resource can not be changed.
Error
[root@c73-p1 drbd.d]# drx-ctl adjust all
DR-1-3-c73-p2-c73-p1:ad: Can't change memory limit of active resource.
DR-1-3-c73-p2-c73-p1:cm: Can't change memory limit of active resource.
DR-1-3-c73-p2-c73-p1: updated.
DR-2-3-c73-p2-c73-p1: updated.
Result: 2 resource(s) updated.
[root@c73-p1 drbd.d]#
- drx-ctl set compress [type] [level] [res|conn|all]
- Sets the compression plug-in for the resource you enter.
options
Type | Method | Range | ETC |
---|
NONE | - | - | OFF |
IQA | HW | 1~9 | - |
ZLIB | SW | 1~9 | - |
LZ4 | SW | 1~9 | - |
Setting example
< lz4 compression plugin only set r0 >
[root@c73-p1 dgkim]# drx-ctl set compress lz4 1 DR-1-3-c73-p2-c73-p1
Result: 1 resource(s) updated.
[root@c73-p1 dgkim]#
<log output>
I1126 17:31:10.271886 t77473 DR-1-3-c73-p2-c73-p1:ad] Set compressor: LZ4
I1126 17:31:10.271918 t77473 DR-1-3-c73-p2-c73-p1:ad] Set compressor level: 1
I1126 17:31:10.271924 t77473 DR-1-3-c73-p2-c73-p1:cm] Set compressor: LZ4
I1126 17:31:10.271925 t77473 DR-1-3-c73-p2-c73-p1:cm] Set compressor level: 1
< Disable r0 compression plug-in >
[root@c73-p1 dgkim]# drx-ctl set compress none 1 DR-1-3-c73-p2-c73-p1
DR-1-3-c73-p2-c73-p1: updated.
Result: 1 resource(s) updated.
[root@c73-p1 dgkim]#
<log output>
I1126 17:31:37.741765 t77473 DR-1-3-c73-p2-c73-p1:ad] Set compressor: NONE
I1126 17:31:37.741795 t77473 DR-1-3-c73-p2-c73-p1:ad] Set compressor level: 1
I1126 17:31:37.741800 t77473 DR-1-3-c73-p2-c73-p1:cm] Set compressor: NONE
I1126 17:31:37.741802 t77473 DR-1-3-c73-p2-c73-p1:cm] Set compressor level: 1
< set the lz4 compression plugin to all resources >
[root@c73-p1 dgkim]# drx-ctl set compress lz4 1 all
Result: 2 resource(s) updated.
[root@c73-p1 dgkim]#
<log output>
I1126 17:32:30.656067 t77473 DR-1-3-c73-p2-c73-p1:ad] Set compressor: LZ4
I1126 17:32:30.656089 t77473 DR-1-3-c73-p2-c73-p1:ad] Set compressor level: 1
I1126 17:32:30.656095 t77473 DR-1-3-c73-p2-c73-p1:cm] Set compressor: LZ4
I1126 17:32:30.656118 t77473 DR-2-3-c73-p2-c73-p1:am] Set compressor: LZ4
I1126 17:32:30.656096 t77473 DR-1-3-c73-p2-c73-p1:cm] Set compressor level: 1
I1126 17:32:30.656133 t77473 DR-2-3-c73-p2-c73-p1:am] Set compressor level: 1
I1126 17:32:30.656138 t77473 DR-2-3-c73-p2-c73-p1:cd] Set compressor: LZ4
I1126 17:32:30.656139 t77473 DR-2-3-c73-p2-c73-p1:cd] Set compressor level: 1
- drx-ctl set crypto [on or off] [res|conn|all]
- sets the encryption plugin for the resource you enter.
- Setting example
< enable crypto plugin r0 only >
[root@c73-p1 dgkim]# drx-ctl set crypto on DR-1-3-c73-p2-c73-p1
DR-1-3-c73-p2-c73-p1: updated.
Result: 1 resource(s) updated.
[root@c73-p1 dgkim]#
<log output>
I1126 17:10:10.611963 t77473 DR-1-3-c73-p2-c73-p1:ad] Set crypto: OPENSSL
I1126 17:10:10.611987 t77473 DR-1-3-c73-p2-c73-p1:cm] Set crypto: OPENSSL
< enable the crypto plugin for all resources >
[root@c73-p1 dgkim]# drx-ctl set crypto on all
DR-2-3-c73-p2-c73-p1: updated.
Result: 2 resource(s) updated.
[root@c73-p1 dgkim]#
<log output>
I1126 17:08:26.156687 t77473 DR-1-3-c73-p2-c73-p1:ad] Set crypto: OPENSSL
I1126 17:08:26.156713 t77473 DR-2-3-c73-p2-c73-p1:am] Set crypto: OPENSSL
I1126 17:08:26.156702 t77473 DR-1-3-c73-p2-c73-p1:cm] Set crypto: OPENSSL
I1126 17:08:26.156719 t77473 DR-2-3-c73-p2-c73-p1:cd] Set crypto: OPENSSL
< 모든 리소스의 암호화 플러그인을 비활성화 >
[root@c73-p1 dgkim]# drx-ctl set crypto off all
DR-1-3-c73-p2-c73-p1: updated.
DR-2-3-c73-p2-c73-p1: updated.
Result: 2 resource(s) updated.
[root@c73-p1 dgkim]#
<log output>
I1206 14:12:59.701227 t81344 DR-1-3-c73-p2-c73-p1:am] Set crypto: NONE
I1206 14:12:59.701250 t81344 DR-1-3-c73-p2-c73-p1:cd] Set crypto: NONE
I1206 14:12:59.701305 t81344 DR-2-3-c73-p2-c73-p1:ad] Set crypto: NONE
I1206 14:12:59.701315 t81344 DR-2-3-c73-p2-c73-p1:cm] Set crypto: NONE
- drx-ctl set bwlimit [limit] [res|conn|all]
- Sets the B/W of the input resource.
Setting example
< set B/W of resource r0 to 1G >
[root@c73-p1 dgkim]# drx-ctl set bwlimit 1G DR-1-3-c73-p2-c73-p1
DR-1-3-c73-p2-c73-p1: updated.
Result: 1 resource(s) updated.
[root@c73-p1 dgkim]#
<log output>
I1126 17:21:11.633557 t77473 DR-1-3-c73-p2-c73-p1:ad] Set bandwidth limit: 1.00 GB
I1126 17:21:11.633573 t77473 DR-1-3-c73-p2-c73-p1:cm] Set bandwidth limit: 1.00 GB
< set the B/W of all resources to 100M >
[root@c73-p1 dgkim]# drx-ctl set bwlimit 100M all
DR-1-3-c73-p2-c73-p1: updated.
DR-2-3-c73-p2-c73-p1: updated.
Result: 2 resource(s) updated.
[root@c73-p1 dgkim]#
<log output>
I1126 17:20:55.431890 t77473 DR-1-3-c73-p2-c73-p1:ad] Set bandwidth limit: 100.00 MB
I1126 17:20:55.431916 t77473 DR-1-3-c73-p2-c73-p1:cm] Set bandwidth limit: 100.00 MB
I1126 17:20:55.431964 t77473 DR-2-3-c73-p2-c73-p1:am] Set bandwidth limit: 100.00 MB
I1126 17:20:55.431984 t77473 DR-2-3-c73-p2-c73-p1:cd] Set bandwidth limit: 100.00 MB
- drx-ctl set license [file-path]
- After checking the license validity of the specified path, change the license information of the default path.
- Changing to a valid license does not change the behavior of the DRX process because the resource must remain connected.
- Setting example
C:\Users\Administrator>drx-ctl set license drx.lic
License status : Temporary, Expire date: 30-nov-2018, Validity day: 4
Result: done.
C:\Users\Administrator>
<log output>
I1127 09:28:40.374185 t5880 main] Verify license is available
I1127 09:28:40.374185 t5880 main:license] Checking license for [C:\Users\Administrator\drx.lic]
I1127 09:28:40.374185 t5880 main:license] License Status: Temporary, Expire date: 30-nov-2018, Validity day: 4
I1127 09:28:40.389865 t5880 main] License applied
- drx-ctl reset statistics [res|conn|all]
- Initializes the statistic value of the resource entered.
- Option alias : st
- Setting example
< initialize resource r0 only >
[root@c73-p1 dgkim]# drx-ctl reset st DR-1-3-c73-p2-c73-p1
DR-1-3-c73-p2-c73-p1: reseted.
Result: 1 resource(s) reseted.
[root@c73-p1 dgkim]#
< initialize all resources >
[root@c73-p1 dgkim]# drx-ctl reset st all
DR-1-3-c73-p2-c73-p1: reseted.
DR-2-3-c73-p2-c73-p1: reseted.
Result: 2 resource(s) reseted.
[root@c73-p1 dgkim]#
Notification
The event that occurred in DRX process can be received through the client (drx-ctl).
- drx-ctl events {conn|all}
options
- empty(Do not type) : only receive public events.
- all : receive all events.
- connect name : output events of the input resource
- Setting example
< only receive public events. >
[root@c73-p1 drbd.d]# drx-ctl events
[system] connected
[2018-11-27 11:22:38.933] start common
< output events of the input resource >
[root@c73-p1 drbd.d]# drx-ctl events DR-1-3-c73-p2-c73-p1
[system] connected
< receive all events >
[root@c73-p1 drbd.d]# drx-ctl events all
[system] connected
[2018-11-27 10:43:12.831] start common
- List of events.
Event | Type | Description | Example |
---|
Common | start | notification started |
[root@c73-p1 drbd.d]# drx-ctl events
[system] connected
[2018-11-27 11:22:38.933] start common
|
stop | end of notification |
[2018-11-27 11:12:39.098] stop common
|
shutdown | exit by command |
[2018-11-27 11:12:39.076] shutdown success
|
set license | License settings. | - temporary, permanent, invalid
[2018-11-27 13:17:58.806] set license temporary
|
set loglevel | log level (file, console) |
[2018-11-27 13:44:31.681] set loglevel-file trace
[2018-11-27 13:44:41.496] set loglevel-file debug
[2018-11-27 13:44:44.328] set loglevel-file info
[2018-11-27 13:44:46.088] set loglevel-file warning
[2018-11-27 13:44:47.968] set loglevel-file error
[2018-11-27 13:44:48.104] set loglevel-file critical
[2018-11-27 13:44:57.776] set loglevel-file off
|
Individual | up | activate |
[2018-11-27 13:50:29.151] up DR-1-3-c73-p2-c73-p1 success
|
down | inactivate |
[2018-11-27 13:46:37.141] down DR-1-3-c73-p2-c73-p1 success
|
accept | IP Accept 결과 |
[2018-11-27 13:50:29.659] drx_accept DR-1-3-c73-p2-c73-p1 31.1.1.192:33476
[2018-11-27 13:50:34.298] drbd_accept DR-1-3-c73-p2-c73-p1 31.1.1.164:40557
|
conn | connection status |
[2018-11-27 14:23:39.120] acceptor_state DR-1-3-c73-p2-c73-p1 bridging
[2018-11-27 14:23:39.121] connector_state DR-1-3-c73-p2-c73-p1 bridging
[2018-11-27 14:23:39.123] connector_state DR-1-3-c73-p2-c73-p1 bridged
[2018-11-27 14:23:39.222] connector_state DR-1-3-c73-p2-c73-p1 connecting
[2018-11-27 14:23:39.328] acceptor_state DR-1-3-c73-p2-c73-p1 bridged
[2018-11-27 14:23:39.422] acceptor_state DR-1-3-c73-p2-c73-p1 waiting
[2018-11-27 14:23:43.960] acceptor_state DR-1-3-c73-p2-c73-p1 connected
[2018-11-27 14:23:43.960] acceptor_state DR-1-3-c73-p2-c73-p1 establishing
[2018-11-27 14:23:44.038] acceptor_state DR-1-3-c73-p2-c73-p1 established
[2018-11-27 14:23:44.069] connector_state DR-1-3-c73-p2-c73-p1 establishing
[2018-11-27 14:23:44.069] connector_state DR-1-3-c73-p2-c73-p1 established
|
set | compressor |
[2018-11-27 15:27:26.895] set DR-1-3-c73-p2-c73-p1 compressor NONE
[2018-11-27 15:27:50.308] set DR-1-3-c73-p2-c73-p1 compressor LZ4 1
[2018-11-27 15:30:34.584] set DR-1-3-c73-p2-c73-p1 compressor ZLIB 1
[2018-11-27 17:48:31.204] set DR-1-3-c73-p2-c73-p1 compressor IQA 1
|
crypto |
[2018-11-27 17:50:32.851] set DR-1-3-c73-p2-c73-p1 crypto OPENSSL
[2018-11-27 17:50:46.264] set DR-1-3-c73-p2-c73-p1 crypto NONE
|
Bandwidth |
[2018-11-27 17:56:07.698] set DR-1-3-c73-p2-c73-p1 bwlimit 1073741824
[2018-11-27 17:58:12.380] set DR-1-3-c73-p2-c73-p1 bwlimit 104857600
|
reset | reset statistics |
[2018-11-27 17:58:52.962] reset DR-1-3-c73-p2-c73-p1 success
|
packet | transmit / receive failure |
[2018-11-28 11:12:19.953] packet DR-1-3-c73-p2-c73-p1 receive_fail 15 15
|
compress | Prints the failure. |
[2018-11-28 09:43:04.543] compress DR-1-3-c73-p2-c73-p1 compress_fail 80 1048576 0
[2018-11-28 10:28:30.629] compress DR-1-3-c73-p1-c73-p2 decompress_fail 47 1048576 0
|
crypto | Prints the failure. |
[2018-11-28 10:28:42.186] crypto DR-2-3-c73-p2-c73-p1 encrypto_fail 41 1048576 48
[2018-11-28 10:28:42.081] crypto DR-2-3-c73-p1-c73-p2 decrypto_fail 96 1048576 80
|