- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: HPUX 11.00 memory use or leak
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
07-23-2003 04:20 PM
07-23-2003 04:20 PM
HPUX 11.00 memory use or leak
I've been running "swapinfo -a" every hour in a cron sript and recording the percentage of memory used. It is slowly creeping up and has gone from 41% a few days ago to 54% today.
(Swap is still 0%, I only record memory)
Is there any way to tell which process is gradually consuming the memory?
(I do not have glance)
Thankyou for your help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2003 04:37 PM
07-23-2003 04:37 PM
Re: HPUX 11.00 memory use or leak
The memory line in swapinfo refers to pseudo_swap, so that it only shows that the % of memory reserved by processes is increasing. In my opinion this is really not an issue (unless it continues to keep growing) As more processes are started on the server, more swap space needs to be reserved, hence this figure will increase. Its inevitable that it will fluctuate.
I'd be more concerned with monitoring Free Memory on your system.
Without Glance you can use:
# vmstat 1 2| tail -1 | awk '{printf "%d\n", ($5*4)/1024}'
Additionally you may suspect a program has a memory leak. The thread from a few days ago has excellent info on identifying memory leaks.
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x1ec8d7d96cbad711900a0090279cd0f9,00.html
I've attached a HP Doc on swap.
Cheers
Con
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2003 04:47 PM
07-23-2003 04:47 PM
Re: HPUX 11.00 memory use or leak
First, swap is going to be *reserved* when a process allocates [malloc()s] memory but has yet to write to it. You can see this reflected in 'swapinfo'. Once this memory is written to, the *used* component shown in 'swapinfo' will increase accordingly. Most importantly, if the process free()s the memory it has allocated, *no* change in the used fraction will occur until the process which performed the original allocation actually terminates. At that point, only, memory is returned to the operating system. Thus, over time, a gradual decrease in available memory is not unexpected.
If you suspect that a program has a memory leak (at application coding error!), then run the following cmmand periodically and watch for growth in the process size:
...[to target a specific process by its command basename]:
# UNIX95= ps -C thebasename -o "user,vsz,pid,ppid,args"
,,,or, [to watch all processes by descending process size]:
# UNIX95= ps -e -o "user,vsz,pid,ppid,args" | awk 'NR>1' | sort -rnk2
In both cases, the blank (space) character after the equal sign and before the 'ps' command sets the UNIX95 option for the command line only.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2003 05:41 PM
07-23-2003 05:41 PM
Re: HPUX 11.00 memory use or leak
Every time a process opens swap gets reserved.
Here are some data collection scripts that might help.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2003 07:24 PM
07-23-2003 07:24 PM
Re: HPUX 11.00 memory use or leak
If you install the latest q4 patch (it differs depending on the OS), there is a utility in /usr/contrib/Q4/bin called kmeminfo. Run the utility and it will give you an idea of where your memory is going.
As a general rule, look at the percentages going to kernel and user applications. If the kernel is too high, look at the break down and see which component of the kernel is the culprit. For the dynamic area, you will need to look at the buckets/arenas and they are typically fixed by patches.
If the user apps is high, run the utility with the -user option and see which application is the biggest consumer.
Give it a go. It is a very handy utility.
Cheers!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2003 07:34 PM
07-23-2003 07:34 PM
Re: HPUX 11.00 memory use or leak
I am monitoring with a lot more information now and tracked down the process which "grows" on it's memory usage.
Thankyou for everyones help, it has been invaluable as usual :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2003 09:57 PM
07-24-2003 09:57 PM
Re: HPUX 11.00 memory use or leak
FYI: it was HPapache2 V2.0.43.05 and specifically the httpd daemon when running with SSL enabled. If I disable SSL it does not "grow" in it's memory usage.
I am upgrading it to V2.0.45 and in the mean time I have a cron script that re-starts HPapache2 each midnight.
Thankyou for everyones help and a search on this ITRC forum has turned up quite a few good scripts and tools for monitoring our system.
I especially like the "psstat", "shminfo" and "memcheck" C programs I found - a special thankyou to the authors.
If only I could get this level of support on my SUN box :)