HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to get instruction and Data cache sizes fr...
Operating System - HP-UX
1838507
Members
2975
Online
110126
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
07-03-2006 10:09 PM
07-03-2006 10:09 PM
How to get instruction and Data cache sizes from command or APIs.
Hi all,
To one of my application I wanted to get the size of instruction and Datacache. Can anyone help me out regarding to this?
-shivu
To one of my application I wanted to get the size of instruction and Datacache. Can anyone help me out regarding to this?
-shivu
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2006 06:02 AM
07-05-2006 06:02 AM
Re: How to get instruction and Data cache sizes from command or APIs.
Shivu,
I'm not sure that I understand your question completely.
If 'nbuf' and 'bufpages' are both set to 0, you have a dynamic buffer cache, whose size is between 'dbc_min_pct' and 'dbc_max_pct'. 'kmtune -l' will list kernel params.
To get the current size of your OS buffer cache, enter 'glance -m' and look at 'Buf Cache'.
PCS
I'm not sure that I understand your question completely.
If 'nbuf' and 'bufpages' are both set to 0, you have a dynamic buffer cache, whose size is between 'dbc_min_pct' and 'dbc_max_pct'. 'kmtune -l' will list kernel params.
To get the current size of your OS buffer cache, enter 'glance -m' and look at 'Buf Cache'.
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2006 10:47 AM
07-05-2006 10:47 AM
Re: How to get instruction and Data cache sizes from command or APIs.
You may be able to see this initially from the dmesg file on more recent servers otherwise, there may be an option from the getconf or sysconf command. You can check the man pages at docs.hp.com. I didn't see it at a quick glance. In some cases you may be able to know this from the processor type and speed, but not always.
Mom 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2006 10:51 AM
07-05-2006 10:51 AM
Re: How to get instruction and Data cache sizes from command or APIs.
No, this question has nothing to do with buffer cache; it's related to on-CPU or near CPU (L2,L3) very fast memory so that main memory does not have to be fetched.
By definition, any attempt to extract these data is going to be non-portable.
I can't imagine why anything other than an Assembler or an Optimizer would care (and even then the current machimne might not match the target machine) but here is one approach for HP-UX leveraging the STM commands. I assume that you have installed STM.
#!/usr/bin/sh
typeset DEV=""
typeset TDIR=${TMPDIR:-/var/tmp}
typeset T1=${TDIR}/X${$}_1.txt
typeset -i STAT=254
trap 'eval rm -f ${T1}' 0 1 2 15
export PATH=${PATH}:/usr/sbin
rm -f ${T1}
echo "map; wait " | cstm | \
awk '{if (($3 == "CPU") && ($0 ~ "Information Successful *$")) print $1}' |
while read DEV
do
echo "select device ${DEV}; info; wait; infolog; exit" | cstm >> ${T1}
done
if [[ -s "${T1}" ]]
then
grep -E -i "Data Cache|Instruction Cache" ${T1}
STAT=0
fi
exit ${STAT}
By definition, any attempt to extract these data is going to be non-portable.
I can't imagine why anything other than an Assembler or an Optimizer would care (and even then the current machimne might not match the target machine) but here is one approach for HP-UX leveraging the STM commands. I assume that you have installed STM.
#!/usr/bin/sh
typeset DEV=""
typeset TDIR=${TMPDIR:-/var/tmp}
typeset T1=${TDIR}/X${$}_1.txt
typeset -i STAT=254
trap 'eval rm -f ${T1}' 0 1 2 15
export PATH=${PATH}:/usr/sbin
rm -f ${T1}
echo "map; wait " | cstm | \
awk '{if (($3 == "CPU") && ($0 ~ "Information Successful *$")) print $1}' |
while read DEV
do
echo "select device ${DEV}; info; wait; infolog; exit" | cstm >> ${T1}
done
if [[ -s "${T1}" ]]
then
grep -E -i "Data Cache|Instruction Cache" ${T1}
STAT=0
fi
exit ${STAT}
If it ain't broke, I can fix that.
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