gpt4 book ai didi

java - 适用于 JVM 的 Yourkit Java 分析 - Ubuntu

转载 作者:行者123 更新时间:2023-12-01 10:49:08 24 4
gpt4 key购买 nike

问题:我做了什么:

  1. 我下载了适用于 Linux 的试用版 ( https://www.yourkit.com/download/ ) YourKit Java Profiler 并在我的 AWS 实例中进行测试。

  2. 我正在尝试通过以下步骤手动启用分析

(-agentpath:/home/yourkit/yjp-2015-build-15078/bin/linux-x86-64/libyjpagent.so)

  • 我收到以下错误,
  • 错误:我得到了什么:

    [YourKit Java Profiler 2015 build 15078] Cannot create log file: /home/ubuntu/.yjp/log/java-1884.log To specify alternate log directory use startup option 'logdir' 15078 0.000: Command line: java -agentpath:/home/yourkit/yjp-2015-build-15078/bin/linux-x86-64/libyjpagent.so 15078 0.000: Executable: /usr/lib/jvm/java-8-oracle/jre/bin/java 15078 0.000: uname: sysname: Linux release: 3.13.0-48-generic version: #80-Ubuntu SMP Thu Mar 12 11:16:15 UTC 2015 machine: x86_64 15078 0.000: Linux; fast_thread_cpu_time=1; 64-bit process 15078 0.001: hid: 36022997176V9ZXX3UXV5UWZ513Z98931W 64-bit machine 15078 0.001: Today is 20151201 15078 0.001: full_build_stamp: 15078 201511161426 15078 0.001: Agent library path: /home/yourkit/yjp-2015-build-15078/bin/linux-x86-64/libyjpagent.so 15078 0.001: Agent_OnLoad: orig_options= full_options= 15078 0.001: phase: 1 15078 0.001: jvmtiVersion: 30010203 15078 0.001: vendor: Oracle Corporation 15078 0.001: version: 25.66-b17 15078 0.001: info: mixed mode, sharing 15078 0.001: Java 8 detected 15078 0.001: session_id: 8093167346477 (1448960813,1884) 15078 0.003: line_method: 1 15078 0.008: Reusing existing jar file: /tmp/yjp201511161426.jar 15078 0.008: JVMTI 30010203; 25.66-b17; Oracle Corporation; mixed mode, sharing; JR=0; I=0 15078 0.025: Successfully registered probe classes: 120 Registered: .AWTEvents$EventQueue_dispatchEvent_Probe Registered: .AgentLoadingSupport$JBoss Registered: .AgentLoadingSupport$OSGi1 Registered: .AgentLoadingSupport$OSGi2 Registered: .AgentLoadingSupport$OSGi3 Registered: .Databases$Connection_close_Probe Registered: .Databases$Connection_createStatement_Probe Registered: .Databases$Connection_prepareStatement_Probe Registered: .Databases$DataSource_getConnection_Probe Registered: .Databases$DataSource_setName_Probe Registered: .Databases$DriverManager_getConnection_Probe Registered: .Databases$Driver_connect_Probe Registered: .Databases$InitialContext_lookup_Probe Registered: .Databases$PooledConnection_getConnection_Probe Registered: .Databases$PreparedStatement_addBatch_Probe Registered: .Databases$PreparedStatement_clearBatch_Probe Registered: .Databases$PreparedStatement_execute_Probe Registered: .Databases$Statement_addBatch_Probe Registered: .Databases$Statement_clearBatch_Probe Registered: .Databases$Statement_close_Probe Registered: .Databases$Statement_executeBatch_Probe Registered: .Databases$Statement_execute_Probe Registered: .DatabasesLW$Connection_close_Probe Registered: .DatabasesLW$Connection_createStatement_Probe Registered: .DatabasesLW$Connection_prepareStatement_Probe Registered: .DatabasesLW$DataSource_getConnection_Probe Registered: .DatabasesLW$DriverManager_getConnection_Probe Registered: .DatabasesLW$Driver_connect_Probe Registered: .DatabasesLW$PooledConnection_getConnection_Probe Registered: .DatabasesLW$PreparedStatement_execute_Probe Registered: .DatabasesLW$Statement_close_Probe Registered: .DatabasesLW$Statement_execute_Probe1 Registered: .DatabasesLW$Statement_execute_Probe2 Registered: .Files$FileChannel_read_Probe Registered: .Files$FileChannel_write_Probe Registered: .Files$FileInputStream_close_Probe Registered: .Files$FileInputStream_open_Probe Registered: .Files$FileInputStream_readBytes_Probe Registered: .Files$FileInputStream_read_Probe Registered: .Files$FileOutputStream_close_Probe Registered: .Files$FileOutputStream_open_Probe Registered: .Files$FileOutputStream_writeBytes_Probe Registered: .Files$FileOutputStream_write_Probe Registered: .Files$GetChannel_Probe Registered: .Files$RandomAccessFile_close_Probe Registered: .Files$RandomAccessFile_open_Probe Registered: .Files$RandomAccessFile_readBytes_Probe Registered: .Files$RandomAccessFile_read_Probe Registered: .Files$RandomAccessFile_writeBytes_Probe Registered: .Files$RandomAccessFile_write_Probe Registered: .FilesLW$FileChannelsTelemetry$FileChannel_read_Probe Registered: .FilesLW$FileChannelsTelemetry$FileChannel_write_Probe Registered: .FilesLW$FileChannelsTelemetry$GetChannel_Probe Registered: .FilesLW$FileStreamsTelemetry$FileInputStream_close_Probe Registered: .FilesLW$FileStreamsTelemetry$FileInputStream_open_Probe Registered: .FilesLW$FileStreamsTelemetry$FileInputStream_readBytes_Probe Registered: .FilesLW$FileStreamsTelemetry$FileInputStream_read_Probe Registered: .FilesLW$FileStreamsTelemetry$FileOutputStream_close_Probe Registered: .FilesLW$FileStreamsTelemetry$FileOutputStream_open_Probe Registered: .FilesLW$FileStreamsTelemetry$FileOutputStream_writeBytes_Probe Registered: .FilesLW$FileStreamsTelemetry$FileOutputStream_write_Probe Registered: .FilesLW$RandomAccessFilesTelemetry$RandomAccessFile_close_Probe Registered: .FilesLW$RandomAccessFilesTelemetry$RandomAccessFile_open_Probe Registered: .FilesLW$RandomAccessFilesTelemetry$RandomAccessFile_readBytes_Probe Registered: .FilesLW$RandomAccessFilesTelemetry$RandomAccessFile_read_Probe Registered: .FilesLW$RandomAccessFilesTelemetry$RandomAccessFile_writeBytes_Probe Registered: .FilesLW$RandomAccessFilesTelemetry$RandomAccessFile_write_Probe Registered: .JNDI$DirContext_1 Registered: .JNDI$DirContext_2 Registered: .JNDI$NamingContext_1 Registered: .JNDI$NamingContext_2 Registered: .JUnitTests$Old_Run_Probe Registered: .JUnitTests$Old_SetUp_Probe Registered: .JUnitTests$Old_TearDown_Probe Registered: .JUnitTests$Run_Probe Registered: .JUnitTests$SetUp_Probe Registered: .JUnitTests$TearDown_Probe Registered: .Processes$FileOutputStream_writeBytes_Probe Registered: .Processes$FileOutputStream_write_Probe Registered: .Processes$InputStream_readBytes_Probe Registered: .Processes$InputStream_read_Probe Registered: .Processes$ProcessImpl_getErrorStream_Probe Registered: .Processes$ProcessImpl_getInputStream_Probe Registered: .Processes$ProcessImpl_getOutputStream_Probe Registered: .Processes$ProcessImpl_start_Probe Registered: .Processes$ProcessImpl_waitFor_Probe Registered: .Processes$UnixProcess_waitForProcessExit_Probe Registered: .Servlets$Filter_doFilter_Probe Registered: .Servlets$HttpJspPage_jspService_Probe Registered: .Servlets$Servlet_service_Probe Registered: .ServletsLW$Filter_doFilter_Probe Registered: .ServletsLW$HttpJspPage_jspService_Probe Registered: .ServletsLW$Servlet_service_Probe Registered: .Sockets$ServerSocketChannel_accept_Probe Registered: .Sockets$ServerSocket_accept_Probe Registered: .Sockets$SocketChannel_close_Probe Registered: .Sockets$SocketChannel_connect_Probe Registered: .Sockets$SocketChannel_read_Probe Registered: .Sockets$SocketChannel_write_Probe Registered: .Sockets$SocketInputStream_read_Probe Registered: .Sockets$SocketOutputStream_write_Probe Registered: .Sockets$Socket_close_Probe Registered: .Sockets$Socket_connect_Probe Registered: .Sockets$Socket_getInputStream_Probe Registered: .Sockets$Socket_getOutputStream_Probe Registered: .SocketsLW$ServerSocketChannel_accept_Probe Registered: .SocketsLW$ServerSocket_accept_Probe Registered: .SocketsLW$SocketChannel_close_Probe Registered: .SocketsLW$SocketChannel_connect_Probe Registered: .SocketsLW$SocketChannel_read_Probe Registered: .SocketsLW$SocketChannel_write_Probe Registered: .SocketsLW$SocketInputStream_read_Probe Registered: .SocketsLW$SocketOutputStream_write_Probe Registered: .SocketsLW$Socket_close_Probe Registered: .SocketsLW$Socket_connect_Probe Registered: .TestNG$Test_Probe Registered: .Threads$Thread_constructor_Probe Registered: .Threads$Thread_run_Probe Registered: .Threads$Thread_setName_Probe Registered: .Threads$Thread_start_Probe 15078 0.089: agentStart: 1 15078 0.089: agentStart: 2 15078 0.090: agentStart: OK 15078 0.106: tracing=off: large method: 3945 sun.nio.cs.StandardCharsets$Aliases.init(java.lang.Object[]) 15078 0.211: agentInit: 1 15078 0.212: agentInit: Core loaded 15078 0.216: setTriggers: 15078 0.277: setTriggers: to unregister: 0 15078 0.277: setTriggers: method listeners to register: 0 15078 0.277: setTriggers: OK 15078 0.277: ourUnsafe: true 15078 0.277: shmem 42341490: OK 15078 0.277: shmem 4234148E: OK 15078 0.298: Profiler agent is listening on port 10001 15078 0.301: * HINT *: To get profiling results, connect to the application from the profiler UI 15078 0.301: agentInit: Core.init() called 15078 0.301: agentInit: OK 15078 0.302: startProfiling: 1 15078 0.302: startProfiling: OK 15078 0.302: socket timeout: 30000 15078 0.358: SP: pin java.io.FileNotFoundException 15078 0.358: SP: pin java.security.PrivilegedActionException 15078 0.399: SP: pin java.lang.ClassNotFoundException 15078 0.432: tracing=off: large method: 4108 sun.text.resources.FormatData.getContents() 15078 0.455: SP: pin java.lang.NoSuchFieldException 15078 0.473: tracing=off: large method: 8578 sun.util.resources.CurrencyNames.getContents() Usage: java [-options] class [args...] (to execute a class) or java [-options] -jar jarfile [args...] (to execute a jar file) where options include: -d32 use a 32-bit data model if available -d64 use a 64-bit data model if available -server to select the "server" VM The default VM is server, because you are running on a server-class machine. -cp -classpath A : separated list of directories, JAR archives, and ZIP archives to search for class files. -D= set a system property -verbose:[class|gc|jni] enable verbose output -version print product version and exit -version: Warning: this feature is deprecated and will be removed in a future release. require the specified version to run -showversion print product version and continue -jre-restrict-search | -no-jre-restrict-search Warning: this feature is deprecated and will be removed in a future release. include/exclude user private JREs in the version search -? -help print this help message -X print help on non-standard options -ea[:...|:] -enableassertions[:...|:] enable assertions with specified granularity -da[:...|:] -disableassertions[:...|:] disable assertions with specified granularity -esa | -enablesystemassertions enable system assertions -dsa | -disablesystemassertions disable system assertions -agentlib:[=] load native agent library , e.g. -agentlib:hprof see also, -agentlib:jdwp=help and -agentlib:hprof=help -agentpath:[=] load native agent library by full pathname -javaagent:[=] load Java programming language agent, see java.lang.instrument -splash: show splash screen with specified image See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details. 15078 0.492: vmDeath: 1 15078 0.492: vmDeath: 2 15078 0.492: vmDeath: 3 15078 0.492: vmDeath: 4 15078 0.492: vmDeath: OK

    问题:

    1. Need Installation steps Yourkit Java Profiling for JVM - Ubuntu.

    2. How to connect through remote.

    最佳答案

    我每天都在 YourKitJavaProfiler 上工作,它在我的 debian 操作系统上完美运行。

    1。读取输出

    [YourKit Java Profiler 2015 build 15078] Cannot create log file: /home/ubuntu/.yjp/log/java-1884.log To specify alternate log directory use startup option 'logdir'

    根据您的日志文件,il 看起来像运行 java 进程的用户没有对您的 /home/ubuntu/.yjp/log/ 文件夹进行写入的访问权限。

    向您的用户授予访问权限,重新启动您的应用程序并检查其是否有效。

    2。如何监控远程应用程序

    对于远程分析,请使用分析器代理启动 JVM,就像您在 AWS 服务器上本地所做的那样,并且当远程应用程序运行时,从分析器 UI 连接到它以执行分析。

    在某些情况下,您将无法通过运行服务器代理来进行手动分析。请参阅手动启用分析 documentation page .

    关于java - 适用于 JVM 的 Yourkit Java 分析 - Ubuntu,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34016761/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com