Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1275
  • Last Modified:

ulimit for core file size

[webadmin]$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
file size               (blocks, -f) unlimited
pending signals                 (-i) 1024
max locked memory       (kbytes, -l) 32
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 1191936
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
[webadmin]$


We got core dumps produced on this server recently, the core dump file size is 2GB, but we are not able to analyse the core dump file using dump analyser,
when i checked the ulimit for core file size it is set to zero as it shows in the above output, i was wondering if it is set to zero then how a 2GB core dump file
got generated, is it possible to set to the core file size to unlimited, we have to the same problem in production servers, IBM is asking us to set core file size to
unlimited, so that the next core dump files will be legitimate. How to set core dump file size to unlimited

Note: I thought value zero could be taken as unlimited in some scenarios, but here i see for unlimited i see explicitely it is defined as unlimited.
0
wasman
Asked:
wasman
  • 4
  • 3
1 Solution
 
wesly_chenCommented:
> was wondering if it is set to zero then how a 2GB core dump file got generated,
User can change their setting in the shell or script

> is it possible to set to the core file size to unlimited,
ulimit -c unlimited

or edit /etc/security/limits.conf
--------
*   hard    core    unlimited
0
 
wasmanAuthor Commented:
I set the ulimit for core file size to unlimited but that implies only for my user id webadmin session, but how to set it for my WebSphere server which run by user id spher1,
if in change it in /etc/security/limits.conf, will it take effect for all user sessions in that server ?

webadmin$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
file size               (blocks, -f) unlimited
pending signals                 (-i) 1024
max locked memory       (kbytes, -l) 32
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 1191936
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
webadmin$

webadmin$ ulimit -c unlimited

webadmin$ ulimit -a
core file size          (blocks, -c) unlimited
data seg size           (kbytes, -d) unlimited
file size               (blocks, -f) unlimited
pending signals                 (-i) 1024
max locked memory       (kbytes, -l) 32
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 1191936
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
0
 
arnoldCommented:
ulimit -a that you ran applys to the user and at times reflects a system wide
who, what process generated the coredump?
gdb is a good tool to analyze coredumps to determine the cause and get a fix.
Users often do not need to see coredumps, a service on the other hand does since that is how you can fix it.
I.e. your web application stops working every few days. By disabling the coredump for it, you'll have to time your monitoring of the application perfectly i.e. as soon as you start monitoring (strace) it crashes.
The various log files also provide information on errors experienced when an application crashed.
0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
wesly_chenCommented:
> if in change it in /etc/security/limits.conf, will it take effect for all user sessions in that server ?
Yes.
0
 
wesly_chenCommented:
> how to set it for my WebSphere server which run by user id spher1,
Add
ulimit -c unlimited
into ~spher1/.bashrc
0
 
wasmanAuthor Commented:
Chen,
Below is my java process info, where WebSphere software is owned by root and server is started as sphere1 user and runs as sphere1 user.
so i need add ulimit -c unlimited in .bashrc in both /root/.bashrc and /home/sphere1/.bashrc

webadmin$ ps -ef | grep java
root      2709     1  0 Mar31 ?        00:19:29 /opt/WebSphere6.1/AppServer/java/bin/java
webadmin  13566 13418  0 17:38 pts/3    00:00:00 grep java
sphere1   14346     1  4 Apr14 ?        05:30:43 /opt/WebSphere6.1/AppServer/java/bin/java
root     23911 23724  0 Feb04 ?        02:47:22 /opt/IBM/ilmt/wasagent/jre/bin/java -classpath properties:lib/com.ibm.ws.admin.client_6.1.0.jar:lib/com.ibm.ws.runtime_6.1.0.jar:lib/com.ibm.ws.security.crypto_6.1.0.jar:wasagent.jar:resources.jar:jlog.jar:jffdc.jar:tivolicommondir.jar:ITLMToolkit.jar -Djlog.propertyFileDir=/opt/IBM/ilmt/wasagent -Ditlm.agent.dir=/opt/IBM/ilmt -Dcom.ibm.SOAP.ConfigURL=file:/opt/IBM/ilmt/wasagent/properties/soap.client.props -Djava.naming.factory.initial=com.ibm.websphere.naming.WsnInitialContextFactory -Ditlm.config.dir=/etc -Ditlm.agent.pid=23724 com.ibm.it.rome.wasagent.WASAgent


If i set ulimit for core file size to unlimited, will it have any negative impact on the server or filesystem
0
 
wesly_chenCommented:
It depends on how big is your disk space on spher1's and root's home directories.
If you have really a lot disk space, then it is ok. But it is not recommended and you need to clean up those coredump file periodically.
0
 
wasmanAuthor Commented:
Hi Chen,

Thanks a lot for your help, i posted another similar question (http://www.experts-exchange.com/OS/Linux/Q_26967601.html) , please help me on that also
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now