Limiting the core file size

1.4k Views Asked by At

I am trying to truncate the core file size for my application. I tried using setrlimit() function but had no luck.

Observations:
I set rlim_cur = 270 which is 270 * 1024 = 276480 bytes, and if the core file is less than 276480 bytes only then the core file is getting generated. Core files with more than 276480 bytes size are not generated. When I set rlim_cur = RLIM_INFINITY all core files are getting generated. Basically I am not able to truncate the file size to the required size. Please suggest.

1

There are 1 best solutions below

1
ntshetty On

Try this and this, these linkes explain about hard and soft limits and ulimit command