<?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: GetKernelSymbol() in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/getkernelsymbol/m-p/4392999#M665248</link>
    <description>adb is a assembly debugger&lt;BR /&gt;echo "physmem/D" | adb -k /stand/vmunix /dev/kmem&lt;BR /&gt;display the value in decimal of the kernel symbol "physmem", taken from the kernel memory.&lt;BR /&gt;&lt;BR /&gt;since 11.23 physmem doesn't exist anymore, so we get memory_installed_in_machine&lt;BR /&gt;&lt;BR /&gt;itick_per_tick is the number of cpu cycles per 10ms&lt;BR /&gt;&lt;BR /&gt;it is advised to use pstat_getstatic() in place of that type of tricks.&lt;BR /&gt;</description>
    <pubDate>Thu, 02 Apr 2009 08:28:53 GMT</pubDate>
    <dc:creator>Laurent Menase</dc:creator>
    <dc:date>2009-04-02T08:28:53Z</dc:date>
    <item>
      <title>GetKernelSymbol()</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/getkernelsymbol/m-p/4392997#M665246</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;I've found a script to get information about HP-UX as written below.&lt;BR /&gt;&lt;BR /&gt;My question is:&lt;BR /&gt;Since the below script uses a method called GetKernelSymbol(), could someone please in this forum give some explanation what it actually does?&lt;BR /&gt;&lt;BR /&gt;Thank you, guys!&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;sudo 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</description>
      <pubDate>Thu, 02 Apr 2009 02:47:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/getkernelsymbol/m-p/4392997#M665246</guid>
      <dc:creator>rataratar</dc:creator>
      <dc:date>2009-04-02T02:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: GetKernelSymbol()</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/getkernelsymbol/m-p/4392998#M665247</link>
      <description>&amp;gt;could someone please in this forum give some explanation what it actually does?&lt;BR /&gt;&lt;BR /&gt;The function should be trivial to understand.&lt;BR /&gt;It basically invokes adb to print the value (in decimal) of specific kernel variables.&lt;BR /&gt;&lt;BR /&gt;The result is assigned to kval.</description>
      <pubDate>Thu, 02 Apr 2009 03:55:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/getkernelsymbol/m-p/4392998#M665247</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-04-02T03:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: GetKernelSymbol()</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/getkernelsymbol/m-p/4392999#M665248</link>
      <description>adb is a assembly debugger&lt;BR /&gt;echo "physmem/D" | adb -k /stand/vmunix /dev/kmem&lt;BR /&gt;display the value in decimal of the kernel symbol "physmem", taken from the kernel memory.&lt;BR /&gt;&lt;BR /&gt;since 11.23 physmem doesn't exist anymore, so we get memory_installed_in_machine&lt;BR /&gt;&lt;BR /&gt;itick_per_tick is the number of cpu cycles per 10ms&lt;BR /&gt;&lt;BR /&gt;it is advised to use pstat_getstatic() in place of that type of tricks.&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Apr 2009 08:28:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/getkernelsymbol/m-p/4392999#M665248</guid>
      <dc:creator>Laurent Menase</dc:creator>
      <dc:date>2009-04-02T08:28:53Z</dc:date>
    </item>
  </channel>
</rss>

