ubuntu作为visualvm的图像输出服务器
ubuntu作为visualvm的图像输出服务器
1. 开启ubuntu的xwindow对外服务功能
修改 /etc/gdm/gdm.schmas中的
<schema>
<key>security/DisallowTCP</key>
<signature>b</signature>
<default>true</default> //该未false,xwindow可以对外服务
</schema>
重启gdm:sudo /etc/init.d/gdm restart
xwindow服务默认监听6000端口,确认该端口允许外部访问 。
2 xhost +10.33.33.33 把图形输出源地址添加进来
3. 服务visualvm启动
exprot DISPLAY=xwindow server ip:0
比如开启xwindow的服务器ip未10.33.33.33,export DISPLAY=10.33.33.33:0
visualvm (jdk只带的jvisualvm比较弱,最好单独下载)
很实用的技巧,对线上故障分析很有用。