I know that we can use tools like JProfiler, etc. Is there any tutorial on how to configure it to display memory usage only through remote monitoring?
Any idea?
you have VisualGC, it is not very advanced, but you can see the memory usage of your application (garbage, old, permanent, etc.)
http://java.sun.com/performance/jvmstat/visualgc.html
to resume: you start the daemon monitoring on a remote computer ( http://java.sun.com/j2se/1.5.0/docs/tooldocs/share/jstatd.html , see security paragraph)
JAVA_HOME/bin/jstatd -J-Djava.security.policy=jstatd.all.policy
, jstatd.all.policy, :
grant codebase "file:${java.home}/../lib/tools.jar" { permission java.security.AllPermission; };
pid jps:
http://java.sun.com/j2se/1.5.0/docs/tooldocs/share/jps.html#jps
, visualgc:
visualgc the_pid@remote_machine_address
YourKit, ( ).
- / script (catalina.sh tomcat) :
JAVA_OPTS="-Djava.awt.headless=true -agentlib:yjpagent -Xrunyjpagent:sessionname=Tomcat"
, YourKit ( catalina.sh):
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/yourkit/yjp-6.0.16/bin/linux-x86-32
YourKit .
VM Java-, - -agentlib:jprofilerti=port=25000
-agentlib:jprofilerti=port=25000
JProfiler.
:
NetBeans
Intellij
Jprofiler. Tomcat Jprofiler.
Linux .bash_profile /root.jprofiller ( )
.bash_profile
/root
.bash_profile file export LD_LIBRARY_PATH=/dsvol/jprofiler6/bin/linux-x86
Tomcat. catalena.sh bin.catelana.sh ( catalena.sh).
catalena.sh
bin
catelana.sh
export JPROFILER_HOME JAVA_OPTS="-Xms768m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=256m -Dfile.encoding=UTF8 -agentpath:/opt/Performance/jprofiler7/bin/linux-x86/libjprofilerti.so=port=8849 $CATALINA_OPTS"
bin, starup.sh
starup.sh
VisualVM, , :
Java VisualVM
EDIT : I wrote a blog post on how to configure remote profiling through an SSH tunnel here:
http://kamilmroczek.com/2012/11/16/168787859/
Source: https://habr.com/ru/post/1698171/More articles:Atoi () conversion error - c ++The assembly is not saved correctly - reflectionFlexibility in project scope? - scopeHow to click pixels faster on iPhone? - iphoneDatabase and Version Management System - version-controlHow to send xml to asp page using webrequest from asp.net? - xmlHow to get a list of local Windows users who are logged in? - c #How to parallelize string search in a file using fork? (GNU Linux / g ++) - c ++What is the best way to open an existing project? - c #What is the percentage of code coverage for your project? - unit-testingAll Articles