| <!doctype html> |
| <html lang="en" class="no-js"> |
| <head> |
| <meta charset="utf-8"> |
| |
| <!-- begin SEO --> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <title>CLI Admin Tool - Apache RocketMQ</title> |
| |
| |
| |
| |
| <meta name="description" content="RocketMQ provides a CLI admin tool belt to query, manage and diagnose various issues."> |
| |
| |
| |
| |
| <meta property="og:locale" content="en"> |
| <meta property="og:site_name" content="Apache RocketMQ"> |
| <meta property="og:title" content="CLI Admin Tool"> |
| |
| |
| |
| |
| <meta property="og:description" content="RocketMQ provides a CLI admin tool belt to query, manage and diagnose various issues."> |
| |
| |
| |
| <meta name="twitter:site" content="@ApacheRocketMQ"> |
| <meta name="twitter:title" content="CLI Admin Tool"> |
| <meta name="twitter:description" content="RocketMQ provides a CLI admin tool belt to query, manage and diagnose various issues."> |
| <meta name="twitter:url" content=""> |
| |
| |
| <meta name="twitter:card" content="summary"> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <meta property="og:type" content="article"> |
| <meta property="article:published_time" content="2019-11-01T15:11:41+08:00"> |
| |
| |
| |
| |
| |
| |
| |
| |
| <script type="application/ld+json"> |
| { |
| "@context" : "http://schema.org", |
| "@type" : "Person", |
| "name" : "Apache RocketMQ", |
| "url" : null, |
| "sameAs" : null |
| } |
| </script> |
| |
| |
| |
| <meta name="google-site-verification" content="aand0XZkSGsziuC-UPD4ZJniFD0m0JhGx6820y2mAQY" /> |
| |
| |
| <meta name="baidu-site-verification" content="wD06EbDRkQ" /> |
| |
| |
| |
| |
| <!-- end SEO --> |
| |
| |
| <link href="/feed.xml" type="application/atom+xml" rel="alternate" title="Apache RocketMQ Feed"> |
| |
| <!-- http://t.co/dKP3o1e --> |
| <meta name="HandheldFriendly" content="True"> |
| <meta name="MobileOptimized" content="320"> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| |
| <script> |
| document.documentElement.className = document.documentElement.className.replace(/\bno-js\b/g, '') + ' js '; |
| </script> |
| |
| <!-- For all browsers --> |
| <link rel="stylesheet" href="/assets/css/main.css"> |
| |
| <meta http-equiv="cleartype" content="on"> |
| <!-- start custom head snippets --> |
| |
| <!-- insert favicons. use http://realfavicongenerator.net/ --> |
| |
| <!-- end custom head snippets --> |
| </head> |
| |
| <body class="layout--single"> |
| |
| <!--[if lt IE 9]> |
| <div class="notice--danger align-center" style="margin: 0;">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</div> |
| <![endif]--> |
| <div class="masthead"> |
| <div class="masthead__inner-wrap"> |
| <div class="masthead__menu"> |
| <nav id="site-nav" class="greedy-nav"> |
| <button><div class="navicon"></div></button> |
| <ul class="visible-links"> |
| <li class="masthead__menu-item masthead__menu-item--lg"><a href="/">Apache RocketMQ</a></li> |
| |
| |
| <li class="masthead__menu-item"><a href="/docs/quick-start/">Documentation</a></li> |
| |
| |
| <li class="masthead__menu-item"><a href="/year-archive/">Blog</a></li> |
| |
| |
| <li class="masthead__menu-item"><a href="/community/">Community</a></li> |
| |
| |
| <li class="masthead__menu-item"><a href="/users/">Users</a></li> |
| |
| |
| <li class="masthead__menu-item"><a href="/about/team/">About</a></li> |
| |
| </ul> |
| <ul class="hidden-links hidden"></ul> |
| </nav> |
| </div> |
| </div> |
| </div> |
| |
| |
| |
| |
| |
| <div id="main" role="main"> |
| |
| <div class="sidebar sticky"> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <nav class="nav__list"> |
| |
| <input id="ac-toc" name="accordion-toc" type="checkbox" /> |
| <label for="ac-toc">Toggle Menu</label> |
| <ul class="nav__items"> |
| |
| <li> |
| |
| <span class="nav__sub-title">User Guide</span> |
| |
| |
| |
| <ul> |
| |
| |
| |
| |
| |
| |
| |
| <li><a href="/docs/motivation/" class="">Why RocketMQ</a></li> |
| |
| |
| |
| |
| |
| |
| |
| <li><a href="/docs/quick-start/" class="">Quick Start</a></li> |
| |
| |
| |
| |
| |
| |
| |
| <li><a href="/docs/simple-example/" class="">Simple Example</a></li> |
| |
| |
| |
| |
| |
| |
| |
| <li><a href="/docs/order-example/" class="">Order Example</a></li> |
| |
| |
| |
| |
| |
| |
| |
| <li><a href="/docs/broadcast-example/" class="">Broadcasting Example</a></li> |
| |
| |
| |
| |
| |
| |
| |
| <li><a href="/docs/schedule-example/" class="">Schedule Example</a></li> |
| |
| |
| |
| |
| |
| |
| |
| <li><a href="/docs/batch-example/" class="">Batch Example</a></li> |
| |
| |
| |
| |
| |
| |
| |
| <li><a href="/docs/filter-by-sql92-example/" class="">Filter Example</a></li> |
| |
| |
| |
| |
| |
| |
| |
| <li><a href="/docs/logappender-example/" class="">Logappender Example</a></li> |
| |
| |
| |
| |
| |
| |
| |
| <li><a href="/docs/openmessaging-example/" class="">OpenMessaging Example</a></li> |
| |
| |
| |
| |
| |
| |
| |
| <li><a href="/docs/transaction-example/" class="">Transaction Example</a></li> |
| |
| |
| |
| |
| |
| |
| |
| <li><a href="/docs/faq/" class="">FAQ</a></li> |
| |
| </ul> |
| |
| </li> |
| |
| <li> |
| |
| <span class="nav__sub-title">Release Notes</span> |
| |
| |
| |
| <ul> |
| |
| |
| |
| |
| |
| |
| |
| <li><a href="/dowloading/releases/" class="">Download</a></li> |
| |
| </ul> |
| |
| </li> |
| |
| <li> |
| |
| <span class="nav__sub-title">Deployment & Operations</span> |
| |
| |
| |
| <ul> |
| |
| |
| |
| |
| |
| |
| |
| <li><a href="/docs/rmq-arc/" class="">Architecture</a></li> |
| |
| |
| |
| |
| |
| |
| |
| <li><a href="/docs/rmq-deployment/" class="">Deployment</a></li> |
| |
| |
| |
| |
| |
| |
| |
| <li><a href="/docs/cli-admin-tool/" class="active">CLI Admin Tool</a></li> |
| |
| </ul> |
| |
| </li> |
| |
| <li> |
| |
| <span class="nav__sub-title">Contributor Guide</span> |
| |
| |
| |
| <ul> |
| |
| |
| |
| |
| |
| |
| |
| <li><a href="/docs/how-to-contribute/" class="">How To Contribute</a></li> |
| |
| |
| |
| |
| |
| |
| |
| <li><a href="/docs/code-guidelines/" class="">Code Guidelines</a></li> |
| |
| |
| |
| |
| |
| |
| |
| <li><a href="/docs/pull-request/" class="">Manage Pull Request</a></li> |
| |
| |
| |
| |
| |
| |
| |
| <li><a href="/docs/release-manual" class="">Release Manual</a></li> |
| |
| </ul> |
| |
| </li> |
| |
| <li> |
| |
| <span class="nav__sub-title">Best Practice</span> |
| |
| |
| |
| <ul> |
| |
| |
| |
| |
| |
| |
| |
| <li><a href="/docs/core-concept/" class="">Core Concept</a></li> |
| |
| |
| |
| |
| |
| |
| |
| <li><a href="/docs/best-practice-broker/" class="">Broker</a></li> |
| |
| |
| |
| |
| |
| |
| |
| <li><a href="/docs/best-practice-producer/" class="">Producer</a></li> |
| |
| |
| |
| |
| |
| |
| |
| <li><a href="/docs/best-practice-consumer/" class="">Consumer</a></li> |
| |
| |
| |
| |
| |
| |
| |
| <li><a href="/docs/best-practice-namesvr/" class="">NameServer</a></li> |
| |
| |
| |
| |
| |
| |
| |
| <li><a href="/docs/system-config/" class="">JVM/Kernel Config</a></li> |
| |
| </ul> |
| |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| <a href="/docs/roadmap/"><span class="nav__sub-title">RoadMap</span></a> |
| |
| |
| |
| </li> |
| |
| </ul> |
| </nav> |
| |
| |
| </div> |
| |
| |
| <article class="page" itemscope itemtype="http://schema.org/CreativeWork"> |
| <meta itemprop="headline" content="CLI Admin Tool"> |
| <meta itemprop="description" content="RocketMQ provides a CLI admin tool belt to query, manage and diagnose various issues."> |
| |
| <meta itemprop="dateModified" content="December 17, 2016"> |
| |
| <div class="page__inner-wrap"> |
| |
| <header> |
| <h1 class="page__title" itemprop="headline">CLI Admin Tool |
| </h1> |
| |
| </header> |
| |
| |
| <section class="page__content" itemprop="text"> |
| <p>RocketMQ provides a CLI admin tool belt to query, manage and diagnose various issues.</p> |
| |
| <aside class="sidebar__right"> |
| <nav class="toc"> |
| <header><h4 class="nav__title"><i class="fa fa-file-text"></i> On This Page</h4></header> |
| <ul class="toc__menu" id="markdown-toc"> |
| <li><a href="#prerequisite" id="markdown-toc-prerequisite">Prerequisite</a></li> |
| <li><a href="#how-to-get-it" id="markdown-toc-how-to-get-it">How To Get it</a></li> |
| <li><a href="#how-to-use" id="markdown-toc-how-to-use">How to use</a></li> |
| <li><a href="#command-manual" id="markdown-toc-command-manual">Command Manual</a></li> |
| </ul> |
| |
| </nav> |
| </aside> |
| |
| <h1 id="prerequisite">Prerequisite</h1> |
| |
| <p>Make sure you have walked through <a href="/docs/quick-start/">Quick Start</a> and <a href="/docs/core-concept/">Core Concept</a> sections.</p> |
| |
| <h1 id="how-to-get-it">How To Get it</h1> |
| |
| <p>The admin tool is shipped along with RocketMQ. Whether you download a pre-built binary version or build from source by yourself, you have the tool with the package.</p> |
| |
| <p>If you want to look at the source code, please refer to <a href="https://github.com/apache/rocketmq/tree/master/tools">rocketmq-tools module</a></p> |
| |
| <h1 id="how-to-use">How to use</h1> |
| |
| <p>The Admin Tool is very user friendly. Here, for demonstration purpose, *nix environment is assumed.</p> |
| |
| <p>Change directory to ${PACKAGE}/bin, command <code class="highlighter-rouge">bash mqadmin</code>, you should see the following help menu.</p> |
| |
| <div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>The most commonly used mqadmin commands are: |
| updateTopic Update or create topic |
| deleteTopic Delete topic from broker and NameServer. |
| updateSubGroup Update or create subscription group |
| deleteSubGroup Delete subscription group from broker. |
| updateBrokerConfig Update broker's config |
| updateTopicPerm Update topic perm |
| topicRoute Examine topic route info |
| topicStatus Examine topic Status info |
| topicClusterList Get cluster info for topic |
| brokerStatus Fetch broker runtime status data |
| queryMsgById Query Message by Id |
| queryMsgByKey Query Message by Key |
| queryMsgByUniqueKey Query Message by Unique key |
| queryMsgByOffset Query Message by offset |
| queryMsgByUniqueKey Query Message by Unique key |
| printMsg Print Message Detail |
| sendMsgStatus Send msg to broker. |
| brokerConsumeStats Fetch broker consume stats data |
| producerConnection Query producer's socket connection and client version |
| consumerConnection Query consumer's socket connection, client version and subscription |
| consumerProgress Query consumers's progress, speed |
| consumerStatus Query consumer's internal data structure |
| cloneGroupOffset Clone offset from other group. |
| clusterList List all of clusters |
| topicList Fetch all topic list from name server |
| updateKvConfig Create or update KV config. |
| deleteKvConfig Delete KV config. |
| wipeWritePerm Wipe write perm of broker in all name server |
| resetOffsetByTime Reset consumer offset by timestamp(without client restart). |
| updateOrderConf Create or update or delete order conf |
| cleanExpiredCQ Clean expired ConsumeQueue on broker. |
| cleanUnusedTopic Clean unused topic on broker. |
| startMonitoring Start Monitoring |
| statsAll Topic and Consumer tps stats |
| syncDocs Synchronize wiki and issue to github.com |
| allocateMQ Allocate MQ |
| checkMsgSendRT Check message send response time |
| clusterRT List All clusters Message Send RT |
| |
| See 'mqadmin help <command>' for more information on a specific command. |
| </code></pre></div></div> |
| |
| <p>As you see, the most commonly used commands are listed with a brief description. To get detailed manual of each command, <code class="highlighter-rouge">bash mqadmin help <command></code>. For example, command <code class="highlighter-rouge">bash mqadmin help clusterList</code> will bring out the following help text:</p> |
| |
| <div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>usage: mqadmin clusterList [-h] [-i <arg>] [-m] [-n <arg>] |
| -h,--help Print help |
| -i,--interval <arg> specify intervals numbers, it is in seconds |
| -m,--moreStats Print more stats |
| -n,--namesrvAddr <arg> Name server address list, eg: 192.168.0.1:9876;192.168.0.2:9876 |
| </code></pre></div></div> |
| |
| <p>The help text lists possible options and interpretation of each option.</p> |
| |
| <h1 id="command-manual">Command Manual</h1> |
| |
| |
| </section> |
| |
| <footer class="page__meta"> |
| |
| |
| |
| |
| |
| <p class="page__date"><strong><i class="fa fa-fw fa-calendar" aria-hidden="true"></i> Updated:</strong> <time datetime="2016-12-17">December 17, 2016</time></p> |
| |
| </footer> |
| |
| <section class="page__share"> |
| |
| <h4 class="page__share-title">Share on</h4> |
| |
| |
| <a href="https://twitter.com/intent/tweet?via=ApacheRocketMQ&text=CLI Admin Tool /docs/cli-admin-tool/" class="btn btn--twitter" title="Share on Twitter"><i class="fa fa-fw fa-twitter" aria-hidden="true"></i><span> Twitter</span></a> |
| |
| <a href="https://www.facebook.com/sharer/sharer.php?u=/docs/cli-admin-tool/" class="btn btn--facebook" title="Share on Facebook"><i class="fa fa-fw fa-facebook" aria-hidden="true"></i><span> Facebook</span></a> |
| |
| <a href="https://plus.google.com/share?url=/docs/cli-admin-tool/" class="btn btn--google-plus" title="Share on Google Plus"><i class="fa fa-fw fa-google-plus" aria-hidden="true"></i><span> Google+</span></a> |
| |
| <a href="https://www.linkedin.com/shareArticle?mini=true&url=/docs/cli-admin-tool/" class="btn btn--linkedin" title="Share on LinkedIn"><i class="fa fa-fw fa-linkedin" aria-hidden="true"></i><span> LinkedIn</span></a> |
| </section> |
| |
| |
| |
| <nav class="pagination"> |
| |
| <a href="/docs/core-concept/" class="pagination--pager" title="Core Concept |
| ">Previous</a> |
| |
| |
| <a href="/docs/cluster-deployment/" class="pagination--pager" title="Cluster Configuration and Deployment |
| ">Next</a> |
| |
| </nav> |
| |
| </div> |
| |
| |
| <div class="page__comments"> |
| |
| |
| <h4 class="page__comments-title">Leave a Comment</h4> |
| <section id="disqus_thread"></section> |
| |
| </div> |
| |
| </article> |
| |
| |
| |
| </div> |
| |
| <div class="page__footer"> |
| <footer> |
| <!-- start custom footer snippets --> |
| |
| <!-- end custom footer snippets --> |
| <style type="text/css"> |
| div.columns { float: left; margin-left: 10px;} |
| div.clear { clear: both; } |
| </style> |
| <div> |
| <div class="columns"> |
| <a href="https://www.apache.org/"><img src="/assets/images/feather-small.gif" alt="Apache Software Foundation" style="height: 88px !important" /></a> |
| </div> |
| <div class="columns" style="width: 80%"> |
| <div class="page__footer-follow"> |
| <ul class="social-icons"> |
| |
| <li><strong>Follow:</strong></li> |
| |
| |
| <li><a href="https://twitter.com/ApacheRocketMQ"><i class="fa fa-fw fa-twitter-square" aria-hidden="true"></i> Twitter</a></li> |
| |
| |
| |
| <li><a href="https://github.com/apache/rocketmq"><i class="fa fa-fw fa-github" aria-hidden="true"></i> GitHub</a></li> |
| |
| |
| <li><a href="/feed.xml"><i class="fa fa-fw fa-rss-square" aria-hidden="true"></i> Feed</a></li> |
| </ul> |
| </div> |
| |
| <div class="page__footer-copyright">Copyright © 2019 <a href="http://www.apache.org/">The Apache Software Foundation</a>. Licensed under the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0.</a></div> |
| <div class="page__footer-copyright">Apache RocketMQ, RocketMQ, Apache, the Apache feather logo and the Apache RocketMQ logo are trademarks of The Apache Software Foundation.</div> |
| <br> |
| <div class="page__footer-copyright"><a href="https://www.apache.org/licenses/">License</a> | <a href="https://www.apache.org/security/">Security</a> | <a href="https://www.apache.org/foundation/thanks.html">Thanks</a> | <a href="https://www.apache.org/foundation/sponsorship.html">Sponsorship</a></div> |
| <br> |
| <div> |
| <a href="https://www.apache.org/events/current-event.html"> |
| <img src="https://www.apache.org/events/current-event-234x60.png" /> |
| </a> |
| </div> |
| </div> |
| </div> |
| <div class="clear"></div> |
| </footer> |
| </div> |
| |
| <script src="/assets/js/main.min.js"></script> |
| |
| |
| |
| |
| <script> |
| (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ |
| (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), |
| m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) |
| })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); |
| |
| ga('create', 'UA-89603173-1', 'auto'); |
| ga('send', 'pageview'); |
| </script> |
| |
| <script> |
| var _hmt = _hmt || []; |
| (function() { |
| var hm = document.createElement("script"); |
| hm.src = "https://hm.baidu.com/hm.js?36428f2b841d08e7405724cbf7f860d2"; |
| var s = document.getElementsByTagName("script")[0]; |
| s.parentNode.insertBefore(hm, s); |
| })(); |
| </script> |
| |
| |
| |
| |
| |
| <script type="text/javascript"> |
| /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */ |
| var disqus_shortname = 'rocketmq'; |
| |
| /* * * DON'T EDIT BELOW THIS LINE * * */ |
| (function() { |
| var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; |
| dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; |
| (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); |
| })(); |
| |
| /* * * DON'T EDIT BELOW THIS LINE * * */ |
| (function () { |
| var s = document.createElement('script'); s.async = true; |
| s.type = 'text/javascript'; |
| s.src = '//' + disqus_shortname + '.disqus.com/count.js'; |
| (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s); |
| }()); |
| </script> |
| <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> |
| |
| |
| |
| |
| |
| |
| </body> |
| </html> |