Recently, JDK tools jmap and jstack are often used to dump JVM heap and JVM thread stack log to analyze problems. When executing these two commands, I was most puzzled when I encountered this problem: well-known file is not secure
eg:
Google the Internet and find the answer on stackoverflow http://stackoverflow.com/questions/9100149/jstack-well-known-file-is-not-secure?rq=1
It means:
We can find/TMP/hsperfdata on the machine_ $user/$PID is such a file. When we execute jmap or jstack, we first check whether the user executing the command is in contact with hsperfdata_ The users of the $user file are consistent. If not, switch to consistent and then execute.
Get current heap snapshot
jmap – dump:format=b ,file=./ heap.hprof 20344(pid)
20344: well-known file is not secure
sudo -u app-cfg-api jmap – dump:format=b ,file=./ heap.hprof 20344
Dumping heap to /tmp/hsperfdata_ app-cfg-api/ heap.hprof …
Heap dump file created
Similar Posts:
- Error reported by jmap command under Windows
- Jstack Run Command Error:Unable to open socket file: target process not responding or HotSpot VM not loaded
- The solution of JPS process information unavailable
- [JVM] Linux calls jmap and reports an error permission denied
- [Solved] “/bin/bash^M: bad interpreter: No such file or directory”
- oracle No more data to read from socket ora-07445 [How to Solve]
- jhsdb jmap –heap –pid 1 Command Error [How to Solve]
- How to Solve MySQL Secure file priv error
- NPM Command Error: Allocation failed – JavaScript heap out of memory
- OSError: [WinError 126] Could not find the specified Module self._handle = _dlopen(self._name, mode)