RocketMQ 运维指令

1.1. 控制台使用

RocketMQ 提供有控制台及一系列控制台命令,用于管理员对主题,集群,broker 等信息的管理

登录控制台

首先进入RocketMQ 工程,进入/RocketMQ/bin

在该目录下有个mqadmin 脚本

查看帮助

在mqadmin 下可以查看有哪些命令

sh mqadmin

查看具体命令的使用(以具体实现类为准)

sh mqadmin help 命令名称

例如,查看updateTopic 的使用

sh mqadmin help updateTopic

C. 详细命令

0.1. help

类路径com.alibaba.rocketmq.tools.command.MQAdminStartup


Option


OptionValue


Detail


-h


help


Print help

e.g. sh mqadmin

e.g. sh mqadmin topicList -h

e.g. sh mqadmin help topicList

0.2. System.setProperty(MixAll.NAMESRV_ADDR_PROPERTY, namesrvAddr);

类路径com.alibaba.rocketmq.tools.command.MQAdminStartup


Option


OptionValue


Detail


-n


namesrvAddr


Name server address list, eg: 192.168.0.1:9876;192.168.0.2:9876

备注:-n 指定多个地址时需要用双引号,如 -n “10.128.2.22:9876;172.16.50.238:9876”

原因:linux系统下分号连接两个命令,如果不使用会导致以下错误

错误:-bash: 172.16.50.238:9876: command not found

1.1. Fetch all topic list from name server

指令 topicList

类路径 com.alibaba.rocketmq.tools.command.topic.TopicListSubCommand


Option


OptionValue


Detail


-c


clusterModel


clusterModel

e.g. sh mqadmin topicList -c -n 172.16.50.238:9876

执行结果:

#Cluster Name         #Topic                                            #Consumer Group

DefaultCluster        MMSI_TOPIC                                        MMSI_LOGONCONSUMER_GROUP

DefaultCluster        BenchmarkTest

DefaultCluster        OFFSET_MOVED_EVENT                                __MONITOR_CONSUMER

DefaultCluster        TopicTest

DefaultCluster        broker-a

DefaultCluster        TBW102

DefaultCluster        SELF_TEST_TOPIC

DefaultCluster        DefaultCluster

1.2. Update or create topic

指令 updateTopic

类路径 com.alibaba.rocketmq.tools.command.topic.UpdateTopicSubCommand


Option


OptionValue


Detail


-b


brokerAddr


create subscription group to which broker


-c


clusterName


create subscription group to which cluster


-t


topic


topic name


-r


readQueueNums


set read queue nums


-w


writeQueueNums


set write queue nums


-p


perm


set topic‘s permission(2|4|6), intro[2:R; 4:W; 6:RW]


-o


order


set topic‘s order(true|false


-u


unit


is unit topic (true|false


-s


hasUnitSub


has unit sub (true|false

e.g. sh mqadmin updateTopic -b 172.16.50.238:10911 -t test

运行结果:

create topic to 172.16.50.238:10911 success.

TopicConfig [topicName=test, readQueueNums=8, writeQueueNums=8, perm=RW-, topicFilterType=SINGLE_TAG, topicSysFlag=0, order=false]

查询brokerAddr 见指令 clusterList

查询 topic 见指令 topicList

-b -c 二选一,见具体类文件。

1.3. Delete topic from broker and NameServer.

指令 deleteTopic

类路径 com.alibaba.rocketmq.tools.command.topic.DeleteTopicSubCommand


Option


OptionValue


Detail


-t


topic


topic name


-c


clusterName


delete topic from which cluster

查询clusterName 见指令 clusterList

查询 topic 见指令 topicList

e.g. sh mqadmin deleteTopic -t test -c DefaultCluster -n 172.16.50.238:9876

执行结果:

delete topic [test] from cluster [DefaultCluster] success.

delete topic [test] from NameServer success.

1.4. Examine topic route info

指令 topicRoute

类路径 com.alibaba.rocketmq.tools.command.topic.TopicRouteSubCommand


Option


OptionValue


Detail


-t


topic


topic name

e.g. sh mqadmin topicRoute -t TopicTest -n 172.16.50.238:9876

执行结果:

{

"brokerDatas":[

{

"brokerAddrs":{0:"172.16.50.238:10911"

},

"brokerName":"broker-a"

}

],

"filterServerTable":{},

"queueDatas":[

{

"brokerName":"broker-a",

"perm":6,

"readQueueNums":4,

"topicSynFlag":0,

"writeQueueNums":4

}

]

}

1.5. Examine topic Status info

指令 topicStatus

类路径com.alibaba.rocketmq.tools.command.topic.TopicStatusSubCommand


Option


OptionValue


Detail


-t


topic


topic name

e.g. sh mqadmin topicStatus -t TopicTest -n 172.16.50.238:9876

#Broker Name                     #QID  #Min Offset            #Max Offset               #Last Updated

broker-a                          0     0                     3275                    2015-05-06 13:06:56,990

broker-a                          1     0                     3270                    2015-05-06 13:00:01,439

broker-a                          2     0                     3270                    2015-05-06 13:00:01,469

broker-a                          3     0                     3270                    2015-05-06 13:00:01,499

1.6. Create or update or delete order conf

指令 updateOrderConf

类路径com.alibaba.rocketmq.tools.command.topic.UpdateOrderConfCommand


Option


OptionValue


Detail


-t


topic


topic name


-v


orderConf


set order conf [eg. brokerName1:num;brokerName2:num]


-m


method


option type [eg. put|get|delete

e.g. sh mqadmin updateOrderConf -t TopicTest -m delete -n 172.16.50.238:9876

2.1. Update or create subscription group

指令 updateSubGroup

类路径 com.alibaba.rocketmq.tools.command.consumer.UpdateSubGroupSubCommand


Option


OptionValue


Detail


-b


brokerAddr


create subscription group to which broker


-c


clusterName


create subscription group to which cluster


-g


groupName


consumer group name


-s


consumeEnable


consume enable


-m


consumeFromMinEnable


from min offset


-d


consumeBroadcastEnable


broadcast


-q


retryQueueNums


retry queue nums


-r


retryMaxTimes


retry max times


-i


brokerId


consumer from which broker id


-w


whichBrokerWhenConsumeSlowly


which broker id when consume slowly

2.2. Delete subscription group from broker.

指令 deleteSubGroup

类路径 com.alibaba.rocketmq.tools.command.consumer.DeleteSubscriptionGroupCommand


Option


OptionValue


Detail


-b


brokerAddr


delete subscription group from which broker


-c


clusterName


delete subscription group from which cluster


-g


groupName


subscription group name

2.3. Query consumers‘s progress, speed

指令 consumerProgress

类路径com.alibaba.rocketmq.tools.command.consumer.ConsumerProgressSubCommand


Option


OptionValue


Detail


-g


groupName


consumer group name

e.g. sh mqadmin consumerProgress -g MMSI_LOGONCONSUMER_GROUP -n 172.16.50.238:9876

执行结果:

#Topic                            #Broker Name                      #QID  #Broker Offset        #Consumer Offset      #Diff

MMSI_TOPIC                        broker-a                          0     12                    12                    0

MMSI_TOPIC                        broker-a                          1     4                     4                     0

MMSI_TOPIC                        broker-a                          2     3                     3                     0

MMSI_TOPIC                        broker-a                          3     3                     3                     0

Consume TPS: 0

Diff Total: 0

2.4. Query consumer‘s internal data structure

指令 consumerStatus

类路径com.alibaba.rocketmq.tools.command.consumer.ConsumerProgressSubCommand


Option


OptionValue


Detail


-g


groupName


consumer group name

e.g. sh mqadmin consumerStatus -g MMSI_LOGONCONSUMER_GROUP -n 172.16.50.238:9876

执行结果:

001  [email protected]_C1_1430928642588        V3_2_4_SNAPSHOT      1430984926124/[email protected]_C1_1430928642588

002  [email protected]_C2_1430928728896        V3_2_4_SNAPSHOT      1430984926124/[email protected]_C2_1430928728896

2.5. Start Monitoring

指令 startMonitoring

类路径com.alibaba.rocketmq.tools.command.consumer.StartMonitoringSubCommand


Option


OptionValue


Detail

3.1. Update broker‘s config

指令 updateBrokerConfig

类路径com.alibaba.rocketmq.tools.command.broker.UpdateBrokerConfigSubCommand


Option


OptionValue


Detail


-b


brokerAddr


update which broker


-c


clusterName


update which cluster


-k


key


config key


-v


value


config value

3.2. Fetch broker runtime status data

指令 brokerStatus

类路径com.alibaba.rocketmq.tools.command.broker.BrokerStatusSubCommand


Option


OptionValue


Detail


-b


brokerAddr


Broker address

e.g. sh mqadmin brokerStatus -b 172.16.50.238:10911

执行结果:

bootTimestamp                   : 1430977761125

brokerVersion                   : 74

brokerVersionDesc               : V3_2_4_SNAPSHOT

commitLogDiskRatio              : 0.057690158621641695

commitLogMaxOffset              : 1828298

commitLogMinOffset              : 0

consumeQueueDiskRatio           : 0.057690158621641695

dispatchMaxBuffer               : 0

getFoundTps                     : 0.0 0.0 0.0

getMessageEntireTimeMax         : 2

getMissTps                      : 1.996007984031936 1.9958751912713726 1.995861912967115

getTotalTps                     : 1.996007984031936 1.9958751912713726 1.995861912967115

getTransferedTps                : 0.0 0.0 0.0

msgGetTotalTodayMorning         : 0

msgGetTotalTodayNow             : 22

msgGetTotalYesterdayMorning     : 0

msgPutTotalTodayMorning         : 0

msgPutTotalTodayNow             : 0

msgPutTotalYesterdayMorning     : 0

putMessageAverageSize           : 0.0

putMessageDistributeTime        :

0(0.0%)

0(0.0%)

0(0.0%)

0(0.0%)

0(0.0%)

0(0.0%)

0(0.0%)

putMessageEntireTimeMax         : 0

putMessageSizeTotal             : 0

putMessageTimesTotal            : 1

putTps                          : 0.0 0.0 0.0

runtime                         : [ 0 days, 2 hours, 3 minutes, 44 seconds ]

sendThreadPoolQueueCapacity     : 100000

sendThreadPoolQueueSize         : 0

3.3. Clean expired ConsumeQueue on broker.

指令 cleanExpiredCQ

类路径com.alibaba.rocketmq.tools.command.broker.CleanExpiredCQSubCommand


Option


OptionValue


Detail


-b


brokerAddr


Broker address


-c


cluster


clustername

4.1. Query Message by Id

指令 queryMsgById

类路径com.alibaba.rocketmq.tools.command.message.QueryMsgByIdSubCommand


Option


OptionValue


Detail


-i


msgId


Message Id


-g


consumerGroup


consumer group name


-d


clientId


The consumer‘s client id

e.g. sh mqadmin queryMsgById -i AC1032EE00002A9F00000000001BE5CA -n 172.16.50.238:9876

执行结果:

Topic:               TopicTest

Tags:                [TagA]

Keys:                [null]

Queue ID:            0

Queue Offset:        3275

CommitLog Offset:    1828298

Reconsume Times:     0

Born Timestamp:      2015-05-07 16:04:45,282

Store Timestamp:     2015-05-07 16:04:29,589

Born Host:           172.16.10.103:64888

Store Host:          172.16.50.238:10911

System Flag:         0

Properties:          {WAIT=true, TAGS=TagA}

Message Body Path:   /tmp/rocketmq/msgbodys/AC1032EE00002A9F00000000001BE5CA

4.2. Query Message by Key

指令 queryMsgByKey

类路径com.alibaba.rocketmq.tools.command.message.QueryMsgByKeySubCommand


Option


OptionValue


Option


-t


topic


topic name


-k


msgKey


Message Key

e.g. sh mqadmin queryMsgByKey -t TopicTest -k key1 -n 172.16.50.238:9876

执行结果:

#Message ID                                            #QID                                  #Offset

AC1032EE00002A9F00000000001BE652                      0                                     3276

消息发送部分代码:

// new Message(String topic, String tags, String keys, byte[] body)

Message msg = new Message("TopicTest",

"TagA",

"key1",

("Hello RocketMQ " + i).getBytes()

);

4.3. Query Message by offset

指令 queryMsgByOffset

类路径com.alibaba.rocketmq.tools.command.message.QueryMsgByOffsetSubCommand


Option


OptionValue


Detail


-t


topic


topic name


-b


brokerName


Broker Name


-i


queueId


Queue Id


-o


offset


Queue Offset

e.g. sh mqadmin  queryMsgByOffset -t TopicTest -b broker-a -i 0 -o 3275 -n 172.16.50.238:9876

执行结果:

Topic:               TopicTest

Tags:                [TagA]

Keys:                [null]

Queue ID:            0

Queue Offset:        3275

CommitLog Offset:    1828298

Reconsume Times:     0

Born Timestamp:      2015-05-07 16:04:45,282

Store Timestamp:     2015-05-07 16:04:29,589

Born Host:           172.16.10.103:64888

Store Host:          172.16.50.238:10911

System Flag:         0

Properties:          {WAIT=true, TAGS=TagA}

Message Body Path:   /tmp/rocketmq/msgbodys/AC1032EE00002A9F00000000001BE5CA

4.4. Check Message Store

指令 checkMsg

类路径com.alibaba.rocketmq.tools.command.message.CheckMsgSubCommand


Option


OptionValue


Detail


-p


cStorePath


cStorePath


-s


cSize


cSize


-l


lStorePath


lStorePath


-z


lSize


lSize

4.5. Print Message Detail

指令 printMsg

类路径com.alibaba.rocketmq.tools.command.message.PrintMessageSubCommand


Option


OptionValue


Detail


-t


topic


topic name


-c


charsetName


CharsetName(eg: UTF-8、GBK)


-s


subExpression


Subscribe Expression(eg: TagA || TagB)


-b


beginTimestamp


Begin timestamp[currentTimeMillis|yyyy-MM-dd#HH:mm:ss:SSS]


-e


endTimestamp


End timestamp[currentTimeMillis|yyyy-MM-dd#HH:mm:ss:SSS]

e.g. sh mqadmin printMsg -t TopicTest -c UTF-8 -s TagA -n 172.16.50.238:9876

执行结果:

MSGID: AC1032EE00002A9F0000000000000198 MessageExt [queueId=3, storeSize=136, queueOffset=0, sysFlag=0, bornTimestamp=1430276116906, bornHost=/172.16.10.103:18048, storeTimestamp=1430276075650, storeHost=/172.16.50.238:10911, msgId=AC1032EE00002A9F0000000000000198, commitLogOffset=408, bodyCRC=1032136437, reconsumeTimes=0, preparedTransactionOffset=0, toString()=Message [topic=TopicTest, flag=0, properties={MIN_OFFSET=0, MAX_OFFSET=3270, WAIT=true, TAGS=TagA}, body=16]] BODY: Hello RocketMQ 3

MSGID: AC1032EE00002A9F00000000000003B8 MessageExt [queueId=3, storeSize=136, queueOffset=1, sysFlag=0, bornTimestamp=1430276117046, bornHost=/172.16.10.103:18048, storeTimestamp=1430276075794, storeHost=/172.16.50.238:10911, msgId=AC1032EE00002A9F00000000000003B8, commitLogOffset=952, bodyCRC=988340972, reconsumeTimes=0, preparedTransactionOffset=0, toString()=Message [topic=TopicTest, flag=0, properties={MIN_OFFSET=0, MAX_OFFSET=3270, WAIT=true, TAGS=TagA}, body=16]] BODY: Hello RocketMQ 7

MSGID: AC1032EE00002A9F00000000000005D9 MessageExt [queueId=3, storeSize=137, queueOffset=2, sysFlag=0, bornTimestamp=1430276117187, bornHost=/172.16.10.103:18048, storeTimestamp=1430276075930, storeHost=/172.16.50.238:10911, msgId=AC1032EE00002A9F00000000000005D9, commitLogOffset=1497, bodyCRC=2088767104, reconsumeTimes=0, preparedTransactionOffset=0, toString()=Message [topic=TopicTest, flag=0, properties={MIN_OFFSET=0, MAX_OFFSET=3270, WAIT=true, TAGS=TagA}, body=17]] BODY: Hello RocketMQ 11

MSGID: AC1032EE00002A9F00000000000007FD MessageExt [queueId=3, storeSize=137, queueOffset=3, sysFlag=0, bornTimestamp=1430276117312, bornHost=/172.16.10.103:18048, storeTimestamp=1430276076058, storeHost=/172.16.50.238:10911, msgId=AC1032EE00002A9F00000000000007FD, commitLogOffset=2045, bodyCRC=2079181465, reconsumeTimes=0, preparedTransactionOffset=0, toString()=Message [topic=TopicTest, flag=0, properties={MIN_OFFSET=0, MAX_OFFSET=3270, WAIT=true, TAGS=TagA}, body=17]] BODY: Hello RocketMQ 15

省略

5.1. Query producer‘s socket connection and client version

指令 producerConnection

类路径com.alibaba.rocketmq.tools.command.connection.ProducerConnectionSubCommand


Option


OptionValue


Detail


-g


producerGroup


producer group name


-t


topic


topic name

e.g. sh mqadmin producerConnection -t MMSI_TOPIC -g MMSI_LOGONPRODUCER_GROUP -n 10.128.2.22:9876

执行结果:

0001  [email protected]_P_1430929646654 10.128.2.21:32772      JAVA     V3_2_4_SNAPSHOT

0002  [email protected]_P_1430929321115 10.128.2.20:46473      JAVA     V3_2_4_SNAPSHOT

0003  [email protected]_P_1430929575217 10.128.2.21:60998      JAVA     V3_2_4_SNAPSHOT

0004  [email protected]_P_1430931090492 10.128.2.19:37579      JAVA     V3_2_4_SNAPSHOT

0005  [email protected]_P_1430930993253 10.128.2.19:37555      JAVA     V3_2_4_SNAPSHOT

0006  [email protected]_P_1430928908940 10.128.2.18:59844      JAVA     V3_2_4_SNAPSHOT

0007  [email protected]_P_1430928940356 10.128.2.18:59872      JAVA     V3_2_4_SNAPSHOT

0008  [email protected]_P_1430928637687 10.128.2.17:52707      JAVA     V3_2_4_SNAPSHOT

0009  [email protected]_P_1430929358523 10.128.2.20:46690      JAVA     V3_2_4_SNAPSHOT

0010  [email protected]_P_1430928722339 10.128.2.17:52634      JAVA     V3_2_4_SNAPSHOT

5.2. Query consumer‘s socket connection, client version and subscription

指令 consumerConnection

类路径com.alibaba.rocketmq.tools.command.connection.ConsumerConnectionSubCommand


Option


OptionValue


Detail


-g


consumerGroup


consumer group name

e.g. sh mqadmin consumerConnection -g MMSI_LOGONCONSUMER_GROUP -n 10.128.2.22:9876

执行结果:

001  [email protected]_C2_1430928643191 10.128.2.17:52732      JAVA     V3_2_4_SNAPSHOT

002  [email protected]_C1_1430929651766 10.128.2.21:32773      JAVA     V3_2_4_SNAPSHOT

003  [email protected]_C1_1430929363864 10.128.2.20:46711      JAVA     V3_2_4_SNAPSHOT

004  [email protected]_C1_1430931095730 10.128.2.19:36999      JAVA     V3_2_4_SNAPSHOT

005  [email protected]_C1_1430928913978 10.128.2.18:59867      JAVA     V3_2_4_SNAPSHOT

006  [email protected]_C2_1430929327217 10.128.2.20:46535      JAVA     V3_2_4_SNAPSHOT

007  [email protected]_C1_1430930998362 10.128.2.19:37557      JAVA     V3_2_4_SNAPSHOT

008  [email protected]_C2_1430929581143 10.128.2.21:61000      JAVA     V3_2_4_SNAPSHOT

009  [email protected]_C2_1430928914953 10.128.2.18:59899      JAVA     V3_2_4_SNAPSHOT

010  [email protected]_C1_1430928642588 10.128.2.17:52727      JAVA     V3_2_4_SNAPSHOT

011  [email protected]_C1_1430928727537 10.128.2.17:52670      JAVA     V3_2_4_SNAPSHOT

012  [email protected]_C2_1430928946637 10.128.2.18:59939      JAVA     V3_2_4_SNAPSHOT

013  [email protected]_C2_1430928728896 10.128.2.17:52696      JAVA     V3_2_4_SNAPSHOT

014  [email protected]_C1_1430929580732 10.128.2.21:60999      JAVA     V3_2_4_SNAPSHOT

015  [email protected]_C1_1430928945559 10.128.2.18:59905      JAVA     V3_2_4_SNAPSHOT

016  [email protected]_C1_1430929326429 10.128.2.20:46474      JAVA     V3_2_4_SNAPSHOT

017  [email protected]_C2_1430930998829 10.128.2.19:37556      JAVA     V3_2_4_SNAPSHOT

018  [email protected]_C2_1430929652131 10.128.2.21:32774      JAVA     V3_2_4_SNAPSHOT

019  [email protected]_C2_1430931095854 10.128.2.19:37000      JAVA     V3_2_4_SNAPSHOT

020  [email protected]_C2_1430929364329 10.128.2.20:46720      JAVA     V3_2_4_SNAPSHOT

Below is subscription:

001  Topic: MMSI_TOPIC                               SubExpression: MMSI_USERLOGON_TAG

002  Topic: %RETRY%MMSI_LOGONCONSUMER_GROUP          SubExpression: *

ConsumeType: CONSUME_PASSIVELY

MessageModel: CLUSTERING

ConsumeFromWhere: CONSUME_FROM_FIRST_OFFSET

6.1. List all of clusters

指令 clusterList

类路径com.alibaba.rocketmq.tools.command.cluster.ClusterListSubCommand


Option


OptionValue


Detail


-m


moreStats


Print more stats

e.g. sh mqadmin clusterList -m -n 172.16.50.238:9876

执行结果:

#Cluster Name     #Broker Name      #InTotalYest     #OutTotalYest   #InTotalToday   #OutTotalToday

DefaultCluster    broker-a                     0                0             2            9292

7.1. Create or update KV config.

指令 updateKvConfig

类路径com.alibaba.rocketmq.tools.command.namesrv.UpdateKvConfigCommand


Option


OptionValue


Detail


-s


namespace


set the namespace


-k


key


set the key name


-v


value


set the key value

7.2. Delete KV config.

指令 deleteKvConfig

类路径com.alibaba.rocketmq.tools.command.namesrv.DeleteKvConfigCommand


Option


OptionValue


Detail


-s


namespace


set the namespace


-k


key


set the key name

7.2. Create or update project group by server ip.

指令 updateProjectGroup

类路径 com.alibaba.rocketmq.tools.command.namesrv.UpdateProjectGroupCommand


Option


OptionValue


Detail


-i


ip


set the server ip


-p


project


set the project group

7.3. Delete project group by server ip.

指令 deleteProjectGroup

类路径com.alibaba.rocketmq.tools.command.namesrv.DeleteProjectGroupCommand


Option


OptionValue


Detail


-i


ip


set the server ip


-p


project


set the project group

7.4. Get project group by server ip or project group name.

指令 getProjectGroup

类路径com.alibaba.rocketmq.tools.command.namesrv.GetProjectGroupCommand


Option


OptionValue


Detail


-i


ip


set the server ip


-p


project


set the project group

7.5. Wipe write perm of broker in all name server

指令 wipeWritePerm

类路径com.alibaba.rocketmq.tools.command.namesrv.WipeWritePermSubCommand


Option


OptionValue


Detail


-b


brokerName


broker name

8.1. Reset consumer offset by timestamp(without client restart).

指令 resetOffsetByTime

类路径com.alibaba.rocketmq.tools.command.offset.ResetOffsetByTimeCommand


Option


OptionValue


Detail


-g


group


set the consumer group


-t


topic


set the topic


-s


timestamp


set the timestamp[currentTimeMillis|yyyy-MM-dd#HH:mm:ss:SSS]


-f


force


set the force rollback by timestamp switch[true|false]

8.2. Reset consumer offset by timestamp(execute this command required client restart).

指令 resetOffsetByTime

类路径com.alibaba.rocketmq.tools.command.offset.ResetOffsetByTimeCommand


Option


OptionValue


Detail


-g


group


set the consumer group


-t


topic


set the topic


-s


timestamp


set the timestamp[currentTimeMillis|yyyy-MM-dd#HH:mm:ss:SSS]


-f


force


set the force rollback by timestamp switch[true|false]

8.3. get consumer status from client.

指令 getConsumerStatus

类路径 com.alibaba.rocketmq.tools.command.offset.GetConsumerStatusCommand


Option


OptionValue


Detail


-g


group


set the consumer group


-t


topic


set the topic


-i


originClientId


set the consumer clientId

8.4. clone offset from other group.

指令 cloneGroupOffset

类路径 com.alibaba.rocketmq.tools.command.offset.CloneGroupOffsetCommand


Option


OptionValue


Detail


-s


srcGroup


set source consumer group


-d


destGroup


set destination consumer group


-t


topic


set the topic


-o


offline


the group or the topic is offline

时间: 2024-11-04 23:40:30

RocketMQ 运维指令的相关文章

ZooKeeper运维指令

服务的启动与停止: 找到 %zkHome%\bin 目录,通过该目录下的zkServer.sh启动 zkServer.sh start停止 zkServer.sh stop重启 zkServer.sh restart查看ZK服务状态 zkServer.sh status zk客户端命令: ZooKeeper命令行工具类似于Linux的shell环境,不过功能肯定不及shell啦,但 是使用它我们可以简单的对ZooKeeper进行访问,数据创建,数据修改等操作.  使用 zkCli.sh -ser

KVM常用运维指令

0.取虚拟机名字 virsh list | awk '{print $2}' 1.虚拟机配置路径:/etc/libvirt/qemu 2.创建硬盘 qemu-img create /home/kvm/123.img 5G 3.创建虚拟机 virt-install \ --name=Winxp \ --ram 512 \ --vcpus=2 \ -f /home/123.img \ --cdrom /home/acton-systemvm-02062012.qcow2.bz2 \ --graphi

linux运维指令

网络连通性判断工具 mtr -r www.sina.com.cn 后台启动jar nohup java -jar xx.jar & 查看启动的任务 ps aux 查看具体执行情况 ps aux | grep job 名称 直观top -p pid 其中res列为内存占用,与ps列出的一致 强制关闭进程  kill -9 111 (强制关闭pid为111的进程) 查看job任务  ps -ef | grep xxJob 服务器跳转 sudo ssh -p port [email protected

java精品高级架构课,RocketMQ中间件,Mysql分布式集群,服务架构,运维架构视频教程

14套java精品高级架构课,缓存架构,深入Jvm虚拟机,全文检索Elasticsearch,Dubbo分布式Restful 服务,并发原理编程,SpringBoot,SpringCloud,RocketMQ中间件,Mysql分布式集群,服务架构,运 维架构视频教程 14套精品课程介绍: 1.14套精 品是最新整理的课程,都是当下最火的技术,最火的课程,也是全网课程的精品: 2.14套资 源包含:全套完整高清视频.完整源码.配套文档: 3.知识也 是需要投资的,有投入才会有产出(保证投入产出比是

Linux系统运维与架构设计

一 本章概览 介绍Linux系统运维与架构设计的方方面面 二 Linux基础入门 认识计算机核心硬件和服务器 Linux发展历史.系统组成.应用领域以及发行版 搭建运维环境:VMWareWorkStation.SecureCRT的使用 Linux系统的基本使用 Shell入门以及命令概述 三 Linux系统管理 文件目录管理 用户管理 权限管理 VIM编辑器的使用 文档压缩打包 程序包管理 网络管理 文件系统管理 内存管理 系统管理(监控.环境变量) 安全管理(selinux,iptables)

Linux运维常用命令

Linux运维常用的150个命令 命令 功能说明 线上查询及帮助命令(2个) man 查看命令帮助,命令的词典,更复杂的还有info,但不常用. help 查看Linux内置命令的帮助,比如cd命令. 文件和目录操作命令(18个) ls 全拼list,功能是列出目录的内容及其内容属性信息. cd 全拼change directory,功能是从当前工作目录切换到指定的工作目录. cp 全拼copy,其功能为复制文件或目录. find 查找的意思,用于查找目录及目录下的文件. mkdir 全拼mak

运维学习第四弹

运维学习第四弹之shell(bash): 一. hell可以翻译成壳,大多指能够对内部核心起到保护作用的一种装置或结构.在计算机科学中shell的实际意义为操作者提供的.能够通过系统调用或库调用使用整个计算机资源的访问接口. 它既是一种命令解析器又是一种程序设计语言.作为命令解析器,它可以解释和执行用户输入的命令,也可以自动地解释和执行预先编写好并保存在某个文本文件中的一系列的命令:作为程序设计语言,shell特别定义了各种变量和参数,并提供了许多在高级语言中才具有的控制结构,包括循环和条件分支

让运维工程师不再蓝瘦、香菇

最近广西一小哥失恋后录的视频风靡互联网,也让"蓝瘦.香菇"这两个词火了一把.虽然原故事男主角是因为失恋才蓝瘦.香菇,但想想作为运维"狗"的我们也时常因强大的工作压力而蓝瘦,常常在晚上睡得香呼呼的时候因为要处理故障从温暖的被窝爬起来,看着铝朋友鄙视的眼神,真的好香菇--本来作为技术大牛的我们,工作应该是很酷的事情,享受的应该是小白美铝们崇拜的眼神,可现在却那么苦逼,天天被应用上线.系统巡检.故障排除这些琐事缠身,想想都蓝瘦!我们怎么样才能重获崇拜,有更多的时间陪伴家人

自动化运维工具之ansible的简单应用

ansible: ansible是新出现的自动化运维工具,基于Python开发,集合了众多运维工具(puppet.cfengine.chef.func.fabric)的优点,实现了批量系统配置.批量程序部署.批量运行命令等功能.ansible是基于模块工作的,本身没有批量部署的能力.真正具有批量部署的是ansible所运行的模块,例如shell,copy,ping等,ansible只是提供一种框架.ansible的主要特性: 模块化:调用特定的模块,完成特定任务 基于Python语言实现,由Pa