#The below params will open the interface to remote YKP client to profile the app.
#If to run performance test for this app,
#plz comment the below params.
#if 64bit system could use this params value => JAVA_HEAP_LIMIT=-Xmx2048m
#else 32bit system should use => JAVA_HEAP_LIMIT=-Xmx512m
#run `echo $YJP_HOME` to make sure the env value is set.
#ensure the xx in "$YKP_HOME/bin/linux-x86-{xx}" is fit to your system.
#----zheng.cuizh@xxxxxxxx
JAVA_OPTS="$JAVA_OPTS -agentpath:$YKP_HOME/bin/linux-x86-32/libyjpagent.so=disablestacktelemetry,delay=10000,sessionname=JBoss"
在jbossctl里面加入这一行,以java参数身份执行。注意操作系统位数。
将YKP的linux版客户端代理上传到服务器的一个目录,比如/usr/ali/ykp-8.0.7
vi /etc/profile
加入下面一行
export YKP_HOME = /usr/ali/ykp-8.0.7
顺便在命令行里也执行下。
tail -fn1000 logs/jboss_stdout.log
ykp会抛个Error级别的日志,确保能够显示出来。你的log级别太高的话就看不到了。如下:
16:21:45,400 ERROR [STDERR] [YourKit Java Profiler 8.0.8] Profiler agent is listening on port 10001...
16:21:45,401 ERROR [STDERR] [YourKit Java Profiler 8.0.8] *** HINT ***: To get profiling results, connect to the application from the profiler UI
这里会看到ykp的端口,
在本机开启YKP,然后连过去,OK。
注册码生成器:附件