- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- memory leakage
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
Discussions
Discussions
Forums
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
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
тАО09-20-2001 06:06 AM
тАО09-20-2001 06:06 AM
Not a problem , just a doubt.
What is memory leakage?
how it affects the system performance.
and what are the tools for that.
Thanks
sachin
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2001 06:12 AM
тАО09-20-2001 06:12 AM
Re: memory leakage
Typical tools to check for this would be top, glance, and ps, e.g.
UNIX95= ps -e -o vsz=Kbytes
Hope this helps.
-Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2001 06:16 AM
тАО09-20-2001 06:16 AM
Re: memory leakage
Memory leakage happens when a program has a bug that causes it to use more and more memory without releasing it properly. For example, we are running an Oracle web server here that has a memory leak. As it runs I can use the 'ps' command to see how much memory it uses, and it will continue to increase as long as the program runs, even when all the users disconnect at the end of the day. The answer is to get the bug fixed, or to just stop and restart the offending program at regular intervals. Our web server gets started and stopped each day, so it isn't a big problem for us.
I'm only a novice C programmer, but I believe that misuse of the 'malloc' function for allocating memory can cause memory leakage in C programs. Probably one of the other local experts can explain it better.
A memory leak in one of the system daemons can be a problem, but HP-UX is very mature and those kind of problems are extremely rare.
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2001 06:17 AM
тАО09-20-2001 06:17 AM
SolutionIt's just what it sounds like. The most common
error is that the programmer makes a call to a memory allocation function malloc(),calloc(),realloc(), or the system call sbrk() without
making a matching call to the function free(). One thing to note is that the malloc(), calloc(), etc (as opposed to the sbrk() system call) do not actually return memory to the OS but just make the memory available to the process for reuse. Processes with memory leaks grow with time and can eventually hog all the resources. This is the main reason for not setting maxdsiz to a very large value especially on development machines. The memeory allocations fail when process maxdsiz is reached rather that when almost all the system resources are exhausted.
One fairly easy way to watch for memory leaks is to use the ps -el command and look at the SZ column. You can also unix the UNIX95 versions of ps to do the same thing.
Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2001 06:50 AM
тАО09-20-2001 06:50 AM
Re: memory leakage
Another way to monitor memory leak will be to use
#ipcs -mob command.
Large number of same hex KEY numbers with NATTCH value to 0, can be suspected for memory leaks.
The hex numbers are normally applicaion specified.
Thanks.
Prashant.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2001 08:31 AM
тАО09-20-2001 08:31 AM
Re: memory leakage
Have a look at this thread.
http://us-support.external.hp.com/cki/bin/doc.pl/sid=686b33751acd447b4b/screen=ckiDisplayDocument?docId=200000011495769
Hope this helps.
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2001 04:57 PM
тАО09-20-2001 04:57 PM
Re: memory leakage
allocates memory from the operating system, but does
not return it when done. It is not much of a problem
for programs that run for a short time, as all memory
is returned when the program terminates.
I worked with a SUN system that died due to a memory
leak. There was a requirement to watch the size of
the Oracle processes on the system. A monitoring
process was slowly leaking memory. Post-mortem
analysis showed available swap space slow decreased
over a period of two weeks. During the last day free
memory decreased until there was no memory to
launch a new process.