You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
arthas/en/thread.html

467 lines
24 KiB
HTML

6 years ago
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
5 years ago
<title>thread &mdash; Arthas 3.1.3 documentation</title>
6 years ago
<link rel="shortcut icon" href="_static/favicon.ico"/>
5 years ago
<script type="text/javascript" src="_static/js/modernizr.min.js"></script>
6 years ago
5 years ago
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
6 years ago
5 years ago
6 years ago
5 years ago
6 years ago
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/overrides.css" type="text/css" />
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="jvm" href="jvm.html" />
<link rel="prev" title="dashboard" href="dashboard.html" />
<script src="_static/center_page.js"></script>
6 years ago
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/styles/github.min.css">
6 years ago
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
5 years ago
<div class="wy-side-nav-search" >
6 years ago
<a href="index.html" class="icon icon-home"> Arthas
</a>
<div class="version">
5 years ago
3.1.3
6 years ago
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
6 years ago
<li class="toctree-l1"><a class="reference external" href="https://alibaba.github.io/arthas/arthas-tutorials?language=en">Online tutorials(Recommend)</a></li>
6 years ago
<li class="toctree-l1"><a class="reference internal" href="install-detail.html">Installation</a></li>
5 years ago
<li class="toctree-l1"><a class="reference internal" href="download.html">Download</a></li>
6 years ago
<li class="toctree-l1"><a class="reference internal" href="quick-start.html">Quick start</a></li>
<li class="toctree-l1"><a class="reference internal" href="advanced-use.html">Advanced usage</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="commands.html">Commands</a><ul class="current">
6 years ago
<li class="toctree-l2"><a class="reference internal" href="dashboard.html">dashboard</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">thread</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#parameters">Parameters</a></li>
<li class="toctree-l3"><a class="reference internal" href="#usage">Usage</a><ul>
6 years ago
<li class="toctree-l4"><a class="reference internal" href="#list-the-top-n-busiest-threads-with-detailed-stack-trace">List the top n busiest threads with detailed stack trace</a></li>
<li class="toctree-l4"><a class="reference internal" href="#list-all-threads-info-when-no-options-provided">List all threads info when no options provided</a></li>
<li class="toctree-l4"><a class="reference internal" href="#thread-id-show-the-running-stack-for-the-target-thread">thread id, show the running stack for the target thread</a></li>
<li class="toctree-l4"><a class="reference internal" href="#thread-b-locate-the-thread-bocking-the-others">thread -b, locate the thread bocking the others</a></li>
<li class="toctree-l4"><a class="reference internal" href="#thread-i-specify-the-sampling-interval">thread -i, specify the sampling interval</a></li>
6 years ago
</ul>
</li>
</ul>
</li>
6 years ago
<li class="toctree-l2"><a class="reference internal" href="jvm.html">jvm</a></li>
<li class="toctree-l2"><a class="reference internal" href="sysprop.html">sysprop</a></li>
<li class="toctree-l2"><a class="reference internal" href="sysenv.html">sysenv</a></li>
5 years ago
<li class="toctree-l2"><a class="reference internal" href="vmoption.html">vmoption</a></li>
<li class="toctree-l2"><a class="reference internal" href="logger.html">logger</a></li>
6 years ago
<li class="toctree-l2"><a class="reference internal" href="mbean.html">mbean</a></li>
6 years ago
<li class="toctree-l2"><a class="reference internal" href="getstatic.html">getstatic</a></li>
<li class="toctree-l2"><a class="reference internal" href="ognl.html">ognl</a></li>
6 years ago
<li class="toctree-l2"><a class="reference internal" href="sc.html">sc</a></li>
<li class="toctree-l2"><a class="reference internal" href="sm.html">sm</a></li>
<li class="toctree-l2"><a class="reference internal" href="dump.html">dump</a></li>
5 years ago
<li class="toctree-l2"><a class="reference internal" href="heapdump.html">heapdump</a></li>
6 years ago
<li class="toctree-l2"><a class="reference internal" href="jad.html">jad</a></li>
<li class="toctree-l2"><a class="reference internal" href="classloader.html">classloader</a></li>
6 years ago
<li class="toctree-l2"><a class="reference internal" href="mc.html">mc</a></li>
6 years ago
<li class="toctree-l2"><a class="reference internal" href="redefine.html">redefine</a></li>
<li class="toctree-l2"><a class="reference internal" href="monitor.html">monitor</a></li>
<li class="toctree-l2"><a class="reference internal" href="watch.html">watch</a></li>
<li class="toctree-l2"><a class="reference internal" href="trace.html">trace</a></li>
<li class="toctree-l2"><a class="reference internal" href="stack.html">stack</a></li>
<li class="toctree-l2"><a class="reference internal" href="tt.html">tt</a></li>
6 years ago
<li class="toctree-l2"><a class="reference internal" href="cat.html">cat</a></li>
<li class="toctree-l2"><a class="reference internal" href="pwd.html">pwd</a></li>
6 years ago
<li class="toctree-l2"><a class="reference internal" href="options.html">options</a></li>
6 years ago
<li class="toctree-l2"><a class="reference internal" href="commands.html#basic-arthas-commands">Basic Arthas Commands</a></li>
6 years ago
</ul>
</li>
5 years ago
<li class="toctree-l1"><a class="reference internal" href="web-console.html">WebConsole</a></li>
6 years ago
<li class="toctree-l1"><a class="reference internal" href="docker.html">Docker</a></li>
6 years ago
<li class="toctree-l1"><a class="reference external" href="https://github.com/alibaba/arthas/issues?q=label%3Auser-case">User cases</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/alibaba/arthas/issues?q=label%3Aquestion-answered">Questions and answers</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/alibaba/arthas">Fork me at GitHub</a></li>
5 years ago
<li class="toctree-l1"><a class="reference external" href="https://github.com/alibaba/arthas/blob/master/CONTRIBUTING">Compile and debug/CONTRIBUTING</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/alibaba/arthas/releases">Release Notes</a></li>
6 years ago
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">Arthas</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> &raquo;</li>
6 years ago
<li><a href="commands.html">All Commands</a> &raquo;</li>
6 years ago
<li>thread</li>
<li class="wy-breadcrumbs-aside">
6 years ago
<a href="https://github.com/alibaba/arthas/blob/master/site/src/site/sphinx/en/thread.md" class="fa fa-github"> Edit on GitHub</a>
6 years ago
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="thread">
5 years ago
<h1>thread<a class="headerlink" href="#thread" title="Permalink to this headline"></a></h1>
6 years ago
<blockquote>
5 years ago
<div><p>Check the basic info and stack trace of the target thread.</p>
</div></blockquote>
6 years ago
<div class="section" id="parameters">
5 years ago
<h2>Parameters<a class="headerlink" href="#parameters" title="Permalink to this headline"></a></h2>
6 years ago
<table border="1" class="docutils">
<thead>
<tr>
<th align="right">Name</th>
<th align="left">Specification</th>
</tr>
</thead>
<tbody>
<tr>
<td align="right"><em>id</em></td>
<td align="left">thread id in JVM</td>
</tr>
<tr>
6 years ago
<td align="right"><code>[n:]</code></td>
<td align="left">the top n busiest threads with stack traces printed</td>
6 years ago
</tr>
<tr>
6 years ago
<td align="right"><code>[b]</code></td>
<td align="left">locate the thread blocking the others</td>
6 years ago
</tr>
<tr>
<td align="right">[i <code>&lt;value&gt;</code>]</td>
<td align="left">specify the interval to collect data to compute CPU ratios (ms)</td>
</tr>
</tbody>
6 years ago
</table><blockquote>
5 years ago
<div><p>How the CPU ratios are calculated? <br/><br/>
CPU ratio for a given thread is the CPU time it takes divided by the total CPU time within a specified interval period. It is calculated in the following way: sample CPU times for all the thread by calling <code class="docutils literal notranslate"><span class="pre">java.lang.management.ThreadMXBean#getThreadCpuTime</span></code> first, then sleep for a period (the default value is 100ms, which can be specified by <code class="docutils literal notranslate"><span class="pre">-i</span></code>), then sample CPU times again. By this, we can get the time cost for this period for each thread, then come up with the ratio. <br/><br/>
Note: this operation consumes CPU time too (<code class="docutils literal notranslate"><span class="pre">getThreadCpuTime</span></code> is time-consuming), therefore it is possible to observe Arthass thread appears in the list. To avoid this, try to increase sample interval, for example: 5000 ms.<br/><br/>
If youd like to check the CPU ratios from the very beginning of the Java process, <a class="reference external" href="https://github.com/oldratlee/useful-scripts/blob/master/docs/java.md#-show-busy-java-threads">show-busy-java-threads</a> can come to help.</p>
</div></blockquote>
6 years ago
</div>
<div class="section" id="usage">
5 years ago
<h2>Usage<a class="headerlink" href="#usage" title="Permalink to this headline"></a></h2>
6 years ago
<div class="section" id="list-the-top-n-busiest-threads-with-detailed-stack-trace">
5 years ago
<h3>List the top n busiest threads with detailed stack trace<a class="headerlink" href="#list-the-top-n-busiest-threads-with-detailed-stack-trace" title="Permalink to this headline"></a></h3>
6 years ago
<div class="highlight-shell notranslate"><div class="highlight hljs"><pre class="shell">$ thread -n 3
&quot;as-command-execute-daemon&quot; Id=29 cpuUsage=75% RUNNABLE
at sun.management.ThreadImpl.dumpThreads0(Native Method)
at sun.management.ThreadImpl.getThreadInfo(ThreadImpl.java:440)
at com.taobao.arthas.core.command.monitor200.ThreadCommand$1.action(ThreadCommand.java:58)
at com.taobao.arthas.core.command.handler.AbstractCommandHandler.execute(AbstractCommandHandler.java:238)
at com.taobao.arthas.core.command.handler.DefaultCommandHandler.handleCommand(DefaultCommandHandler.java:67)
at com.taobao.arthas.core.server.ArthasServer$4.run(ArthasServer.java:276)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Number of locked synchronizers = 1
- java.util.concurrent.ThreadPoolExecutor$Worker@6cd0b6f8
&quot;as-session-expire-daemon&quot; Id=25 cpuUsage=24% TIMED_WAITING
at java.lang.Thread.sleep(Native Method)
at com.taobao.arthas.core.server.DefaultSessionManager$2.run(DefaultSessionManager.java:85)
&quot;Reference Handler&quot; Id=2 cpuUsage=0% WAITING on java.lang.ref.Reference$Lock@69ba0f27
at java.lang.Object.wait(Native Method)
- waiting on java.lang.ref.Reference$Lock@69ba0f27
at java.lang.Object.wait(Object.java:503)
5 years ago
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:133)</pre></div>
6 years ago
</div>
</div>
6 years ago
<div class="section" id="list-all-threads-info-when-no-options-provided">
5 years ago
<h3>List all threads info when no options provided<a class="headerlink" href="#list-all-threads-info-when-no-options-provided" title="Permalink to this headline"></a></h3>
6 years ago
<div class="highlight-shell notranslate"><div class="highlight hljs"><pre class="shell">$ thread
Threads Total: 16, NEW: 0, RUNNABLE: 7, BLOCKED: 0, WAITING: 5, TIMED_WAITING: 4, TERMINATED: 0
6 years ago
ID NAME GROUP PRIORITY STATE %CPU TIME INTERRUPTE DAEMON
6 years ago
30 as-command-execute-daemon system 9 RUNNABLE 72 0:0 false true
23 as-session-expire-daemon system 9 TIMED_WAIT 27 0:0 false true
22 Attach Listener system 9 RUNNABLE 0 0:0 false true
11 pool-2-thread-1 main 5 TIMED_WAIT 0 0:0 false false
12 Thread-2 main 5 RUNNABLE 0 0:0 false true
13 pool-3-thread-1 main 5 TIMED_WAIT 0 0:0 false false
25 as-selector-daemon system 9 RUNNABLE 0 0:0 false true
14 Thread-3 main 5 TIMED_WAIT 0 0:0 false false
26 pool-5-thread-1 system 5 WAITING 0 0:0 false false
15 Thread-4 main 5 RUNNABLE 0 0:0 false false
1 main main 5 WAITING 0 0:2 false false
2 Reference Handler system 10 WAITING 0 0:0 false true
3 Finalizer system 8 WAITING 0 0:0 false true
4 Signal Dispatcher system 9 RUNNABLE 0 0:0 false true
20 NonBlockingInputStreamThread main 5 WAITING 0 0:0 false true
5 years ago
21 Thread-8 main 5 RUNNABLE 0 0:0 false true</pre></div>
6 years ago
</div>
</div>
6 years ago
<div class="section" id="thread-id-show-the-running-stack-for-the-target-thread">
5 years ago
<h3>thread id, show the running stack for the target thread<a class="headerlink" href="#thread-id-show-the-running-stack-for-the-target-thread" title="Permalink to this headline"></a></h3>
6 years ago
<div class="highlight-shell notranslate"><div class="highlight hljs"><pre class="shell">$ thread 1
&quot;main&quot; Id=1 WAITING on java.util.concurrent.CountDownLatch$Sync@29fafb28
at sun.misc.Unsafe.park(Native Method)
- waiting on java.util.concurrent.CountDownLatch$Sync@29fafb28
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:997)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1304)
5 years ago
at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:231)</pre></div>
6 years ago
</div>
</div>
6 years ago
<div class="section" id="thread-b-locate-the-thread-bocking-the-others">
5 years ago
<h3>thread -b, locate the thread bocking the others<a class="headerlink" href="#thread-b-locate-the-thread-bocking-the-others" title="Permalink to this headline"></a></h3>
<p>In some occasions, we experience the whole application is stuck because theres one particular thread hold one lock that other threads are relying on. To diagnose such an issue, Arthas provides <code class="docutils literal notranslate"><span class="pre">thread</span> <span class="pre">-b</span></code> to find the problematic thread in one single command.</p>
6 years ago
<div class="highlight-bash notranslate"><div class="highlight hljs"><pre class="bash">$ thread -b
&quot;http-bio-8080-exec-4&quot; Id=27 TIMED_WAITING
at java.lang.Thread.sleep(Native Method)
at test.arthas.TestThreadBlocking.doGet(TestThreadBlocking.java:22)
- locked java.lang.Object@725be470 &lt;---- but blocks 4 other threads!
at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at test.filter.TestDurexFilter.doFilter(TestDurexFilter.java:46)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at com.taobao.tomcat.valves.ContextLoadFilterValve$FilterChainAdapter.doFilter(ContextLoadFilterValve.java:191)
at com.taobao.eagleeye.EagleEyeFilter.doFilter(EagleEyeFilter.java:81)
at com.taobao.tomcat.valves.ContextLoadFilterValve.invoke(ContextLoadFilterValve.java:150)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:429)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1085)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
6 years ago
- locked org.apache.tomcat.util.net.SocketWrapper@7127ee12
6 years ago
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
6 years ago
6 years ago
Number of locked synchronizers = 1
5 years ago
- java.util.concurrent.ThreadPoolExecutor$Worker@31a6493e</pre></div>
6 years ago
</div>
6 years ago
<blockquote>
5 years ago
<div><p>Note: By now Arthas only supports to locate the thread blocked by <code class="docutils literal notranslate"><span class="pre">synchronzied</span></code>, while <code class="docutils literal notranslate"><span class="pre">java.util.concurrent.Lock</span></code> is not supported yet.</p>
</div></blockquote>
6 years ago
</div>
6 years ago
<div class="section" id="thread-i-specify-the-sampling-interval">
5 years ago
<h3>thread -i, specify the sampling interval<a class="headerlink" href="#thread-i-specify-the-sampling-interval" title="Permalink to this headline"></a></h3>
6 years ago
<div class="highlight-bash notranslate"><div class="highlight hljs"><pre class="bash">$ thread -n 3 -i 1000
&quot;as-command-execute-daemon&quot; Id=4759 cpuUsage=23% RUNNABLE
at sun.management.ThreadImpl.dumpThreads0(Native Method)
at sun.management.ThreadImpl.getThreadInfo(ThreadImpl.java:440)
at com.taobao.arthas.core.command.monitor200.ThreadCommand.processTopBusyThreads(ThreadCommand.java:133)
at com.taobao.arthas.core.command.monitor200.ThreadCommand.process(ThreadCommand.java:79)
at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl.process(AnnotatedCommandImpl.java:96)
at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl.access$100(AnnotatedCommandImpl.java:27)
at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl$ProcessHandler.handle(AnnotatedCommandImpl.java:125)
at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl$ProcessHandler.handle(AnnotatedCommandImpl.java:122)
at com.taobao.arthas.core.shell.system.impl.ProcessImpl$CommandProcessTask.run(ProcessImpl.java:332)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:756)
Number of locked synchronizers = 1
- java.util.concurrent.ThreadPoolExecutor$Worker@546aeec1
5 years ago
...</pre></div>
6 years ago
</div>
</div>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="jvm.html" class="btn btn-neutral float-right" title="jvm" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
5 years ago
<a href="dashboard.html" class="btn btn-neutral float-left" title="dashboard" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
6 years ago
</div>
<hr/>
<div role="contentinfo">
<p>
5 years ago
&copy; Copyright 2018-2019, Alibaba Middleware Group, and contributors
6 years ago
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
5 years ago
6 years ago
<div class="github-fork-ribbon-wrapper right">
<div class="github-fork-ribbon">
6 years ago
<a href="https://github.com/alibaba/arthas" target="_blank">Fork me at GitHub</a>
6 years ago
</div>
</div>
<script type="text/javascript" src="_static/add_badges.js"></script>
6 years ago
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/highlight.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlightjs-line-numbers.js/2.5.0/highlightjs-line-numbers.min.js"></script>
<script>
document.querySelectorAll('div.hljs > pre').forEach(function(block) {
hljs.highlightBlock(block);
hljs.lineNumbersBlock(block);
});
</script>
6 years ago
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?d5c5e25b100f0eb51a4c35c8a86ea9b4";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</body>
</html>