sk89q / warmroast Goto Github PK
View Code? Open in Web Editor NEWJava application CPU sampler w/ web-based UI
Java application CPU sampler w/ web-based UI
Please, add a button to expand/retract everything, it's a pain to analyze plugins with big call chains, I'm trying to investigate my bungeecord plugin and bungee fires the event directly from the netty worker threads, there are 16 threads on running on my server and it is a pain to reach my actual code in each thread individually....
Expanding everything by hand is like playing Cookie Clicker...
http://pastie.org/private/sivpb8ss19psuh6pnl4sgq
Above is the error im seeing.
Here's the launch.sh
java -Djava.library.path=/usr/lib/jvm/java-7-orcale/jre/bin -cp /usr/lib/jvm/java-7-oracle/lib/tools.jar:warmroast.jar com.sk89q.warmroast.WarmRoast --thread "Server thread"
This pops up whenever I try to use WarmRoast. I just sent it a space for the VM number because it isn't returning anything, but 0 doesn't work either. I hope this is helpful.
C:\Users\[username]\Downloads\Minecraft>java -Djava.library.path="C:\Program Files
\Java\jdk1.7.0_45\bin" -cp "C:\Program Files\Java\jdk1.7.0_45\lib\tools.jar";war
mroast.jar com.sk89q.warmroast.WarmRoast --thread "Server thread"
------------------------------------------------------------------------
WarmRoast
http://github.com/sk89q/warmroast
------------------------------------------------------------------------
java.util.ServiceConfigurationError: com.sun.tools.attach.spi.AttachProvider: Pr
ovider sun.tools.attach.WindowsAttachProvider could not be instantiated: java.la
ng.UnsatisfiedLinkError: no attach in java.library.path
Choose a VM:
Enter choice #:
That's not a number. Bye.
C:\Users\[username]\Downloads\Minecraft>pause
Press any key to continue . . .
Using AdoptOpenJDK 16 on Windows 10, I'm getting the following exception after selecting the Java process that I wish to monitor:
Sampling set to stop in 5 seconds.
Starting a server on /0.0.0.0:23000...
Once the server starts (shortly), visit the URL in your browser.
Note: The longer you wait before using the output of that webpage, the more accurate the results will be.
com.sun.tools.attach.AgentLoadException: Agent JAR not found or no Agent-Class attribute
at jdk.attach/sun.tools.attach.HotSpotVirtualMachine.loadAgent(HotSpotVirtualMachine.java:159)
at jdk.attach/com.sun.tools.attach.VirtualMachine.loadAgent(VirtualMachine.java:538)
at com.sk89q.warmroast.WarmRoast.connect(WarmRoast.java:122)
at com.sk89q.warmroast.WarmRoast.main(WarmRoast.java:327)
Additional information:
AdoptOpenJDK 8 has a jre/lib/management-agent.jar
whereas some Java versions later, this jre
directory no longer exists and JAVA_HOME
now points directly to the JDK directory that no longer contains such a management-agent.jar
file. This is referenced here.
A server admin may want to proxy warmroast through nginx (or another web server) for several reasons such as authentication behind a username and password and TLS. When I attempted to do this via nginx, it worked correctly except that the paths given by warmroast are not relative. Specifically, the link to /stack and the styleheets do not take into account warmroast's new url. It should be noted that I am trying to run at a url like example.com/warmroast using the following nginx configuration:
listen 80;
listen [::]:80;
listen 443 ssl http2;
listen [::]:443 ssl http2;
root /usr/share/nginx/html/admin;
index index.html index.htm;
server_name <redacted>;
include /etc/nginx/snippets/ssl.conf;
location / {
try_files $uri $uri/ =404;
}
location /warmroast {
proxy_pass http://127.0.0.1:23000/;
proxy_set_header Host $host;
}
}
Perhaps a command line flag such as --relative-paths or --warmroast-http-root would be the best solution?
WarmRoast
Choose a VM:
[1] /home/mc/multicraft/jar/SpigotMC nogui
[2] /usr/share/jenkins/jenkins.war --webroot=/var/cache/jenkins/war --httpPort=8283 --ajp13Port=-1
[3] com.sk89q.warmroast.WarmRoast --thread Server thread
[4] org.apache.catalina.startup.Bootstrap start
Enter choice #: 1
Failed to attach VM
java.io.IOException: well-known file is not secure
at sun.tools.attach.LinuxVirtualMachine.checkPermissions(Native Method)
at sun.tools.attach.LinuxVirtualMachine.(LinuxVirtualMachine.java:117)
at sun.tools.attach.LinuxAttachProvider.attachVirtualMachine(LinuxAttachProvider.java:78)
at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:255)
at com.sk89q.warmroast.WarmRoast.main(WarmRoast.java:282)
How can I fix this problem?
I can not understand that with the installation there is a Ausführlicher help
java.lang.SecurityException: attempt to add a Permission to a readonly Permissions object
at java.security.Permissions.add(Permissions.java:126)
at java.security.Policy$UnsupportedEmptyCollection.add(Policy.java:827)
at sun.rmi.server.LoaderHandler.getLoaderAccessControlContext(LoaderHandler.java:1005)
at sun.rmi.server.LoaderHandler.lookupLoader(LoaderHandler.java:881)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:404)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:186)
at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:637)
at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:264)
at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:219)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1620)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1521)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1781)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:373)
at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:326)
at sun.rmi.server.UnicastServerRef.unmarshalParametersUnchecked(UnicastServerRef.java:592)
at sun.rmi.server.UnicastServerRef.unmarshalParameters(UnicastServerRef.java:580)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:310)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:276)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:253)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:162)
at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source)
at javax.management.remote.rmi.RMIConnectionImpl_Stub.queryNames(Unknown Source)
at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.queryNames(RMIConnector.java:847)
at com.sk89q.warmroast.WarmRoast.getThreadMXBean(WarmRoast.java:141)
at com.sk89q.warmroast.WarmRoast.connect(WarmRoast.java:132)
at com.sk89q.warmroast.WarmRoast.main(WarmRoast.java:327)
Could be useful for diagnosing memory leaks, GC intervals, and such. Just a thought.
i have tried some stuff but i cant figure out how to use this
The link on the main page doesn't lead to a website with a downloadlink.
Trying to get WarmRoast to run in a CentOS VM and receiving the following:
# java -Djava.library.path=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75.x86_64/jre/bin/java -cp PATH_TO_JDK/lib/tools.jar:warmroast-1.0.0-SNAPSHOT.jar com.sk89q.warmroast.WarmRoast --thread "Server thread"
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/tools/attach/AttachNotSupportedException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2615)
at java.lang.Class.getMethod0(Class.java:2856)
at java.lang.Class.getMethod(Class.java:1668)
at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
Caused by: java.lang.ClassNotFoundException: com.sun.tools.attach.AttachNotSupportedException
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 6 more
# java -Djava.library.path=/usr/bin/java -cp PATH_TO_JDK/lib/tools.jar:warmroast-1.0.0-SNAPSHOT.jar com.sk89q.warmroast.WarmRoast --thread "Server thread"
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/tools/attach/AttachNotSupportedException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2615)
at java.lang.Class.getMethod0(Class.java:2856)
at java.lang.Class.getMethod(Class.java:1668)
at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
Caused by: java.lang.ClassNotFoundException: com.sun.tools.attach.AttachNotSupportedException
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 6 more
Any ideas on what may need to change in the command?
Trying to monitor a minecraft server, this is the current command I am running
pastebin
https://pastebin.com/FdUQBAWx
The settings are made correctly , the process of the console :
`
WarmRoast
Choose a VM:
[1] com.sk89q.warmroast.WarmRoast --mappings /home/gameserver/server/conf --thread Server thread
Starting a server on /0.0.0.0:23000...
Once the server starts (shortly), visit the URL in your browser.
Note: The longer you wait before using the output of that webpage, the more accurate the results will be.
2016-04-10 14:09:52.664:INFO:oejs.Server:main: jetty-9.0.z-SNAPSHOT
2016-04-10 14:09:52.802:INFO:oejsh.ContextHandler:main: Started o.e.j.s.ServletContextHandler@52d455b8{/,null,AVAILABLE}
2016-04-10 14:09:52.875:INFO:oejs.ServerConnector:main: Started ServerConnector@19f327bb{HTTP/1.1}{0.0.0.0:23000}
`
The browser no information is displayed , only the message :There are no results. (Thread filter does not match thread?)
How to configure WarmRoast?
So when I Run WarmRoast I Just get this:
https://i.gyazo.com/dcb10efb3472b6b7f09fb3e131900aa0.png
.. A Blank screen, Any idea why? I'm using this command:
java -Djava.library.path=/usr/lib/jvm/java-8-oracle/jre/bin -cp /usr/lib/jvm/java-8-oracle/lib/tools.jar:warmroast-1.0.0-SNAPSHOT.jar com.sk89q.warmroast.WarmRoast --thread "Server thread"
After I Run this I get this:
https://i.gyazo.com/5fe34b3098311a699deeecba91102fca.png
I Pick number 3, So I type "3" then when I go the webpage its just blank like that :(
java.lang.SecurityException: attempt to add a Permission to a readonly Permissions object
at java.security.Permissions.add(Permissions.java:126)
at java.security.Policy$UnsupportedEmptyCollection.add(Policy.java:827)
at sun.rmi.server.LoaderHandler.getLoaderAccessControlContext(LoaderHandler.java:1005)
at sun.rmi.server.LoaderHandler.lookupLoader(LoaderHandler.java:881)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:404)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:186)
at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:637)
at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:264)
at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:219)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1620)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1521)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1781)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:373)
at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:326)
at sun.rmi.server.UnicastServerRef.unmarshalParametersUnchecked(UnicastServerRef.java:592)
at sun.rmi.server.UnicastServerRef.unmarshalParameters(UnicastServerRef.java:580)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:310)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:276)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:253)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:162)
at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source)
at javax.management.remote.rmi.RMIConnectionImpl_Stub.queryNames(Unknown Source)
at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.queryNames(RMIConnector.java:847)
at com.sk89q.warmroast.WarmRoast.getThreadMXBean(WarmRoast.java:141)
at com.sk89q.warmroast.WarmRoast.connect(WarmRoast.java:132)
at com.sk89q.warmroast.WarmRoast.main(WarmRoast.java:327)
jdk1.7.0_67/jre/bin/java -Djava.library.path=jdk1.7.0_67/jre/bin -cp jdk1.7.0_67/lib/tools.jar:warmroast-1.0.0-SNAPSHOT.jar com.sk89q.warmroast.WarmRoast --thread "Server thread"
Choose a VM:
[1] cauldron-1.6.4-1.965.21.197-server.jar
[2] com.sk89q.warmroast.WarmRoast --thread Server thread
Starting a server on /0.0.0.0:23000...
Once the server starts (shortly), visit the URL in your browser.
Note: The longer you wait before using the output of that webpage, the more accurate the results will be.
java.rmi.ConnectIOException: Exception creating connection to: 0.0.0.5; nested exception is:
java.net.SocketException: Invalid argument or cannot assign requested address
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:631)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:129)
at javax.management.remote.rmi.RMIServerImpl_Stub.newClient(Unknown Source)
at javax.management.remote.rmi.RMIConnector.getConnection(RMIConnector.java:2404)
at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:308)
at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:268)
at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:227)
at com.sk89q.warmroast.WarmRoast.connect(WarmRoast.java:129)
at com.sk89q.warmroast.WarmRoast.main(WarmRoast.java:327)
Caused by: java.net.SocketException: Invalid argument or cannot assign requested address
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at java.net.Socket.connect(Socket.java:528)
at java.net.Socket.(Socket.java:425)
at java.net.Socket.(Socket.java:208)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:147)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
... 10 more
0.0.0.5 what is that ?
bind other ip or port dosnt help...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.