-bash-3.2$ java -jar arthas-boot.jar
[INFO] arthas-boot version: 3.4.5
[INFO] Process 14308 already using port 3658
[INFO] Process 14308 already using port 8563
[INFO] Found existing java process, please choose one and input the serial number of the process, eg : 1. Then hit ENTER.
* [1]: 14308 com.xxx.netty.NettyServer
[2]: 14224 org.jetbrains.idea.maven.server.RemoteMavenServer
[3]: 14307 org.jetbrains.jps.cmdline.Launcher
[4]: 744
[5]: 1534 com.tsf.demo.provider.ProviderApplication
1
[INFO] arthas home: /Users/lu-tsang/.arthas/lib/3.5.3/arthas
[INFO] The target process already listen port 3658, skip attach.
[INFO] arthas-client connect 127.0.0.1 3658
,---. ,------. ,--------.,--. ,--. ,---. ,---.
/ O \ | .--. ''--. .--'| '--' | / O \ ' .-'
| .-. || '--'.' | | | .--. || .-. |`. `-.
| | | || |\ \ | | | | | || | | |.-' |
`--' `--'`--' '--' `--' `--' `--'`--' `--'`-----'
wiki https://arthas.aliyun.com/doc
tutorials https://arthas.aliyun.com/doc/arthas-tutorials.html
version 3.5.3
main_class com.xxx.netty.NettyServer
pid 14308
time 2021-08-06 10:44:12
[arthas@14308]$
笔者用的macos所以是KQueueSelectorImpl,如果是linux系统对应的selector是EPollSelectorImpl
[arthas@14308]$ jad sun.nio.ch.DefaultSelectorProvider
ClassLoader:
Location:
/*
* Decompiled with CFR.
*/
package sun.nio.ch;
import java.nio.channels.spi.SelectorProvider;
import sun.nio.ch.KQueueSelectorProvider;
public class DefaultSelectorProvider {
private DefaultSelectorProvider() {
}
public static SelectorProvider create() {
return new KQueueSelectorProvider();
}
}
Affect(row-cnt:1) cost in 138 ms.
[arthas@14308]$ jad sun.nio.ch.KQueueSelectorProvider
ClassLoader:
Location:
/*
* Decompiled with CFR.
*/
package sun.nio.ch;
import java.io.IOException;
import java.nio.channels.spi.AbstractSelector;
import sun.nio.ch.KQueueSelectorImpl;
import sun.nio.ch.SelectorProviderImpl;
public class KQueueSelectorProvider
extends SelectorProviderImpl {
@Override
public AbstractSelector openSelector() throws IOException {
return new KQueueSelectorImpl(this);
}
}
Affect(row-cnt:1) cost in 123 ms.
[arthas@14308]$