Hello,
I need to profile remote application on rather restricted system, particularly /tmp folder is really tiny. There's not enough space there to keep yourkit agent temp files there, so this leads to error while initializing agent:
5082 53.685: [m: 21623 2654] total classes: processed=9000 instrumented=8997 4551 ms
15082 55.239: F_B_S_W: error: No space left on device
In app err stream I see
[YourKit Java Profiler 2015 build 15082] Log file: /kohls/file/tvs/prof/SystemBoot-48487.log
Java HotSpot(TM) 64-Bit Server VM warning: Insufficient space for shared memory file:
/tmp/hsperfdata_appuser/31446
Try using the -Djava.io.tmpdir= option to select an alternate temp location.
15082 0.514: error: agentInit: Core.init() returned false
I've tried providing both dir and logdir options, providing following options
export TMPDIR=/external/prof
java -cp<...> <...GC and JVM options...> -Djava.io.tmpdir=/external/prof -agentpath:/home/appuser/libyjpagent.so=logdir=/external/prof,dir=/external/prof
Unfortunately yourkit agent keeps writing files like /tmp/yjptmp45176_request_buf to the default temporary folder. Is there any way to forward it without changing system-wide tmp folder?
How to change temp folder for linux agent?
-
- Posts: 4
- Joined: Fri Dec 04, 2015 12:29 am
Re: How to change temp folder for linux agent?
I tried the latest version 15082,
few starting lines from agent log:
15082 0.023: uname:
sysname: Linux
release: 2.6.32-573.7.1.el6.x86_64
version: #1 SMP Thu Sep 10 13:42:16 EDT 2015
machine: x86_64
15082 0.023: Linux; fast_thread_cpu_time=1; 64-bit process
15082 0.023: hid: 3602299949431WWZV5UVYXY7U337612Z75 64-bit machine
15082 0.023: Today is 20151203
15082 0.023: full_build_stamp: 15082 201512021537
15082 0.023: Agent library path: /home/appuser/libyjpagent.so
15082 0.023: Agent_OnLoad: orig_options=logdir=/externtal/prof,dir=/external/prof
full_options=logdir=/external/prof,dir=/external/prof
15082 0.023: phase: 1
15082 0.023: jvmtiVersion: 30010201
15082 0.023: vendor: Oracle Corporation
15082 0.023: version: 24.65-b04
15082 0.023: info: mixed mode, sharing
15082 0.024: session_id: 207684592788405 (1449190325,48355)
15082 0.027: line_method: 1
15082 0.037: Reusing existing jar file: /tmp/yjp201512021537.jar
15082 0.037: JVMTI 30010201; 24.65-b04; Oracle Corporation; mixed mode, sharing; JR=0; I=0
15082 0.064: Successfully registered probe classes: 120
... registered various probes
15082 0.518: shmem 42341490: OK
15082 0.519: shmem 4234148E: OK
15082 0.546: Profiler agent is listening on port 10001
15082 0.550: *** HINT ***: To get profiling results, connect to the application from the profiler UI
15082 0.550: agentInit: Core.init() called
15082 0.551: socket timeout: 30000
15082 0.551: agentInit: OK
15082 0.551: startProfiling: 1
... loading classes and exceptions, and finally
15082 46.755: [m: 21559 2601] total classes: processed=9000 instrumented=8997 4501 ms
15082 114.772: F_B_S_W: error: No space left on device
15082 144.803: SP: pin java.net.SocketTimeoutException
15082 144.805: Exception in dispatchRequest(): java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.$$YJP$$socketRead0(Native Method)
at java.net.SocketInputStream.socketRead0(SocketInputStream.java)
at java.net.SocketInputStream.read(SocketInputStream.java:152)
at java.net.SocketInputStream.read(SocketInputStream.java:122)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
at java.io.DataInputStream.readFully(DataInputStream.java:195)
at java.io.DataInputStream.readLong(DataInputStream.java:416)
at com.yourkit.runtime.Packet.readHeader(Packet.java:51)
at com.yourkit.runtime.RequestProcessing.dispatchRequest(RequestProcessing.java:27)
at com.yourkit.runtime.Core$4.run(Core.java:742)
at java.lang.Thread.run(Thread.java:745)
few starting lines from agent log:
15082 0.023: uname:
sysname: Linux
release: 2.6.32-573.7.1.el6.x86_64
version: #1 SMP Thu Sep 10 13:42:16 EDT 2015
machine: x86_64
15082 0.023: Linux; fast_thread_cpu_time=1; 64-bit process
15082 0.023: hid: 3602299949431WWZV5UVYXY7U337612Z75 64-bit machine
15082 0.023: Today is 20151203
15082 0.023: full_build_stamp: 15082 201512021537
15082 0.023: Agent library path: /home/appuser/libyjpagent.so
15082 0.023: Agent_OnLoad: orig_options=logdir=/externtal/prof,dir=/external/prof
full_options=logdir=/external/prof,dir=/external/prof
15082 0.023: phase: 1
15082 0.023: jvmtiVersion: 30010201
15082 0.023: vendor: Oracle Corporation
15082 0.023: version: 24.65-b04
15082 0.023: info: mixed mode, sharing
15082 0.024: session_id: 207684592788405 (1449190325,48355)
15082 0.027: line_method: 1
15082 0.037: Reusing existing jar file: /tmp/yjp201512021537.jar
15082 0.037: JVMTI 30010201; 24.65-b04; Oracle Corporation; mixed mode, sharing; JR=0; I=0
15082 0.064: Successfully registered probe classes: 120
... registered various probes
15082 0.518: shmem 42341490: OK
15082 0.519: shmem 4234148E: OK
15082 0.546: Profiler agent is listening on port 10001
15082 0.550: *** HINT ***: To get profiling results, connect to the application from the profiler UI
15082 0.550: agentInit: Core.init() called
15082 0.551: socket timeout: 30000
15082 0.551: agentInit: OK
15082 0.551: startProfiling: 1
... loading classes and exceptions, and finally
15082 46.755: [m: 21559 2601] total classes: processed=9000 instrumented=8997 4501 ms
15082 114.772: F_B_S_W: error: No space left on device
15082 144.803: SP: pin java.net.SocketTimeoutException
15082 144.805: Exception in dispatchRequest(): java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.$$YJP$$socketRead0(Native Method)
at java.net.SocketInputStream.socketRead0(SocketInputStream.java)
at java.net.SocketInputStream.read(SocketInputStream.java:152)
at java.net.SocketInputStream.read(SocketInputStream.java:122)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
at java.io.DataInputStream.readFully(DataInputStream.java:195)
at java.io.DataInputStream.readLong(DataInputStream.java:416)
at com.yourkit.runtime.Packet.readHeader(Packet.java:51)
at com.yourkit.runtime.RequestProcessing.dispatchRequest(RequestProcessing.java:27)
at com.yourkit.runtime.Core$4.run(Core.java:742)
at java.lang.Thread.run(Thread.java:745)
-
- Posts: 4
- Joined: Fri Dec 04, 2015 12:29 am
Re: How to change temp folder for linux agent?
some paths do not exactly match, as I manually substituted them
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: How to change temp folder for linux agent?
Please use the agent startup option tmpdir=<your alternate directory>
-
- Posts: 4
- Joined: Fri Dec 04, 2015 12:29 am
Re: How to change temp folder for linux agent?
Thanks, the tmpdir option is missing on the options page https://www.yourkit.com/docs/java/help/ ... ptions.jsp
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: How to change temp folder for linux agent?
We'll add its description, thanks for mentioning.
Did you try this option? Did it solve the problem?
Did you try this option? Did it solve the problem?