- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- pstat_getprocvm - finding what's being used by the...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2003 10:27 AM - last edited on 01-01-2013 07:14 PM by Cathy_xu
01-23-2003 10:27 AM - last edited on 01-01-2013 07:14 PM by Cathy_xu
As a part of diagnosing a memory leak problem, I must find out what each region holds in a process. For example, can a shared library get loaded into the regions.
I need a way to identify (printable names) from these regions about what they are. Are you aware of a function that can do this?
Thanks in advance for your help!
Tony Chou
P.S.This thread has been moved from HP-UX>System Administration to HP-UX > languages- HP Forums Moderator
Solved! Go to Solution.
- Tags:
- pstat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2003 09:04 AM
01-24-2003 09:04 AM
SolutionIf you need to use the pstat* syscalls to get this information, you might try the pstat_getfiledetails() call using the pst_fid field of the structure thats returned from pstat_getprocvm(). Once you have that, you've effectively got the inode number and the file name is only a short ftw() (or find) away.
Regards,
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2003 11:23 AM
01-24-2003 11:23 AM
Re: pstat_getprocvm - finding what's being used by the regions
If that's the case, could you recommend other routes? When I check glance it showed me the inodes but I don't know how to read them since they are abbreviated...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2003 01:23 PM
01-28-2003 01:23 PM
Re: pstat_getprocvm - finding what's being used by the regions
It does not file-tree-walk from every mount point, but instead does a faster search from data read in advance using nftw on a limit list of directories.
Shared libraries actually load into up to three regions each. There is a separate region for text, initialized data, and uninitialized (BSS) data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2003 12:21 AM
01-29-2003 12:21 AM
Re: pstat_getprocvm - finding what's being used by the regions
install PHCO_28067 (11.11) and try the tool /usr/contrib/Q4/bin/kmeminfo. Especially the -user and the -pid options should help you finding your leak.
Best regards...
Dietmar.
- Tags:
- kmeminfo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2003 06:12 AM
01-29-2003 06:12 AM
Re: pstat_getprocvm - finding what's being used by the regions
Since I'm not a sys admin, there is one thing I need to learn.
I was able to run kmeminfo.11.00 but it complained about this:
libp4 (4.14):Opening /stand/vmunix /dev/kmem
I'm guessing that I must be a root to run this?
Thanks again for your help. Have a great day!
Sincerely,
Tony
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2003 11:00 AM
01-29-2003 11:00 AM
Re: pstat_getprocvm - finding what's being used by the regions
When one memory region grows over time, does it mean the shared library in that region is responsible for the growth? What I'm seeing now is that there is no memory growth in the memory region in which the shared library resides but in the memory region in which the main program resides.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2003 05:22 AM
01-31-2003 05:22 AM
Re: pstat_getprocvm - finding what's being used by the regions
You are right. You need read access to /dev/kmem. A normal user should not have that. :-)
Your pregions have several types (TEXT, DATA, MMAP, STACK, etc.). When a shared library is used then this is typically MMAP and holds the libraries text. Your process's private memory allocations come from DATA pregions.
Usually a memory leaking user process leads to an increasing DATA segment. Also dynamic allocations done by shared librariy code.
Best regards...
Dietmar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2003 05:39 AM
01-31-2003 05:39 AM
Re: pstat_getprocvm - finding what's being used by the regions
Tony