3

JVM runs on FreeBSD with 18Gb memory. creating core file takes about hour, which is very slow, so i need some way to disable it.

trincot
  • 317,000
  • 35
  • 244
  • 286
antony
  • 162
  • 2
  • 10
  • Something is really weird with your system. Writing an 18Gb memory image to a file should not take 1 hour. – Stephen C Apr 01 '10 at 04:06

3 Answers3

6

I'm not sure this will work, but if you're using the HotSpot VM, try this in the arguments to the java command:

-XX:HeapDumpPath=/dev/null

If you want to turn off core dumps altogether, you can use the ulimit approach (make sure to use the -H flag to set the hard limit):

ulimit -c -H 0
Rob Heiser
  • 2,792
  • 1
  • 21
  • 28
2

If you really mean a core file, and not something specific to java, then you need to use the ulimit command to set the maximum core file size to something small.

bmargulies
  • 97,814
  • 39
  • 186
  • 310
2

If this is an OS crash dump then use ulimit to set the maximum core size to 0.

caskey
  • 12,305
  • 2
  • 26
  • 27