<?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: DISK STATISTICS in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/disk-statistics/m-p/2829691#M88552</link>
    <description>Hi, Hermant!&lt;BR /&gt;&lt;BR /&gt;The formulas are not documented explicitely... however, one may derive them from performance tuning guides. So it's not a big secret. :)&lt;BR /&gt;&lt;BR /&gt;Here we are:&lt;BR /&gt;&lt;BR /&gt;busy_percent = MAX( (float) DEV_DIFF (psd_dktime) / delta_time * 100.0 , 100 );&lt;BR /&gt;&lt;BR /&gt;avque = (float)DEV_DIFF(psd_dkqlen) / (float)DEV_DIFF(psd_dkq_merged) -1;&lt;BR /&gt;&lt;BR /&gt;rw = (float) DEV_DEV_DIFF(psd_dkq_merged) / delta_time * 100;&lt;BR /&gt;&lt;BR /&gt;(delta_time is in ticks... 100 ticks/sec).&lt;BR /&gt;&lt;BR /&gt;The syscall returns the number of structs it filled to buf. So it's:&lt;BR /&gt;&lt;BR /&gt;MIN (#disks, elemcount)&lt;BR /&gt;&lt;BR /&gt;Regards...&lt;BR /&gt; Dietmar.&lt;BR /&gt;</description>
    <pubDate>Tue, 22 Oct 2002 07:03:11 GMT</pubDate>
    <dc:creator>Dietmar Konermann</dc:creator>
    <dc:date>2002-10-22T07:03:11Z</dc:date>
    <item>
      <title>DISK STATISTICS</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disk-statistics/m-p/2829685#M88546</link>
      <description>Hi&lt;BR /&gt;  How to get the disk statistics of the devices same as v get through "sar -d 1 10"  command .  Actually i want to write a C funtion which give me all the details like device , %busy,  avque,   r+w/s,  blks/s  avwait , avserv. &lt;BR /&gt; Is there any structure in HPUX that gives all this information ??. If it is how to get info from it ??&lt;BR /&gt; The reason i cant use because sar command its not giving all the details of all the disk attached to the system.&lt;BR /&gt; Because if i c "/dev/dsk" directory there r 4 devices attached  and sar is giving me only detail of 2.&lt;BR /&gt;&lt;BR /&gt;Waiting for ur reply&lt;BR /&gt;hemant</description>
      <pubDate>Mon, 21 Oct 2002 08:04:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disk-statistics/m-p/2829685#M88546</guid>
      <dc:creator>Hemant_7</dc:creator>
      <dc:date>2002-10-21T08:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: DISK STATISTICS</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disk-statistics/m-p/2829686#M88547</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Sar -d will only give statistics on disks that have activity, so getting the %busy, avque, r+w/s, blks/s avwait , avserv on non active disks will result in nul/no activity results.&lt;BR /&gt;&lt;BR /&gt;Because the disks do not appear in the sar -d output therefore does not mean that sar is incorrect, just that they are not in use at the time that sar was collecting data.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Paula</description>
      <pubDate>Mon, 21 Oct 2002 08:14:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disk-statistics/m-p/2829686#M88547</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2002-10-21T08:14:48Z</dc:date>
    </item>
    <item>
      <title>Re: DISK STATISTICS</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disk-statistics/m-p/2829687#M88548</link>
      <description>Hi!&lt;BR /&gt;&lt;BR /&gt;The sar command uses the pstat(2) interface to get that information. In your case you should have a look at pstat_getdisk().&lt;BR /&gt;&lt;BR /&gt;There are also examples in the man page.&lt;BR /&gt;&lt;BR /&gt;Regards...&lt;BR /&gt; Dietmar.</description>
      <pubDate>Mon, 21 Oct 2002 08:15:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disk-statistics/m-p/2829687#M88548</guid>
      <dc:creator>Dietmar Konermann</dc:creator>
      <dc:date>2002-10-21T08:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: DISK STATISTICS</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disk-statistics/m-p/2829688#M88549</link>
      <description>Hi &lt;BR /&gt; Thanks for the reply .I tried using the pstat_getdisk function . But struct pst_diskinfo has no information about "device   %busy ,  avque,   r+w/s,  blks/s , avwait , avserv " field . Please correct me if i m wrong !&lt;BR /&gt;&lt;BR /&gt;thanks &lt;BR /&gt;hemant</description>
      <pubDate>Mon, 21 Oct 2002 08:31:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disk-statistics/m-p/2829688#M88549</guid>
      <dc:creator>Hemant_7</dc:creator>
      <dc:date>2002-10-21T08:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: DISK STATISTICS</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disk-statistics/m-p/2829689#M88550</link>
      <description>You are right... the metrics are not directly available. They need to be calculated.&lt;BR /&gt;&lt;BR /&gt;Most of them are cumulative values... so you need to take 2 samples, get the differences then do some maths with it.&lt;BR /&gt;&lt;BR /&gt;E.g.:&lt;BR /&gt;&lt;BR /&gt;   avwait = ( ( (float)DEV_DIFF_USEC(psd_dkwait) ) / 1000.0 ) /&lt;BR /&gt;                   (float)DEV_DIFF(psd_dkq_merged);&lt;BR /&gt;&lt;BR /&gt;   avserv = ( ( (float)DEV_DIFF_USEC(psd_dkresp) ) -&lt;BR /&gt;                                  ( (float)DEV_DIFF_USEC(psd_dkwait) ) );&lt;BR /&gt;&lt;BR /&gt;So it's not trivial...&lt;BR /&gt;&lt;BR /&gt;Regards...&lt;BR /&gt; Dietmar.</description>
      <pubDate>Mon, 21 Oct 2002 11:13:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disk-statistics/m-p/2829689#M88550</guid>
      <dc:creator>Dietmar Konermann</dc:creator>
      <dc:date>2002-10-21T11:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: DISK STATISTICS</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disk-statistics/m-p/2829690#M88551</link>
      <description>Hi there &lt;BR /&gt;  Thats  really a great ! thanks a lot for it ! &lt;BR /&gt;&lt;BR /&gt;Could u please tell me the algo for the %bsy and avque r+w/s field also . How to calculate it ?? . Where i can find this info for calculating it.... &lt;BR /&gt; &lt;BR /&gt;One more thing pstat_getdisk sycall  , return the number of disk attached to the system is this true ??.&lt;BR /&gt;&lt;BR /&gt;waiting for ur reply&lt;BR /&gt;thanks and regard&lt;BR /&gt;hemant &lt;BR /&gt; &lt;BR /&gt;</description>
      <pubDate>Tue, 22 Oct 2002 05:13:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disk-statistics/m-p/2829690#M88551</guid>
      <dc:creator>Hemant_7</dc:creator>
      <dc:date>2002-10-22T05:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: DISK STATISTICS</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disk-statistics/m-p/2829691#M88552</link>
      <description>Hi, Hermant!&lt;BR /&gt;&lt;BR /&gt;The formulas are not documented explicitely... however, one may derive them from performance tuning guides. So it's not a big secret. :)&lt;BR /&gt;&lt;BR /&gt;Here we are:&lt;BR /&gt;&lt;BR /&gt;busy_percent = MAX( (float) DEV_DIFF (psd_dktime) / delta_time * 100.0 , 100 );&lt;BR /&gt;&lt;BR /&gt;avque = (float)DEV_DIFF(psd_dkqlen) / (float)DEV_DIFF(psd_dkq_merged) -1;&lt;BR /&gt;&lt;BR /&gt;rw = (float) DEV_DEV_DIFF(psd_dkq_merged) / delta_time * 100;&lt;BR /&gt;&lt;BR /&gt;(delta_time is in ticks... 100 ticks/sec).&lt;BR /&gt;&lt;BR /&gt;The syscall returns the number of structs it filled to buf. So it's:&lt;BR /&gt;&lt;BR /&gt;MIN (#disks, elemcount)&lt;BR /&gt;&lt;BR /&gt;Regards...&lt;BR /&gt; Dietmar.&lt;BR /&gt;</description>
      <pubDate>Tue, 22 Oct 2002 07:03:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disk-statistics/m-p/2829691#M88552</guid>
      <dc:creator>Dietmar Konermann</dc:creator>
      <dc:date>2002-10-22T07:03:11Z</dc:date>
    </item>
  </channel>
</rss>

