- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- What is vmtrace ?
Operating System - HP-UX
1753830
Members
9427
Online
108806
Solutions
Forums
Categories
Company
Local Language
юдл
back
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
юдл
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
тАО10-05-2000 12:06 AM
тАО10-05-2000 12:06 AM
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2000 12:19 AM
тАО10-05-2000 12:19 AM
Re: What is vmtrace ?
The vmtrace program is used to enable tracing: this can be performed online without any need to reboot and requires need superuser privilege. The
tool may be run in two ways.
If run without parameters, the program will run in an interactive mode and will prompt for input: this is the easiest way to enable tracing and is highly
recommended. The syntax is:
# vmtrace
It can be useful to specify the required operation from the command line, for example if tracing is to be enabled from within a script. The syntax is:
# vmtrace -b -f
The flags parameter should be an OR of the following values:
1 = Tracing for Memory Corruption
2 = Tracing for Memory Leaks
4 = Tracing for Logging
Examples:
vmtrace -b 0x180 -f 0x1
enable tracing for 256 and 128 size buckets
log for memory corruption
vmtrace -b 0x100 -f 0x7
enable tracing for 256 size buckets
log for memory corruption, memory leaks and general logging.
tool may be run in two ways.
If run without parameters, the program will run in an interactive mode and will prompt for input: this is the easiest way to enable tracing and is highly
recommended. The syntax is:
# vmtrace
It can be useful to specify the required operation from the command line, for example if tracing is to be enabled from within a script. The syntax is:
# vmtrace -b
The flags parameter should be an OR of the following values:
1 = Tracing for Memory Corruption
2 = Tracing for Memory Leaks
4 = Tracing for Logging
Examples:
vmtrace -b 0x180 -f 0x1
enable tracing for 256 and 128 size buckets
log for memory corruption
vmtrace -b 0x100 -f 0x7
enable tracing for 256 size buckets
log for memory corruption, memory leaks and general logging.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2000 12:19 AM
тАО10-05-2000 12:19 AM
Re: What is vmtrace ?
vmtrace establishes file descriptor fd as the trace file and returns the previous value of the trace file descriptor.
The trace descriptor is initially invalid. O
utput is sent
to the trace file by successful allocation events when flag VM_TRACE is on.
maurice
The trace descriptor is initially invalid. O
utput is sent
to the trace file by successful allocation events when flag VM_TRACE is on.
maurice
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2000 12:23 AM
тАО10-05-2000 12:23 AM
Solution
Also :
How to Use vmtrace
By default the performance kernel does not do any tracing. However the kernel contains code for the online tracing of buckets which can be enabled
through the vmtrace program. The steps to be followed are:
1.Identify the bucket size from the dump. This can be done in two ways for memory corruption:
Given the data structure which is corrupted, find the size of the data structure which should give the bucket size
Use the kminfo.pl perl script. The WhichBucket function can be used for corruption. The Dbuckets function can be used for memory
leaks: if there is a bucket with a very large number of pages allocated for that size, it is probable that the corresponding bucket is
leaking.
For more information on how to use the kminfo.pl perl script, please refer to the documentation contained in the script itself.
2.Run the vmtrace program. This is an interactive tool which prompts for bucket sizes and the type of tracing required:
memory corruption
memory leaks
log all memory allocation/deallocation calls
NOTE: this tool should be used with caution: if tracing for memory corruption, please review the warning regarding memory issues before
tracing on multiple buckets.
3.After the dump is taken, analyze the logs using the vmtrace.pl perl script from Q4.
Memory and Performance Degradation
When tracing is enabled, there is some memory and performance degradation. When tracing for memory corruption, all sizes less than a page are
allocated a page and there is therefore an increased use of system memory (i.e. a 64 byte size allocation now uses a page of 4096 bytes). Hence if
the workload on a particular system uses (e.g.) the 256 byte bucket very heavily then there is considerable loss of memory. For normal to heavy
workloads 64MB should be sufficient. In certain cases, however, the overhead could be much higher: for example, if the system was running an
application which memory maps 10,000 segments of 32 pages or less, it could use 10,000 256 byte allocations which with vmtrace would result in
the allocation of 10,000 pages (~40 Mb). Since this is completely dependant on workload and there is no way to determine the potential impact, the
most practical way is to enable corruption tracing online and, if the system runs out of memory, add more physical memory and run it again.
When tracing for memory leaks or general tracing, then the default size for the log is 2MB each. The allocation size remains the same and so there is
no memory issue as in the case of tracing memory corruption. So additional memory is never needed. The performance degradation due to logging
should be negligible.
Known Problems:
In the HP-UX 10.20 Release, vmtrace can cause panics on MP systems. Patches PHKL_8376 (Series 700) or PHKL_8377 (Series 800)
should be installed.
In HP-UX 10.30 and HP-UX 11.0, tracing for leaks can cause panics on MP systems. The work around is to trace for both corruption and
leaks, rather than tracing for leaks alone. This problem has been fixed for HP-UX 11.0 with PHKL_17038 but there is no equivalent patch
for HP-UX 10.30.
NOTE: PHKL_17038 is always required when running vmtrace on HP-UX 11.00 systems.
vmtrace was developed and is maintained by the VM team in the HP-UX Kernel lab, I don't know if it is freely distributable
How to Use vmtrace
By default the performance kernel does not do any tracing. However the kernel contains code for the online tracing of buckets which can be enabled
through the vmtrace program. The steps to be followed are:
1.Identify the bucket size from the dump. This can be done in two ways for memory corruption:
Given the data structure which is corrupted, find the size of the data structure which should give the bucket size
Use the kminfo.pl perl script. The WhichBucket function can be used for corruption. The Dbuckets function can be used for memory
leaks: if there is a bucket with a very large number of pages allocated for that size, it is probable that the corresponding bucket is
leaking.
For more information on how to use the kminfo.pl perl script, please refer to the documentation contained in the script itself.
2.Run the vmtrace program. This is an interactive tool which prompts for bucket sizes and the type of tracing required:
memory corruption
memory leaks
log all memory allocation/deallocation calls
NOTE: this tool should be used with caution: if tracing for memory corruption, please review the warning regarding memory issues before
tracing on multiple buckets.
3.After the dump is taken, analyze the logs using the vmtrace.pl perl script from Q4.
Memory and Performance Degradation
When tracing is enabled, there is some memory and performance degradation. When tracing for memory corruption, all sizes less than a page are
allocated a page and there is therefore an increased use of system memory (i.e. a 64 byte size allocation now uses a page of 4096 bytes). Hence if
the workload on a particular system uses (e.g.) the 256 byte bucket very heavily then there is considerable loss of memory. For normal to heavy
workloads 64MB should be sufficient. In certain cases, however, the overhead could be much higher: for example, if the system was running an
application which memory maps 10,000 segments of 32 pages or less, it could use 10,000 256 byte allocations which with vmtrace would result in
the allocation of 10,000 pages (~40 Mb). Since this is completely dependant on workload and there is no way to determine the potential impact, the
most practical way is to enable corruption tracing online and, if the system runs out of memory, add more physical memory and run it again.
When tracing for memory leaks or general tracing, then the default size for the log is 2MB each. The allocation size remains the same and so there is
no memory issue as in the case of tracing memory corruption. So additional memory is never needed. The performance degradation due to logging
should be negligible.
Known Problems:
In the HP-UX 10.20 Release, vmtrace can cause panics on MP systems. Patches PHKL_8376 (Series 700) or PHKL_8377 (Series 800)
should be installed.
In HP-UX 10.30 and HP-UX 11.0, tracing for leaks can cause panics on MP systems. The work around is to trace for both corruption and
leaks, rather than tracing for leaks alone. This problem has been fixed for HP-UX 11.0 with PHKL_17038 but there is no equivalent patch
for HP-UX 10.30.
NOTE: PHKL_17038 is always required when running vmtrace on HP-UX 11.00 systems.
vmtrace was developed and is maintained by the VM team in the HP-UX Kernel lab, I don't know if it is freely distributable
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP