generate a core file from a running process

Ask a Question related to AIX, Design and Development.

  1. #1

    Default generate a core file from a running process

    Anyone know if there's a program out there to generate a core file
    from a running process - without stopping it - on AIX (5.1)?

    I'm looking for something like gcore on Solaris, gdb 5.3 supports
    generate-core-file/gcore only on Solaris + linux.
    dbx doesn't appear to support it at all

    Thanks

    Patrick
    Patrick McGleenon Guest

  2. Similar Questions and Discussions

    1. Process Running Under Wrong Credentials
      I have a web service that launches Winword. (I know that MS does not recommend this, but I think I've worked around most of the potential...
    2. check a running process, impersonate
      I found that I could start a process from an aspnet page, but not check to see if it was running! I found a splendid little article that seemed...
    3. running .exe in PHP, but not as a process
      I am using PHP as an ISAPI module, and I have an executable (.exe) file that must be run from PHP, but not as a "background process". For example if...
    4. Two Worker Process running at once
      I have been having a problem where two aspnet_wp are starting when I view a web page I made. This has just started happening. If anyone has had a...
    5. current process running a script
      thanks for all.. "Tony Walton" <tony.walton@s-u-n.com> wrote in message news:3EF70D13.7080308@s-u-n.com...
  3. #2

    Default Re: generate a core file from a running process

    Patrick McGleenon <patrick.mcgleenon@openwave.com> wrote:
    PM> Anyone know if there's a program out there to generate a core file
    PM> from a running process - without stopping it - on AIX (5.1)?

    PM> I'm looking for something like gcore on Solaris, gdb 5.3 supports
    PM> generate-core-file/gcore only on Solaris + linux.
    PM> dbx doesn't appear to support it at all

    Last I checked, AIX doesn't support this. I believe Solaris and
    Linux both use the proc filesystem to generate core files in this
    manner. AIX now has a proc filesystem, so if you have IBM support
    you can call them and submit a change request.

    Regards,

    Nicholas

    --
    "Why shouldn't I top-post?" [url]http://www.aglami.com/tpfaq.html[/url]
    "Meanings are another story." [url]http://www.ifas.org/wa/glossolalia.html[/url]
    Nicholas Dronen Guest

  4. #3

    Default Re: generate a core file from a running process

    "Patrick McGleenon" <patrick.mcgleenon@openwave.com> wrote in message
    news:e3ea0830.0309241451.34b35bbd@posting.google.c om...
    > Anyone know if there's a program out there to generate a core file
    > from a running process - without stopping it - on AIX (5.1)?
    >
    > I'm looking for something like gcore on Solaris, gdb 5.3 supports
    > generate-core-file/gcore only on Solaris + linux.
    > dbx doesn't appear to support it at all
    >
    > Thanks
    >
    > Patrick
    How about something like this:

    pid_t ChildPid;
    int Status;
    void (*PrevSIGABT)(int);

    PrevSIGIOT = signal(SIGABT, SIG_DFL);

    ChildPid = fork();
    if (ChildPid == NULL)
    abort();
    else
    waitpid(ChildPid, &Status, NULL);

    signal(SIGABT, PrevSIGABT);


    AG Guest

  5. #4

    Default Re: generate a core file from a running process

    AG <DONOTREPLY@atcomcastdotnet> wrote:
    A> "Patrick McGleenon" <patrick.mcgleenon@openwave.com> wrote in message
    A> news:e3ea0830.0309241451.34b35bbd@posting.google.c om...
    >> Anyone know if there's a program out there to generate a core file
    >> from a running process - without stopping it - on AIX (5.1)?
    >>
    >> I'm looking for something like gcore on Solaris, gdb 5.3 supports
    >> generate-core-file/gcore only on Solaris + linux.
    >> dbx doesn't appear to support it at all
    >>
    >> Thanks
    >>
    >> Patrick
    A> How about something like this:

    A> pid_t ChildPid;
    A> int Status;
    A> void (*PrevSIGABT)(int);

    A> PrevSIGIOT = signal(SIGABT, SIG_DFL);

    A> ChildPid = fork();
    A> if (ChildPid == NULL)
    A> abort();
    A> else
    A> waitpid(ChildPid, &Status, NULL);

    A> signal(SIGABT, PrevSIGABT);

    True enough, but that only applies in the case where you have
    the source code to the application.

    Regards,

    Nicholas

    --
    "Why shouldn't I top-post?" [url]http://www.aglami.com/tpfaq.html[/url]
    "Meanings are another story." [url]http://www.ifas.org/wa/glossolalia.html[/url]
    Nicholas Dronen Guest

  6. #5

    Default Re: generate a core file from a running process

    You can use "gencore" on AIX 5.2

    Not sure is backported to 5.1, raise a PMR with IBM support to backport it.

    [url]http://publib16.boulder.ibm.com/doc_link/en_US/a_doc_lib/cmds/aixcmds2/gencore.htm[/url]

    Rgds
    Mark
    mark taylor Guest

  7. #6

    Default Re: generate a core file from a running process

    mark taylor <mky@talk21.com> wrote:
    mt> You can use "gencore" on AIX 5.2

    mt> Not sure is backported to 5.1, raise a PMR with IBM support to backport it.

    mt> [url]http://publib16.boulder.ibm.com/doc_link/en_US/a_doc_lib/cmds/aixcmds2/gencore.htm[/url]

    Hooray!

    --
    "Why shouldn't I top-post?" [url]http://www.aglami.com/tpfaq.html[/url]
    "Meanings are another story." [url]http://www.ifas.org/wa/glossolalia.html[/url]
    Nicholas Dronen Guest

  8. #7

    Default Re: generate a core file from a running process

    [email]mky@talk21.com[/email] (mark taylor) wrote :
    > You can use "gencore" on AIX 5.2
    >
    > Not sure is backported to 5.1, raise a PMR with IBM support to backport it.
    >
    > [url]http://publib16.boulder.ibm.com/doc_link/en_US/a_doc_lib/cmds/aixcmds2/gencore.htm[/url]
    >
    > Rgds
    > Mark
    Hi

    Thanks Mark, that's what I was looking for

    Patrick
    Patrick McGleenon Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139