<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ksh command or script for SAM System properties output in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-command-or-script-for-sam-system-properties-output/m-p/3436016#M206599</link>
    <description>I use something like this:&lt;BR /&gt;&lt;BR /&gt;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"&lt;BR /&gt;&lt;BR /&gt;where  cpuspeed is a script that looks like this:&lt;BR /&gt;&lt;BR /&gt;HPUX=/stand/vmunix&lt;BR /&gt;&lt;BR /&gt;MHZ=$(echo itick_per_tick/D \&lt;BR /&gt;        | adb -k $HPUX /dev/kmem \&lt;BR /&gt;        | tail -1 \&lt;BR /&gt;        | awk '{print $2/10000}')&lt;BR /&gt;echo $MHZ&lt;BR /&gt;&lt;BR /&gt;and memory is a script that looks like this:&lt;BR /&gt;&lt;BR /&gt;HPUX=/stand/vmunix&lt;BR /&gt;MAJORREV=$(uname -r | cut -f2 -d .)&lt;BR /&gt;if [ $MAJORREV -ge "11.0" ]&lt;BR /&gt;then&lt;BR /&gt;  MYSYMBOL="phys_mem_pages"&lt;BR /&gt;else&lt;BR /&gt;  MYSYMBOL="physmem"&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;MYMEM=$(echo "${MYSYMBOL}/D" \&lt;BR /&gt;        | adb $HPUX /dev/kmem \&lt;BR /&gt;        | grep "${MYSYMBOL}: *." \&lt;BR /&gt;        | awk '{printf "%.0f MB\n",$2/256}')&lt;BR /&gt;echo $MYMEM&lt;BR /&gt;&lt;BR /&gt;The only thing this leaves out is the cpu model which I think you can obtain via cstm.  Take a look at this thread:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=46964" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=46964&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
    <pubDate>Fri, 03 Dec 2004 09:15:24 GMT</pubDate>
    <dc:creator>Pete Randall</dc:creator>
    <dc:date>2004-12-03T09:15:24Z</dc:date>
    <item>
      <title>ksh command or script for SAM System properties output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-command-or-script-for-sam-system-properties-output/m-p/3436014#M206597</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I'd like to catch the output of the System properties screen in SAM : nr. of active CPU's, version and clock frequency .&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;   | | Processor || Memory || Operating System || Network || Dynamic |       &lt;BR /&gt;   | |           \--------------------------------------------------------\  &lt;BR /&gt;   | |/------------------------------------------------------------------\|  &lt;BR /&gt;   | ||Processors:                                                       ||  &lt;BR /&gt;   | ||  Active:                4                                        ||  &lt;BR /&gt;   | ||  Total:                 5                                        ||  &lt;BR /&gt;   | ||CPU Version:             PA 8500 CPU Module 2.4                   ||  &lt;BR /&gt;   | ||Clock Frequency:         440 MHz                                  ||  &lt;BR /&gt;   | ||Machine Identification:  ||| &lt;BR /&gt;   | ||Hardware Model:          9000/800/N4000-44                        ||| &lt;BR /&gt;   | ||Kernel Width Support:    64                                       ||| &lt;BR /&gt;</description>
      <pubDate>Fri, 03 Dec 2004 09:00:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-command-or-script-for-sam-system-properties-output/m-p/3436014#M206597</guid>
      <dc:creator>Franky Leeuwerck_2</dc:creator>
      <dc:date>2004-12-03T09:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: ksh command or script for SAM System properties output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-command-or-script-for-sam-system-properties-output/m-p/3436015#M206598</link>
      <description>Do what ever you want in SAM, then look at samlog (/var/sam/samlog) to know which commands sam used. Use those commands to get the desired output.&lt;BR /&gt;&lt;BR /&gt;Anil</description>
      <pubDate>Fri, 03 Dec 2004 09:04:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-command-or-script-for-sam-system-properties-output/m-p/3436015#M206598</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2004-12-03T09:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: ksh command or script for SAM System properties output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-command-or-script-for-sam-system-properties-output/m-p/3436016#M206599</link>
      <description>I use something like this:&lt;BR /&gt;&lt;BR /&gt;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"&lt;BR /&gt;&lt;BR /&gt;where  cpuspeed is a script that looks like this:&lt;BR /&gt;&lt;BR /&gt;HPUX=/stand/vmunix&lt;BR /&gt;&lt;BR /&gt;MHZ=$(echo itick_per_tick/D \&lt;BR /&gt;        | adb -k $HPUX /dev/kmem \&lt;BR /&gt;        | tail -1 \&lt;BR /&gt;        | awk '{print $2/10000}')&lt;BR /&gt;echo $MHZ&lt;BR /&gt;&lt;BR /&gt;and memory is a script that looks like this:&lt;BR /&gt;&lt;BR /&gt;HPUX=/stand/vmunix&lt;BR /&gt;MAJORREV=$(uname -r | cut -f2 -d .)&lt;BR /&gt;if [ $MAJORREV -ge "11.0" ]&lt;BR /&gt;then&lt;BR /&gt;  MYSYMBOL="phys_mem_pages"&lt;BR /&gt;else&lt;BR /&gt;  MYSYMBOL="physmem"&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;MYMEM=$(echo "${MYSYMBOL}/D" \&lt;BR /&gt;        | adb $HPUX /dev/kmem \&lt;BR /&gt;        | grep "${MYSYMBOL}: *." \&lt;BR /&gt;        | awk '{printf "%.0f MB\n",$2/256}')&lt;BR /&gt;echo $MYMEM&lt;BR /&gt;&lt;BR /&gt;The only thing this leaves out is the cpu model which I think you can obtain via cstm.  Take a look at this thread:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=46964" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=46964&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Fri, 03 Dec 2004 09:15:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-command-or-script-for-sam-system-properties-output/m-p/3436016#M206599</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2004-12-03T09:15:24Z</dc:date>
    </item>
    <item>
      <title>Re: ksh command or script for SAM System properties output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-command-or-script-for-sam-system-properties-output/m-p/3436017#M206600</link>
      <description>Thanks for the reply.&lt;BR /&gt;&lt;BR /&gt;This is the /var/sam/log/samlog extract generated when retrieving the information :&lt;BR /&gt;&lt;BR /&gt;Entering Task Manager with task mo_get_info.&lt;BR /&gt;@!@4@1102083228@0&lt;BR /&gt;Performing task "Operating System":  Getting System Properties information.&lt;BR /&gt;@!@8@1102083228@0&lt;BR /&gt;Entering Task Manager with task MO_MODELINFO.&lt;BR /&gt;@!@4@1102083228@0&lt;BR /&gt;Performing task "Auto Refresh":  Getting model.&lt;BR /&gt;@!@4@1102083228@0&lt;BR /&gt;Executing the following command:\C/usr/bin/model\C&lt;BR /&gt;@!@4@1102083228@0&lt;BR /&gt;Command completed with exit status 0.&lt;BR /&gt;@!@4@1102083228@0&lt;BR /&gt;Memory&lt;BR /&gt;@!@8@1102083228@0&lt;BR /&gt;Exiting Task Manager with task MO_MODELINFO.&lt;BR /&gt;@!@4@1102083228@0&lt;BR /&gt;Calling PDC_PAT_SYSTEM_INFO.&lt;BR /&gt;@!@4@1102083228@0&lt;BR /&gt;Calling PDC_SYSTEM_INFO.&lt;BR /&gt;@!@4@1102083229@0&lt;BR /&gt;Using PDC information to determine the CPU version.&lt;BR /&gt;@!@8@1102083229@0&lt;BR /&gt;Exiting Task Manager with task mo_get_info.&lt;BR /&gt;&lt;BR /&gt;How should I get the information with a command or script ?&lt;BR /&gt;The output layout doesn't matter a lot.&lt;BR /&gt;&lt;BR /&gt;Franky&lt;BR /&gt;</description>
      <pubDate>Fri, 03 Dec 2004 09:17:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-command-or-script-for-sam-system-properties-output/m-p/3436017#M206600</guid>
      <dc:creator>Franky Leeuwerck_2</dc:creator>
      <dc:date>2004-12-03T09:17:18Z</dc:date>
    </item>
    <item>
      <title>Re: ksh command or script for SAM System properties output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-command-or-script-for-sam-system-properties-output/m-p/3436018#M206601</link>
      <description>Do as Pete says, or this is also close:&lt;BR /&gt;&lt;BR /&gt;# cat /usr/local/bin/hpmem&lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;#&lt;BR /&gt;# Taken from the HP/UniGraphics FAQ&lt;BR /&gt;# You must be ROOT to execute this since it uses adb to&lt;BR /&gt;# examine the running kernel&lt;BR /&gt;#&lt;BR /&gt;GetKernelSymbol()&lt;BR /&gt;{&lt;BR /&gt;echo "$1/D" | \&lt;BR /&gt;adb -k $hpux /dev/kmem | \&lt;BR /&gt;tr "\012" " " | \&lt;BR /&gt;read junk junk2 kval&lt;BR /&gt;}&lt;BR /&gt;hpux=/hp-ux&lt;BR /&gt;rev=$(uname -r | cut -d. -f2)&lt;BR /&gt;if ((rev &amp;gt; 9)); then hpux=/stand/vmunix ;fi&lt;BR /&gt;/bin/uname -a&lt;BR /&gt;GetKernelSymbol "processor_count"&lt;BR /&gt;print CPU Count: $kval&lt;BR /&gt;GetKernelSymbol "itick_per_tick"&lt;BR /&gt;let speed=kval/10000&lt;BR /&gt;print CPU Speed: $speed MHz&lt;BR /&gt;if ((rev &amp;gt; 10)); then&lt;BR /&gt;print CPU HW Support: `getconf HW_CPU_SUPP_BITS`-bit&lt;BR /&gt;print Kernel Support: `getconf KERNEL_BITS`-bit&lt;BR /&gt;GetKernelSymbol "memory_installed_in_machine"&lt;BR /&gt;else&lt;BR /&gt;GetKernelSymbol "physmem"&lt;BR /&gt;fi&lt;BR /&gt;let mb=kval*4/1024 # convert pages to MB&lt;BR /&gt;print RAM Size: $mb MB&lt;BR /&gt;GetKernelSymbol "bufpages"&lt;BR /&gt;let mb=kval*4/1024 # convert pages to MB&lt;BR /&gt;print bufpages: $mb MB&lt;BR /&gt;GetKernelSymbol "maxuprc"&lt;BR /&gt;print maxuprc: $kval&lt;BR /&gt;GetKernelSymbol "maxvgs"&lt;BR /&gt;print maxvgs: $kval&lt;BR /&gt;GetKernelSymbol "maxfiles"&lt;BR /&gt;print maxfiles: $kval&lt;BR /&gt;GetKernelSymbol "max_thread_proc"&lt;BR /&gt;print max_thread_proc: $kval&lt;BR /&gt;GetKernelSymbol "nfile"&lt;BR /&gt;print nfile: $kval&lt;BR /&gt;GetKernelSymbol "nflocks"&lt;BR /&gt;print nflock: $kval&lt;BR /&gt;GetKernelSymbol "nproc"&lt;BR /&gt;print nproc: $kval&lt;BR /&gt;GetKernelSymbol "ninode"&lt;BR /&gt;print ninode: $kval&lt;BR /&gt;GetKernelSymbol "vfd_cw"&lt;BR /&gt;print shmmax: $kval&lt;BR /&gt;GetKernelSymbol "shmmni"&lt;BR /&gt;print shmmni: $kval&lt;BR /&gt;GetKernelSymbol "dbc_max_pct"&lt;BR /&gt;print dbc_max_pct: $kval&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
      <pubDate>Fri, 03 Dec 2004 09:21:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-command-or-script-for-sam-system-properties-output/m-p/3436018#M206601</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2004-12-03T09:21:19Z</dc:date>
    </item>
  </channel>
</rss>

