Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to provide support for core dump on my ARM based target. I have read about both /etc/limits and /etc/security/limits.conf. My target file system doesn't have the latter one on to it. So I have made below changes to /etc/limits

root C100000

After adding this line to /etc/limits was expecting the generation of core file but ulimit -a shows me

core file size (blocks, -c) 0

Why these changes into /etc/limits does not at all reflecting.

Now what should I have to do?

Do I have to add /etc/security/limits.conf to my filesystem?

I am not looking at option of using setrlimit().

share|improve this question
    
Why can't you use ulimit -c unlimited or similar variation of the ulimit command to enable core dumps? – sawdust Aug 22 '13 at 8:57
    
/etc/security/limits.conf is read by PAM and /etc/limits is read by the shadow login suite; both apply to logged-in users and are installed on most non-embedded system. There's no point in creating configuration files for software that isn't present. Is your userland BusyBox? Or something else? – Gilles Aug 22 '13 at 9:35
    
@Gilles our /etc/limits are definately coming from Shadow package,I am not sure my userland is Busybox or something else ,I do I check it?? – AMIT Aug 22 '13 at 9:45

Depending on your system you might also have to edit /etc/pam.d/common-session* and add

session required pam_limits.so

And of course you have to start a new session for your changes to apply.

share|improve this answer
    
Do not have pam.d on my file system – AMIT Aug 22 '13 at 9:09
    
Then I guess on a stripped down system you might have to fall back to setrlimit(). – scai Aug 22 '13 at 9:36

For creating core dump add following command to /etc/profile

ulimit -c 10000

This command set the size limit of core files to 10000 bytes (You can change it to unlimited). Then execute /etc/profile/ again with source /etc/profile or . /etc/profile

share|improve this answer
    
We can't add /etc/profile file since if we change /etc/profille then This will only take affect for program launched from a login shell, not for processes/services started by systemd. /etc/limits would the the proper location for settings these defaults – AMIT Aug 22 '13 at 9:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .