Operating System - HP-UX
1826572 Members
3753 Online
109695 Solutions
New Discussion

Re: How to initiate a dump upon a process on HPUX?

 
SOLVED
Go to solution
Yan Xiaoming
New Member

How to initiate a dump upon a process on HPUX?

Hi,

I'm working on a customer's site.
Their system is HPUX.
I want to write a script when the memory consumption of a specific process reached 2M, a memory dump of the process is initiated.

I know livedump, but it seems to be OS level. But, I just want to get the information about the process not the OS.

Any advice is highly appreciated.

Regards,
Tony
7 REPLIES 7
Laurent Menase
Honored Contributor

Re: How to initiate a dump upon a process on HPUX?

just kill it with kill -6 signal.
Horia Chirculescu
Honored Contributor

Re: How to initiate a dump upon a process on HPUX?

You can read:

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=945279

I only underline that for any system, kill -l would list all values of signame supported.

Best regards,
Horia.
Best regards from Romania,
Horia.
Yan Xiaoming
New Member

Re: How to initiate a dump upon a process on HPUX?

Thank you for your quick response.

But I just don't want to kill the process because it may be still running. It's maybe hanging...

I just want to get the memory detail when it's hanging, I want to know why it's using 2G memory?

Is there some way to dump without killing the process?

Thanks again for your help.

Regards,
Tony
Horia Chirculescu
Honored Contributor

Re: How to initiate a dump upon a process on HPUX?

Well, only if you process handle the signal (some signal) in other way.

You should check your process manual.

Best regards,
Horia.
Best regards from Romania,
Horia.
Dennis Handly
Acclaimed Contributor

Re: How to initiate a dump upon a process on HPUX?

>I want to write a script when the memory consumption of a specific process reached 2M, a memory dump of the process is initiated.

2 Mb is pretty small, 2 Gb? To get 2 Gb, are you compiling with +DD64?
What do you plan to do with the dump?

>Is there some way to dump without killing the process?

wdb has a gcore command.

Yan Xiaoming
New Member

Re: How to initiate a dump upon a process on HPUX?

Yes, I mean 2G MEM.
The customer is using BusinessObjects solution and they want to monitor a process which may hang up without any notification...
So we want to monitor this process without killing it (because it maybe not dead) when its memory consumption is more than 2G and trigger writing memory information into dump file for further debug.

I have checked "gcore" command document, it seems to meet my requirement...
Thank you very much for your advice.
And I'll have a try.

Regards,
Tony
Dennis Handly
Acclaimed Contributor
Solution

Re: How to initiate a dump upon a process on HPUX?

>I have checked "gcore" command document, it seems to meet my requirement.

It writes all of memory to the core file.
Or if you are looking for leaks, you can use wdb's heap checking commands.

>Thank you very much for your advice.

If you are happy with the answers you got, please read the following on how to assign points:
http://forums.itrc.hp.com/service/forums/helptips.do?#33