<?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 Interpretation of struct __pst_vminfo in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/interpretation-of-struct-pst-vminfo/m-p/3200969#M714167</link>
    <description>&lt;P&gt;Hi, me again&lt;BR /&gt; &lt;BR /&gt;trying to retrieve memory usage I discovered yet another valuable CPAN module, viz. HPUX::Pstat&lt;BR /&gt; &lt;BR /&gt;This also has a getvminfo() function that is obviously fetching data through pstat() and returns a struct __pst_vminfo which is defined in /usr/include/sys/pstat/vm_pstat_body.h&lt;BR /&gt; &lt;BR /&gt;Unfortunately documentation is sparse.&lt;BR /&gt;So I have to deduce from looking in the debugger at the hashref getvminfo() returns what this could mean.&lt;BR /&gt;Because the numbers are high (I'm especially interested in the swapouts) I take them as cumulative values.&lt;BR /&gt;Thus I think I will have to pull numbers at several intervals and devide by the intervals to get swapout rates.&lt;BR /&gt;I guess this is what vmstat command is doing.&lt;BR /&gt;However, I get a bit confused again with the member designators (aka hash keys in Perl) between the terms pageouts and swapouts.&lt;BR /&gt;The same confusion commands such as vmstat throw because they use a "po" column.&lt;BR /&gt;I've learned that nowadays they prefer to use the term paging which denotes transferring of unused memory pages between RAM and disk, as opposed to swapping which denotes transferring of whole processes.&lt;BR /&gt;Unfortunately the Perl hash keys don't have exactly the same names as the struct members defined in vm_pstat_body.h&lt;BR /&gt;"Documentation" is far from unambigous.&lt;BR /&gt; &lt;BR /&gt;Therefore I grep'ed keys containing the substring "in" or "out" at the end, and would like to ask what they could represent.&lt;BR /&gt; &lt;BR /&gt;This bit of Perl&lt;BR /&gt; &lt;BR /&gt;$ cat vminfo.pl &lt;BR /&gt;#!/usr/bin/perl&lt;BR /&gt;&lt;BR /&gt;use HPUX::Pstat;&lt;BR /&gt;&lt;BR /&gt;$pst_vminfo = HPUX::Pstat::getvminfo;&lt;BR /&gt;@in_out_keys = grep($_ =~/in$|out$/, keys %$pst_vminfo);&lt;BR /&gt;printf "%20s =&amp;gt; %s\n", $_, $pst_vminfo-&amp;gt;{$_} foreach (@in_out_keys);&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;produced this result &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;$ ./vminfo.pl&lt;BR /&gt; psv_spgin =&amp;gt; 95637616&lt;BR /&gt; psv_tknout =&amp;gt; 370464147&lt;BR /&gt; psv_spgout =&amp;gt; 487643&lt;BR /&gt; psv_spswpout =&amp;gt; 3583&lt;BR /&gt; psv_sswpin =&amp;gt; 12513&lt;BR /&gt; psv_tknin =&amp;gt; 1456797&lt;BR /&gt; psv_spgpgout =&amp;gt; 1165364&lt;BR /&gt; psv_sswpout =&amp;gt; 12513&lt;BR /&gt; psv_spgpgin =&amp;gt; 1578425&lt;BR /&gt; psv_spswpin =&amp;gt; 677&lt;BR /&gt; psv_rpgpgin =&amp;gt; 1&lt;BR /&gt; psv_rpgpgout =&amp;gt; 0&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;P.S.This thread has been moved from HP-UX&amp;gt;Workload/Resource Management &amp;nbsp;to HP-UX&amp;gt; &amp;nbsp;languages- HP Forums Moderator&lt;/P&gt;</description>
    <pubDate>Wed, 02 Jan 2013 03:49:04 GMT</pubDate>
    <dc:creator>Ralph Grothe</dc:creator>
    <dc:date>2013-01-02T03:49:04Z</dc:date>
    <item>
      <title>Interpretation of struct __pst_vminfo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/interpretation-of-struct-pst-vminfo/m-p/3200969#M714167</link>
      <description>&lt;P&gt;Hi, me again&lt;BR /&gt; &lt;BR /&gt;trying to retrieve memory usage I discovered yet another valuable CPAN module, viz. HPUX::Pstat&lt;BR /&gt; &lt;BR /&gt;This also has a getvminfo() function that is obviously fetching data through pstat() and returns a struct __pst_vminfo which is defined in /usr/include/sys/pstat/vm_pstat_body.h&lt;BR /&gt; &lt;BR /&gt;Unfortunately documentation is sparse.&lt;BR /&gt;So I have to deduce from looking in the debugger at the hashref getvminfo() returns what this could mean.&lt;BR /&gt;Because the numbers are high (I'm especially interested in the swapouts) I take them as cumulative values.&lt;BR /&gt;Thus I think I will have to pull numbers at several intervals and devide by the intervals to get swapout rates.&lt;BR /&gt;I guess this is what vmstat command is doing.&lt;BR /&gt;However, I get a bit confused again with the member designators (aka hash keys in Perl) between the terms pageouts and swapouts.&lt;BR /&gt;The same confusion commands such as vmstat throw because they use a "po" column.&lt;BR /&gt;I've learned that nowadays they prefer to use the term paging which denotes transferring of unused memory pages between RAM and disk, as opposed to swapping which denotes transferring of whole processes.&lt;BR /&gt;Unfortunately the Perl hash keys don't have exactly the same names as the struct members defined in vm_pstat_body.h&lt;BR /&gt;"Documentation" is far from unambigous.&lt;BR /&gt; &lt;BR /&gt;Therefore I grep'ed keys containing the substring "in" or "out" at the end, and would like to ask what they could represent.&lt;BR /&gt; &lt;BR /&gt;This bit of Perl&lt;BR /&gt; &lt;BR /&gt;$ cat vminfo.pl &lt;BR /&gt;#!/usr/bin/perl&lt;BR /&gt;&lt;BR /&gt;use HPUX::Pstat;&lt;BR /&gt;&lt;BR /&gt;$pst_vminfo = HPUX::Pstat::getvminfo;&lt;BR /&gt;@in_out_keys = grep($_ =~/in$|out$/, keys %$pst_vminfo);&lt;BR /&gt;printf "%20s =&amp;gt; %s\n", $_, $pst_vminfo-&amp;gt;{$_} foreach (@in_out_keys);&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;produced this result &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;$ ./vminfo.pl&lt;BR /&gt; psv_spgin =&amp;gt; 95637616&lt;BR /&gt; psv_tknout =&amp;gt; 370464147&lt;BR /&gt; psv_spgout =&amp;gt; 487643&lt;BR /&gt; psv_spswpout =&amp;gt; 3583&lt;BR /&gt; psv_sswpin =&amp;gt; 12513&lt;BR /&gt; psv_tknin =&amp;gt; 1456797&lt;BR /&gt; psv_spgpgout =&amp;gt; 1165364&lt;BR /&gt; psv_sswpout =&amp;gt; 12513&lt;BR /&gt; psv_spgpgin =&amp;gt; 1578425&lt;BR /&gt; psv_spswpin =&amp;gt; 677&lt;BR /&gt; psv_rpgpgin =&amp;gt; 1&lt;BR /&gt; psv_rpgpgout =&amp;gt; 0&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;P.S.This thread has been moved from HP-UX&amp;gt;Workload/Resource Management &amp;nbsp;to HP-UX&amp;gt; &amp;nbsp;languages- HP Forums Moderator&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jan 2013 03:49:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/interpretation-of-struct-pst-vminfo/m-p/3200969#M714167</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2013-01-02T03:49:04Z</dc:date>
    </item>
  </channel>
</rss>

