Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to clear hs_err_pid log file in home directory

Tags:

java

linux

I have lots of log file in my home directory:

hs_err_pid2326.log
hs_err_pid2416.log

I believe it is a java error log file, how to remove it and stop creating them?

Java version:

[kelvin@localhost ~]$ java -version
java version "1.6.0_21"
Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
Java HotSpot(TM) Server VM (build 17.0-b16, mixed mode
like image 255
kelvinfix Avatar asked Sep 08 '11 14:09

kelvinfix


2 Answers

They are created if and when the JVM crashes; they're analogous to a core file, but contain a lot of Java-specific information. They're just text files, and you can delete them like you would any other files:

$ rm ~/hs_err_pid*.log

You can stop creating them by no longer crashing the JVM. Normally, such crashes are rare. Look at the files themselves in a text editor and they will contain some info about their origins.

like image 86
Ernest Friedman-Hill Avatar answered Oct 03 '22 03:10

Ernest Friedman-Hill


These are Java crash (core) dump log files. Identify which Java process creates them by tracing and monitoring the PID.

like image 31
adarshr Avatar answered Oct 03 '22 03:10

adarshr