- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Collecting info from kernel by echo
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
03-29-2005 04:53 PM
03-29-2005 04:53 PM
Below are some commands to collect stats related to CPU by echo and it collects from kernel .
Is there any link or good doc where i can get all the parameters and arguments which can be used with this echo command to get various other details .
1) echo itick_per_usec/D | adb -k /stand/vmunix /dev/mem
2) echo runningprocs/D | adb -k /stand/vmunix /dev/mem
Thanks in advance ..
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2005 02:43 AM
03-30-2005 02:43 AM
Re: Collecting info from kernel by echo
I also tried a few other things ago, but I don't remember much of that any more :>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2005 02:48 AM
03-30-2005 02:48 AM
Re: Collecting info from kernel by echo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2005 02:49 AM
03-30-2005 02:49 AM
SolutionHere are some
echo physmem/D | adb /stand/vmunix /dev/kmem
physmem:
physmem: 24576
for 32 bit HP-UX 11.x systems :
example:
echo phys_mem_pages/D | adb /stand/vmunix /dev/kmem
phys_mem_pages:
phys_mem_pages: 24576
for 64 bit systems :
example:
echo phys_mem_pages/D | adb64 /stand/vmunix /dev/mem
phys_mem_pages:
phys_mem_pages: 262144
To determine the amount of lockable memory for 32 bit systems :
example:
echo total_lockable_mem/D | adb /stand/vmunix /dev/mem
total_lockable_mem:
total_lockable_mem: 185280
for 64 bit systems :
echo total_lockable_mem/D |adb64 /stand/vmunix /dev/mem
total_lockable_mem:
total_lockable_mem: 283750
Total lockable memory is expressed in Kilobytes
To determine the number of free swap 4096 byte memory pages :
example:
echo swapspc_cnt/D | adb /stand/vmunix /dev/kmem
swapspc_cnt:
swapspc_cnt: 216447
To determine the CPU speed:
example:
echo itick_per_usec/D | adb /stand/vmunix /dev/mem
itick_per_usec:
itick_per_usec: 360
To determine the number of processors in use:
example:
echo "runningprocs/D" | adb /stand/vmunix /dev/mem
runningprocs:
runningprocs: 2
To determine the number of 4096 byte memory pages of buffer cache
example:
echo bufpages/D | adb /stand/vmunix /dev/mem
bufpages:
bufpages: 18848
To display kernel parameters using adb use the parameter name :
example:
echo nproc/D | adb /stand/vmunix /dev/mem
nproc:
nproc: 276
To determine the kernel you are booted from:
example:
echo 'boot_string/S' | adb /stand/vmunix /dev/mem
boot_string:
boot_string: disc(52.6.0;0)/stand/vmunix
-USA..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2005 02:50 AM
03-30-2005 02:50 AM
Re: Collecting info from kernel by echo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2005 03:41 AM
03-30-2005 03:41 AM
Re: Collecting info from kernel by echo
# cat /usr/local/bin/hpmem
#!/bin/ksh
#
# Taken from the HP/UniGraphics FAQ
# You must be ROOT to execute this since it uses adb to
# examine the running kernel
#
GetKernelSymbol()
{
echo "$1/D" | \
adb -k $hpux /dev/kmem | \
tr "\012" " " | \
read junk junk2 kval
}
hpux=/hp-ux
rev=$(uname -r | cut -d. -f2)
if ((rev > 9)); then hpux=/stand/vmunix ;fi
/bin/uname -a
GetKernelSymbol "processor_count"
print CPU Count: $kval
GetKernelSymbol "itick_per_tick"
let speed=kval/10000
print CPU Speed: $speed MHz
if ((rev > 10)); then
print CPU HW Support: `getconf HW_CPU_SUPP_BITS`-bit
print Kernel Support: `getconf KERNEL_BITS`-bit
GetKernelSymbol "memory_installed_in_machine"
else
GetKernelSymbol "physmem"
fi
let mb=kval*4/1024 # convert pages to MB
print RAM Size: $mb MB
GetKernelSymbol "bufpages"
let mb=kval*4/1024 # convert pages to MB
print bufpages: $mb MB
GetKernelSymbol "maxuprc"
print maxuprc: $kval
GetKernelSymbol "maxvgs"
print maxvgs: $kval
GetKernelSymbol "maxfiles"
print maxfiles: $kval
GetKernelSymbol "max_thread_proc"
print max_thread_proc: $kval
GetKernelSymbol "nfile"
print nfile: $kval
GetKernelSymbol "nflocks"
print nflock: $kval
GetKernelSymbol "nproc"
print nproc: $kval
GetKernelSymbol "ninode"
print ninode: $kval
GetKernelSymbol "vfd_cw"
print shmmax: $kval
GetKernelSymbol "shmmni"
print shmmni: $kval
GetKernelSymbol "dbc_max_pct"
print dbc_max_pct: $kval
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2005 03:46 PM
03-30-2005 03:46 PM
Re: Collecting info from kernel by echo
I have submitted the points ..
Thanks ..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2005 03:47 PM
03-30-2005 03:47 PM