- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ksh command or script for SAM System properties ou...
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
12-03-2004 01:00 AM
12-03-2004 01:00 AM
ksh command or script for SAM System properties output
I'd like to catch the output of the System properties screen in SAM : nr. of active CPU's, version and clock frequency .
| | Processor || Memory || Operating System || Network || Dynamic |
| | \--------------------------------------------------------\
| |/------------------------------------------------------------------\|
| ||Processors: ||
| || Active: 4 ||
| || Total: 5 ||
| ||CPU Version: PA 8500 CPU Module 2.4 ||
| ||Clock Frequency: 440 MHz ||
| ||Machine Identification: |||
| ||Hardware Model: 9000/800/N4000-44 |||
| ||Kernel Width Support: 64 |||
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2004 01:04 AM
12-03-2004 01:04 AM
Re: ksh command or script for SAM System properties output
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2004 01:15 AM
12-03-2004 01:15 AM
Re: ksh command or script for SAM System properties output
echo `hostname` "is a " `model |sed 's/9000\/800\///' |sed 's/9000\/899\///'` "with" `ioscan -k |grep -n processor |wc -l` `cpuspeed` "Mhz processors and" `memory` "of memory"
where cpuspeed is a script that looks like this:
HPUX=/stand/vmunix
MHZ=$(echo itick_per_tick/D \
| adb -k $HPUX /dev/kmem \
| tail -1 \
| awk '{print $2/10000}')
echo $MHZ
and memory is a script that looks like this:
HPUX=/stand/vmunix
MAJORREV=$(uname -r | cut -f2 -d .)
if [ $MAJORREV -ge "11.0" ]
then
MYSYMBOL="phys_mem_pages"
else
MYSYMBOL="physmem"
fi
MYMEM=$(echo "${MYSYMBOL}/D" \
| adb $HPUX /dev/kmem \
| grep "${MYSYMBOL}: *." \
| awk '{printf "%.0f MB\n",$2/256}')
echo $MYMEM
The only thing this leaves out is the cpu model which I think you can obtain via cstm. Take a look at this thread:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=46964
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2004 01:17 AM
12-03-2004 01:17 AM
Re: ksh command or script for SAM System properties output
This is the /var/sam/log/samlog extract generated when retrieving the information :
Entering Task Manager with task mo_get_info.
@!@4@1102083228@0
Performing task "Operating System": Getting System Properties information.
@!@8@1102083228@0
Entering Task Manager with task MO_MODELINFO.
@!@4@1102083228@0
Performing task "Auto Refresh": Getting model.
@!@4@1102083228@0
Executing the following command:\C/usr/bin/model\C
@!@4@1102083228@0
Command completed with exit status 0.
@!@4@1102083228@0
Memory
@!@8@1102083228@0
Exiting Task Manager with task MO_MODELINFO.
@!@4@1102083228@0
Calling PDC_PAT_SYSTEM_INFO.
@!@4@1102083228@0
Calling PDC_SYSTEM_INFO.
@!@4@1102083229@0
Using PDC information to determine the CPU version.
@!@8@1102083229@0
Exiting Task Manager with task mo_get_info.
How should I get the information with a command or script ?
The output layout doesn't matter a lot.
Franky
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2004 01:21 AM
12-03-2004 01:21 AM
Re: ksh command or script for SAM System properties output
# 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