HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to monitoring sysmap structure
Operating System - HP-UX
1834758
Members
3146
Online
110070
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
Forums
Discussions
Discussions
Discussions
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
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-2003 05:27 PM
10-05-2003 05:27 PM
How to monitoring sysmap structure
I have a test machine rp5470 which is run on HP-UX 11.0
When I check proc structure, I used Q4.
Q4> load struct proc from proc max nproc
I want to check structure sysmap.
q4> fields -c struct sysmap
can't find "struct sysmap" in the catalog
How can I get the information of kernel memory?
When I check proc structure, I used Q4.
Q4> load struct proc from proc max nproc
I want to check structure sysmap.
q4> fields -c struct sysmap
can't find "struct sysmap" in the catalog
How can I get the information of kernel memory?
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2003 07:55 PM
10-05-2003 07:55 PM
Re: How to monitoring sysmap structure
Heres a script that used to work on 10.20 or 11.0(32bit). You can see how it works and you should be able to adapt for 11/64, eg. change adb to adb64 and the sysmap_32bitxxx variables to 64bit.
#!/usr/bin/sh
# a crude tool to monitor sysmap fragmentation
# print warning to stderr if less then WARN percent of
# sysmap entries are free, or no chunk of size MINCHUNK available
# WARN=10 and MINCHUNK=50000 are guesses only, no scientifically
# determined default values
# may be adapted to 9.X (but why?), possibly to read dumps
# or other maps
# NOTE:
# The sysmap table holds entries for free and used virtual memory
# locations. If sysmap becomes full, you cannot allocate any more
# open virtual memory addresses (sysmap ovflo error in dmesg).
# From HP-UX 10.X to 10.20, the number of sysmap entries is determined
# by 2*nproc, if nproc is larger than 800, otherwise the number of
# entries is set to 800.
# From HP-UX 10.30 and later the kernel tunable parameter 'nsysmap'
# allows you to appropriately size the map.
WARN=10
MINCHUNK=50000
ADB=/usr/bin/adb64
#OPT=-k /stand/vmunix /dev/kmem
OPT="/stand/vmunix /dev/kmem"
get_one_value()
{
echo $1|$ADB $(echo $OPT)|tail -1|awk '{print $2}'
}
#typeset -i SYSMAP=$(get_one_value sysmap/D)
#typeset -i SYSMAP_END=$(get_one_value sysmapNSYSMAP/D)
#typeset -i SYSMAP_END1=$(get_one_value 0d$SYSMAP/D)
if [ `uname -r` = "B.11.00" ]
then
SYSMAP=$(get_one_value sysmap_32bit/D)
SYSMAP_END=$(get_one_value sysmap_32bitNSYSMAP/D)
else
SYSMAP=$(get_one_value sysmap/D)
SYSMAP_END=$(get_one_value sysmapNSYSMAP/D)
fi
SYSMAP_END1=$(get_one_value 0d$SYSMAP/D)
#echo "*$SYSMAP* *$SYSMAP_END* *$SYSMAP_END1*"
if [ $SYSMAP_END -ne $SYSMAP_END1 ]; then
echo $0: Unable to determine size of sysmap - exiting
exit 1
fi
(( MAPSIZE = ( SYSMAP_END - SYSMAP ) / 8 ))
(( MAPLINES = MAPSIZE - 2 ))
(( SYSMAP = SYSMAP + 8 ))
FREE=0
(echo "0d$SYSMAP/2D"; yes "" | head -n $MAPLINES)\
| $ADB $(echo $OPT) |
awk ' { if ( ($2 == 0) ($3 == 0) )
{ FREE = FREE + 1 }
else { FREE = 0 }
if ( $2 > MAX ) { MAX = $2; }
}
END{ print FREE, MAX } ' |
read FREE MAX
echo $FREE of $MAPSIZE entries in sysmap are free
echo maximum available chunk size is $MAX
PCT=0
(( PCT = ( 100 * FREE ) / MAPSIZE ))
if [ $PCT -lt $WARN -o $MAX -lt $MINCHUNK ]; then
if [ $PCT -lt $WARN ] ; then
echo $0: Warning: less than $WARN percent of sysmap are free >&2
fi
if [ $MAX -lt $MINCHUNK ]; then
echo $0: Warning: no chunk of size $MINCHUNK in sysmap >&2
fi
exit 1
else
exit 0
fi
#!/usr/bin/sh
# a crude tool to monitor sysmap fragmentation
# print warning to stderr if less then WARN percent of
# sysmap entries are free, or no chunk of size MINCHUNK available
# WARN=10 and MINCHUNK=50000 are guesses only, no scientifically
# determined default values
# may be adapted to 9.X (but why?), possibly to read dumps
# or other maps
# NOTE:
# The sysmap table holds entries for free and used virtual memory
# locations. If sysmap becomes full, you cannot allocate any more
# open virtual memory addresses (sysmap ovflo error in dmesg).
# From HP-UX 10.X to 10.20, the number of sysmap entries is determined
# by 2*nproc, if nproc is larger than 800, otherwise the number of
# entries is set to 800.
# From HP-UX 10.30 and later the kernel tunable parameter 'nsysmap'
# allows you to appropriately size the map.
WARN=10
MINCHUNK=50000
ADB=/usr/bin/adb64
#OPT=-k /stand/vmunix /dev/kmem
OPT="/stand/vmunix /dev/kmem"
get_one_value()
{
echo $1|$ADB $(echo $OPT)|tail -1|awk '{print $2}'
}
#typeset -i SYSMAP=$(get_one_value sysmap/D)
#typeset -i SYSMAP_END=$(get_one_value sysmapNSYSMAP/D)
#typeset -i SYSMAP_END1=$(get_one_value 0d$SYSMAP/D)
if [ `uname -r` = "B.11.00" ]
then
SYSMAP=$(get_one_value sysmap_32bit/D)
SYSMAP_END=$(get_one_value sysmap_32bitNSYSMAP/D)
else
SYSMAP=$(get_one_value sysmap/D)
SYSMAP_END=$(get_one_value sysmapNSYSMAP/D)
fi
SYSMAP_END1=$(get_one_value 0d$SYSMAP/D)
#echo "*$SYSMAP* *$SYSMAP_END* *$SYSMAP_END1*"
if [ $SYSMAP_END -ne $SYSMAP_END1 ]; then
echo $0: Unable to determine size of sysmap - exiting
exit 1
fi
(( MAPSIZE = ( SYSMAP_END - SYSMAP ) / 8 ))
(( MAPLINES = MAPSIZE - 2 ))
(( SYSMAP = SYSMAP + 8 ))
FREE=0
(echo "0d$SYSMAP/2D"; yes "" | head -n $MAPLINES)\
| $ADB $(echo $OPT) |
awk ' { if ( ($2 == 0) ($3 == 0) )
{ FREE = FREE + 1 }
else { FREE = 0 }
if ( $2 > MAX ) { MAX = $2; }
}
END{ print FREE, MAX } ' |
read FREE MAX
echo $FREE of $MAPSIZE entries in sysmap are free
echo maximum available chunk size is $MAX
PCT=0
(( PCT = ( 100 * FREE ) / MAPSIZE ))
if [ $PCT -lt $WARN -o $MAX -lt $MINCHUNK ]; then
if [ $PCT -lt $WARN ] ; then
echo $0: Warning: less than $WARN percent of sysmap are free >&2
fi
if [ $MAX -lt $MINCHUNK ]; then
echo $0: Warning: no chunk of size $MINCHUNK in sysmap >&2
fi
exit 1
else
exit 0
fi
Im from Palmerston North, New Zealand, but somehow ended up in London...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2003 04:05 AM
10-06-2003 04:05 AM
Re: How to monitoring sysmap structure
You should have a look at the kmeminfo tool that comes with Q4, e.g. PHCO_28601 for 11.00). It's located in /usr/contrib/Q4/bin.
Try:
# kmeminfo -sysmap
or for older revisions:
# kmeminfo -o sysmap
Best regards...
Dietmar.
Try:
# kmeminfo -sysmap
or for older revisions:
# kmeminfo -o sysmap
Best regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
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.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP