Results 1 to 3 of 3

Thread: How do I set core_pattern during boot

  1. #1

    Question How do I set core_pattern during boot

    I want to set core_pattern. Well obviously I do
    rparkins64:/home/rparkins # cat /proc/sys/kernel/core_pattern
    core
    rparkins64:/home/rparkins # echo "core.%h.%p" > /proc/sys/kernel/core_pattern
    rparkins64:/home/rparkins # cat /proc/sys/kernel/core_pattern
    core.%h.%p
    rparkins64:/home/rparkins #

    Fine, except that I don't want to do this every day when I reboot my machine: I want it done at startup. So I put the echo command in /etc/init.d/before.local. It doesn't work. I tried creating /etc/init.d/rc5.d/K01before and /etc/init.d/rc5.d/S01before and linking them both to /etc/init.d/before.local - still no joy.

    Where do I put the echo command to get it executed during startup?

    uname -a says Linux rparkins64 3.4.11-2.16-desktop #1 SMP PREEMPT Wed Sep 26 17:05:00 UTC 2012 (259fc87) x86_64 x86_64 x86_64 GNU/Linux
    runlevel says N 5
    Machine is a DELL Latitude D820 with 64-bit openSUSE 12.2

  2. #2
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: How do I set core_pattern during boot

    On 2013-01-10 13:16, richardparkins wrote:
    >
    > I want to set core_pattern. Well obviously I do
    > rparkins64:/home/rparkins # cat /proc/sys/kernel/core_pattern
    > core
    > rparkins64:/home/rparkins # echo "core.%h.%p" >
    > /proc/sys/kernel/core_pattern
    > rparkins64:/home/rparkins # cat /proc/sys/kernel/core_pattern
    > core.%h.%p
    > rparkins64:/home/rparkins #


    Please use code tags (# button) and repost the above.


    > Fine, except that I don't want to do this every day when I reboot my
    > machine: I want it done at startup. So I put the echo command in
    > /etc/init.d/before.local. It doesn't work. I tried creating
    > /etc/init.d/rc5.d/K01before and /etc/init.d/rc5.d/S01before and linking
    > them both to /etc/init.d/before.local - still no joy.


    What openSUSE version? Or more precissely, are you using systemd or systemv?

    12,1 and 12.2 use systemd, and those tricks do not work anymore.

    --
    Cheers/Saludos
    Carlos E. R.

  3. #3
    Join Date
    Sep 2012
    Posts
    4,943

    Default Re: How do I set core_pattern during boot

    Quote Originally Posted by richardparkins View Post
    rparkins64:/home/rparkins # echo "core.%h.%p" > /proc/sys/kernel/core_pattern

    Where do I put the echo command to get it executed during startup?
    You do not. You add setting to /etc/sysctl.d.
    Code:
    echo 'kernel.core_pattern = core.%h.%p' > /etc/sysctl.d/core.conf
    Or whatever name suits you better. Use 'sysctl --system' to load it to avoid reboot.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •