1

I want to know how to use libumem on solaris. If I follow http://www.unix.com/man-page/OpenSolaris/3malloc/umem_debug/ and start the process with all the options, how will I get the output?

Can I get a text file of the results?

I have used wdb on HP-UX for the same. This generates a text file after the program exits, that I can analyze later. Can I do that same for libumem?

Note: This is a remote debugging, I will not have access to the system until afterwards.

KGA
  • 135
  • 1
  • 1
  • 9

2 Answers2

1

You can create a core file of the process before it exits and examine the code with mdb later. One way to generate that core file at the right moment could be a dtrace script that will trigger the gcore just when exit is called.

jlliagre
  • 29,783
  • 6
  • 61
  • 72
  • Thanks jlliagre, can you provide me a pointer to where I should begin looking for such a script? (other that another q on stackoverflow ofcourse!) – KGA May 27 '11 at 00:24
  • Sorry, clarifying that I am on Solaris 9 for now. – KGA May 27 '11 at 07:27
  • With Solaris 9, you might use an interposition library to intercept the exit call an run gcore there. – jlliagre May 31 '11 at 13:02
0

I think libumem will generate a core when things goes wrong , you can analyze this core using mdb , certain commands like ::umem_status , umem_verify will help you in finding the corruption

Simal Haneef
  • 179
  • 5