core file for each applications - HP UX

This is a discussion on core file for each applications - HP UX ; Hi, In our application if there is a dump on few servers , th core files are overwritten. In solaris when I work , i see different core files for each dump and its easier to track. Could I do ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: core file for each applications

  1. core file for each applications

    Hi,

    In our application if there is a dump on few servers , th core files
    are overwritten.
    In solaris when I work , i see different core files for each dump and
    its easier to track.

    Could I do the same by making some changes or adding some patches to by
    HP11.23 machine.

    Thanks in advance for your replies.
    Regards
    -Amit-


  2. Re: core file for each applications

    Amsidory wrote:
    > In our application if there is a dump on few servers , th core files
    > are overwritten.
    > In solaris when I work , i see different core files for each dump and
    > its easier to track.
    >
    > Could I do the same by making some changes or adding some patches to by
    > HP11.23 machine.
    >


    You can use coreadm(1M) to administer the core pattern,
    behavior etc. The manpage has some sample core on how
    to use the API.

    --vishwas

  3. Re: core file for each applications

    Amsidory wrote:
    > In our application if there is a dump on few servers , th core files
    > are overwritten.
    > In solaris when I work , i see different core files for each dump and
    > its easier to track.
    >
    > Could I do the same by making some changes or adding some patches to by
    > HP11.23 machine.
    >


    In 11.23 one can use coreadm(2) to administer the core
    pattern, behavior etc. The manpage has some sample code
    on how to use the API.

    --vishwas

  4. Re: core file for each applications

    Amsidory wrote:
    > In our application if there is a dump on few servers , th core files
    > are overwritten.
    > In solaris when I work , i see different core files for each dump and
    > its easier to track.
    >
    > Could I do the same by making some changes or adding some patches to by
    > HP11.23 machine.


    Right now I don't see anything such available. You can probably
    check for the existence of "core" file in your main() and
    move it to a different file name. Later you can run `file`
    on "core" file to check which program caused the core
    dump. core(4) mentions some structures which one can use
    while reading core file using a program. I'm not sure
    how to use them exactly.

    --vishwas

  5. Re: core file for each applications

    Vishwas Pai wrote:
    > Amsidory wrote:
    >> In our application if there is a dump on few servers , th core files
    >> are overwritten.
    >> In solaris when I work , i see different core files for each dump and
    >> its easier to track.
    >>
    >> Could I do the same by making some changes or adding some patches to by
    >> HP11.23 machine.

    >
    > Right now I don't see anything such available.


    My bad! I was pointed to
    http://www.faqs.org/faqs/hp/hpux-faq/section-301.html

    But setting it is not using SAM (as mentioned in the doc).
    Use the following ...

    # echo 'core_addpid/W 1' | adb -w /stand/vmunix /dev/kmem

    --vishwas.

  6. Re: core file for each applications

    Thanks Vishwas,

    I will try changing the kernel parameters and see if it helps. Also
    Iwas wondering because coreadm was not found on HP and neither did SAM
    help.

    Many thanks..will keep you informed.
    Regards
    -Amit-


  7. Re: core file for each applications

    "Amsidory" writes:

    > Hi,
    >
    > In our application if there is a dump on few servers , th core files
    > are overwritten.
    > In solaris when I work , i see different core files for each dump and
    > its easier to track.


    Be advised that someone might misuse that feature as a denial of service
    (cause creation of quite a lot of core files until the filesystem is full)

    >
    > Could I do the same by making some changes or adding some patches to by
    > HP11.23 machine.
    >
    > Thanks in advance for your replies.
    > Regards
    > -Amit-


+ Reply to Thread