jconsole远程监控linux上的springBoot服务
springBoot启动命令:
nohup java -Xms128m -Xmx256m -Djava.rmi.server.hostname=172.20.32.54 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=12312 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -jar xxxxService_DA-0.0.1-SNAPSHOT.jar > nohup_xxxxService_DA_8881.out 2>&1 &
server.hostname为微服务运行所在的主机ip,jmxremote.port为开发的端口,jmxremote.authenticate=false表示在jconsole连接时可以不用输入账号和密码(否则要输入linux登录的账号和密码)
注意:关闭防火墙或者放行12312端口
查看进程 ps -ef|grep java
查看目录位置 whereis XXXX
其他命令(https://www.cnblogs.com/zhuiluoyu/p/6154898.html)
ps aux --sort -rss
top
free