<?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: Using adb for querying kernel in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/using-adb-for-querying-kernel/m-p/3869110#M98685</link>
    <description>This may be useful to automate it.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.unet.univie.ac.at/aix/aixprggd/genprogc/custom_adb_debug.htm#A9Og40josh" target="_blank"&gt;http://www.unet.univie.ac.at/aix/aixprggd/genprogc/custom_adb_debug.htm#A9Og40josh&lt;/A&gt;</description>
    <pubDate>Mon, 25 Sep 2006 10:56:21 GMT</pubDate>
    <dc:creator>IT_2007</dc:creator>
    <dc:date>2006-09-25T10:56:21Z</dc:date>
    <item>
      <title>Using adb for querying kernel</title>
      <link>https://community.hpe.com/t5/operating-system-linux/using-adb-for-querying-kernel/m-p/3869109#M98684</link>
      <description>I would like to query the kernel on a regular basis to see the current nflocks and nfile being used (not the current max allowable). I know I can use Glance and GPM to get this info, but, I want to don't want to have to watch these tools all day. I'd like to write a script that will query for these 2 kernel parameters. Also, where would you look to find the available parameters for querying the kernel via adb...like, where would I look to find vx_cur_inodes and similar parameters (I have been using 'echo vx_cur_inodes/D|adb -k /stand/vmunix /dev/mem')?</description>
      <pubDate>Mon, 25 Sep 2006 10:50:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/using-adb-for-querying-kernel/m-p/3869109#M98684</guid>
      <dc:creator>Jim Krol</dc:creator>
      <dc:date>2006-09-25T10:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: Using adb for querying kernel</title>
      <link>https://community.hpe.com/t5/operating-system-linux/using-adb-for-querying-kernel/m-p/3869110#M98685</link>
      <description>This may be useful to automate it.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.unet.univie.ac.at/aix/aixprggd/genprogc/custom_adb_debug.htm#A9Og40josh" target="_blank"&gt;http://www.unet.univie.ac.at/aix/aixprggd/genprogc/custom_adb_debug.htm#A9Og40josh&lt;/A&gt;</description>
      <pubDate>Mon, 25 Sep 2006 10:56:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/using-adb-for-querying-kernel/m-p/3869110#M98685</guid>
      <dc:creator>IT_2007</dc:creator>
      <dc:date>2006-09-25T10:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: Using adb for querying kernel</title>
      <link>https://community.hpe.com/t5/operating-system-linux/using-adb-for-querying-kernel/m-p/3869111#M98686</link>
      <description>Hi,&lt;BR /&gt;title of the link :&lt;BR /&gt;"AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs"&lt;BR /&gt;&lt;BR /&gt;Applicable in HP-UX forum ?</description>
      <pubDate>Mon, 25 Sep 2006 11:00:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/using-adb-for-querying-kernel/m-p/3869111#M98686</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-09-25T11:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using adb for querying kernel</title>
      <link>https://community.hpe.com/t5/operating-system-linux/using-adb-for-querying-kernel/m-p/3869112#M98687</link>
      <description>Peter,&lt;BR /&gt;&lt;BR /&gt;  Agree. But it may give idea about adb. May be I am wrong.&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
      <pubDate>Mon, 25 Sep 2006 11:04:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/using-adb-for-querying-kernel/m-p/3869112#M98687</guid>
      <dc:creator>IT_2007</dc:creator>
      <dc:date>2006-09-25T11:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: Using adb for querying kernel</title>
      <link>https://community.hpe.com/t5/operating-system-linux/using-adb-for-querying-kernel/m-p/3869113#M98688</link>
      <description>The general answer for where to find the kernel parameters is to do an "nm /stand/vmunix &amp;gt; mylist". You can then examine mylist with vi or with grep narrow your search. Bear in mind, that you can use the command-line version of glance to extract the data in a more portable way.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 25 Sep 2006 12:14:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/using-adb-for-querying-kernel/m-p/3869113#M98688</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2006-09-25T12:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: Using adb for querying kernel</title>
      <link>https://community.hpe.com/t5/operating-system-linux/using-adb-for-querying-kernel/m-p/3869114#M98689</link>
      <description>Try this script:&lt;BR /&gt;&lt;BR /&gt;# cat /usr/local/bin/hpmem&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 $hpux /dev/kmem | \&lt;BR /&gt;tr "\012" " " | \&lt;BR /&gt;awk -F: '{print $3}'|\&lt;BR /&gt;read 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;# if 11iv2 or higher - get cpu this way&lt;BR /&gt;ver=$(uname -r | cut -d. -f3)&lt;BR /&gt;if ((ver &amp;gt; 22)); then&lt;BR /&gt;  kval=`echo "processor_count/D" | adb /stand/vmunix /dev/kmem |tail -1|awk -F: '{print $2}'  `&lt;BR /&gt;else&lt;BR /&gt;  GetKernelSymbol "processor_count"&lt;BR /&gt;fi&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;# if 11iv2 or higher - get memory this way&lt;BR /&gt;ver=$(uname -r | cut -d. -f3)&lt;BR /&gt;if ((ver &amp;gt; 22)); then&lt;BR /&gt;  kernel=$(/usr/sbin/kcpath -x)&lt;BR /&gt;  hexval=$(echo "phys_mem_pages/A" | adb  $kernel /dev/kmem|tail +2|awk '{print $2}')&lt;BR /&gt;  REAL_MEM=$(echo ${hexval}=D|adb)&lt;BR /&gt;  mb=$(expr ${REAL_MEM} / 256)&lt;BR /&gt;else&lt;BR /&gt;  let mb=kval*4/1024 # convert pages to MB&lt;BR /&gt;fi&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 "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;For a single item:&lt;BR /&gt;&lt;BR /&gt;echo "active_processor_count/D" | adb -o /stand/vmunix /dev/kmem&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
      <pubDate>Mon, 25 Sep 2006 14:43:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/using-adb-for-querying-kernel/m-p/3869114#M98689</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2006-09-25T14:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: Using adb for querying kernel</title>
      <link>https://community.hpe.com/t5/operating-system-linux/using-adb-for-querying-kernel/m-p/3869115#M98690</link>
      <description>Thanks for all this info.&lt;BR /&gt;&lt;BR /&gt;I have found that running glance the following way will also give me the info:&lt;BR /&gt;glance -j 900 -t -f /path/to/myfile.txt&lt;BR /&gt;&lt;BR /&gt;I just grep for nflocks and nfile.</description>
      <pubDate>Wed, 27 Sep 2006 09:59:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/using-adb-for-querying-kernel/m-p/3869115#M98690</guid>
      <dc:creator>macdonaldak</dc:creator>
      <dc:date>2006-09-27T09:59:37Z</dc:date>
    </item>
  </channel>
</rss>

