快速入门(快速入睡的有效方法)

  本篇文章为你整理了快速入门(快速入睡的有效方法)的详细内容,包含有快速入门springboot 快速入睡的有效方法 表格制作 快速入门 快速入睡的方法 一分钟 快速入门,希望能帮助你了解 快速入门。

  

 
# 3. 查看 dashboard输入dashboard,按回车/enter,会展示当前进程的信息,按ctrl+c可以中断执行。

 

  

$ dashboard

 

  ID NAME GROUP PRIORI STATE %CPU TIME INTERRU DAEMON

  17 pool-2-thread-1 system 5 WAITIN 67 0:0 false false

  27 Timer-for-arthas-dashb system 10 RUNNAB 32 0:0 false true

  11 AsyncAppender-Worker-a system 9 WAITIN 0 0:0 false true

  9 Attach Listener system 9 RUNNAB 0 0:0 false true

  3 Finalizer system 8 WAITIN 0 0:0 false true

  2 Reference Handler system 10 WAITIN 0 0:0 false true

  4 Signal Dispatcher system 9 RUNNAB 0 0:0 false true

  26 as-command-execute-dae system 10 TIMED_ 0 0:0 false true

  13 job-timeout system 9 TIMED_ 0 0:0 false true

  1 main main 5 TIMED_ 0 0:0 false false

  14 nioEventLoopGroup-2-1 system 10 RUNNAB 0 0:0 false false

  18 nioEventLoopGroup-2-2 system 10 RUNNAB 0 0:0 false false

  23 nioEventLoopGroup-2-3 system 10 RUNNAB 0 0:0 false false

  15 nioEventLoopGroup-3-1 system 10 RUNNAB 0 0:0 false false

  Memory used total max usage GC

  heap 32M 155M 1820M 1.77% gc.ps_scavenge.count 4

  ps_eden_space 14M 65M 672M 2.21% gc.ps_scavenge.time(m 166

  ps_survivor_space 4M 5M 5M s)

  ps_old_gen 12M 85M 1365M 0.91% gc.ps_marksweep.count 0

  nonheap 20M 23M -1 gc.ps_marksweep.time( 0

  code_cache 3M 5M 240M 1.32% ms)

  Runtime

  os.name Mac OS X

  os.version 10.13.4

  java.version 1.8.0_162

  java.home /Library/Java/JavaVir

   tualMachines/jdk1.8.0

   _162.jdk/Contents/Hom

   e/jre

  

# 4. 通过 thread 命令来获取到math-game进程的 Main Classthread 1会打印线程 ID 1 的栈,通常是 main 函数的线程。

 

  

$ thread 1 grep main( 

 

   at demo.MathGame.main(MathGame.java:17)

  

# 5. 通过 jad 来反编译 Main Class
$ jad demo.MathGame

 

  ClassLoader:

  +-sun.misc.Launcher$AppClassLoader@3d4eac69

   +-sun.misc.Launcher$ExtClassLoader@66350f69

  Location:

  /tmp/math-game.jar

   * Decompiled with CFR 0_132.

  package demo;

  import java.io.PrintStream;

  import java.util.ArrayList;

  import java.util.Iterator;

  import java.util.List;

  import java.util.Random;

  import java.util.concurrent.TimeUnit;

  public class MathGame {

   private static Random random = new Random();

   private int illegalArgumentCount = 0;

   public static void main(String[] args) throws InterruptedException {

   MathGame game = new MathGame();

   do {

   game.run();

   TimeUnit.SECONDS.sleep(1L);

   } while (true);

   public void run() throws InterruptedException {

   try {

   int number = random.nextInt();

   List Integer primeFactors = this.primeFactors(number);

   MathGame.print(number, primeFactors);

   catch (Exception e) {

   System.out.println(String.format( illegalArgumentCount:%3d, , this.illegalArgumentCount) + e.getMessage());

   public static void print(int number, List Integer primeFactors) {

   StringBuffer sb = new StringBuffer( + number + = );

   Iterator Integer iterator = primeFactors.iterator();

   while (iterator.hasNext()) {

   int factor = iterator.next();

   sb.append(factor).append( * );

   if (sb.charAt(sb.length() - 1) == * ) {

   sb.deleteCharAt(sb.length() - 1);

   System.out.println(sb);

   public List Integer primeFactors(int number) {

   if (number 2) {

   ++this.illegalArgumentCount;

   throw new IllegalArgumentException( number is: + number + , need = 2 );

   ArrayList Integer result = new ArrayList Integer ();

   int i = 2;

   while (i = number) {

   if (number % i == 0) {

   result.add(i);

   number /= i;

   i = 2;

   continue;

   ++i;

   return result;

  Affect(row-cnt:1) cost in 970 ms.

  

# 6. watch通过watch命令来查看demo.MathGame#primeFactors函数的返回值:

 

  

$ watch demo.MathGame primeFactors returnObj

 

  Press Ctrl+C to abort.

  Affect(class-cnt:1 , method-cnt:1) cost in 107 ms.

  ts=2018-11-28 19:22:30; [cost=1.715367ms] result=null

  ts=2018-11-28 19:22:31; [cost=0.185203ms] result=null

  ts=2018-11-28 19:22:32; [cost=19.012416ms] result=@ArrayList[

   @Integer[5],

   @Integer[47],

   @Integer[2675531],

  ts=2018-11-28 19:22:33; [cost=0.311395ms] result=@ArrayList[

   @Integer[2],

   @Integer[5],

   @Integer[317],

   @Integer[503],

   @Integer[887],

  ts=2018-11-28 19:22:34; [cost=10.136007ms] result=@ArrayList[

   @Integer[2],

   @Integer[2],

   @Integer[3],

   @Integer[3],

   @Integer[31],

   @Integer[717593],

  ts=2018-11-28 19:22:35; [cost=29.969732ms] result=@ArrayList[

   @Integer[5],

   @Integer[29],

   @Integer[7651739],

  

更多的功能可以查看进阶使用。

 

  # 7. 退出 arthas如果只是退出当前的连接,可以用quit或者exit命令。Attach 到目标进程上的 arthas 还会继续运行,端口会保持开放,下次连接时可以直接连接上。

  如果想完全退出 arthas,可以执行stop命令。

  在 GitHub 上编辑此页在新窗口打开Last Updated: 贡献者: hengyunabc, Gene, Sergio Escalante, northmorn, 靳阳 简介 Arthas Install

  以上就是快速入门(快速入睡的有效方法)的详细内容,想要了解更多 快速入门的内容,请持续关注盛行IT软件开发工作室。

郑重声明:本文由网友发布,不代表盛行IT的观点,版权归原作者所有,仅为传播更多信息之目的,如有侵权请联系,我们将第一时间修改或删除,多谢。

留言与评论(共有 条评论)
   
验证码: