<?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: lsof vs sar -v in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/lsof-vs-sar-v/m-p/2849017#M92995</link>
    <description>Hi "parent",&lt;BR /&gt;&lt;BR /&gt;the kernel table contains one entry for every handle into a file, so if one process has a file open in two places, that takes two entries (or two processes having the same file open).&lt;BR /&gt;Take your shell as an example: &lt;BR /&gt;- one process&lt;BR /&gt;- one terminal (tty)&lt;BR /&gt;- three "handles" all using the same file (stdin/stdout/stderr all go to your tty)&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Wodisch&lt;BR /&gt;</description>
    <pubDate>Wed, 20 Nov 2002 17:11:15 GMT</pubDate>
    <dc:creator>Wodisch</dc:creator>
    <dc:date>2002-11-20T17:11:15Z</dc:date>
    <item>
      <title>lsof vs sar -v</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lsof-vs-sar-v/m-p/2849015#M92993</link>
      <description>on my hpux, i want to know witch files are opened.&lt;BR /&gt;when i do:&lt;BR /&gt;sar -v : i have 17000 opened files.&lt;BR /&gt;But when i use lsof:&lt;BR /&gt;lsof |wc -l : i have 10000 opened files....&lt;BR /&gt;And 10 000 != 17000 ...why ???&lt;BR /&gt;</description>
      <pubDate>Wed, 20 Nov 2002 16:33:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lsof-vs-sar-v/m-p/2849015#M92993</guid>
      <dc:creator>PARENT_3</dc:creator>
      <dc:date>2002-11-20T16:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: lsof vs sar -v</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lsof-vs-sar-v/m-p/2849016#M92994</link>
      <description>&lt;BR /&gt;sar -v 1 1 shows the size of the kernel table which is a cache table. This means its displaying the maximum size the cache table has grown to since last reboot - it is NOT the current number of open files in use at the time you run sar. If you run this command just after a reboot and compare to the lsof command below they should be much closer to each other.&lt;BR /&gt;&lt;BR /&gt;lsof is more accurate to show the current number of open files - but it may show a single file open for many processes - artifically inflating the results, so you need to modify the lsof command to filter out duplicates;&lt;BR /&gt;&lt;BR /&gt;lsof | awk '{print $9}' | sort -u | wc -l&lt;BR /&gt;&lt;BR /&gt;This gives the current number of unique open files - which should always be lower than sar -v reports.&lt;BR /&gt;</description>
      <pubDate>Wed, 20 Nov 2002 16:55:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lsof-vs-sar-v/m-p/2849016#M92994</guid>
      <dc:creator>Stefan Farrelly</dc:creator>
      <dc:date>2002-11-20T16:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: lsof vs sar -v</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lsof-vs-sar-v/m-p/2849017#M92995</link>
      <description>Hi "parent",&lt;BR /&gt;&lt;BR /&gt;the kernel table contains one entry for every handle into a file, so if one process has a file open in two places, that takes two entries (or two processes having the same file open).&lt;BR /&gt;Take your shell as an example: &lt;BR /&gt;- one process&lt;BR /&gt;- one terminal (tty)&lt;BR /&gt;- three "handles" all using the same file (stdin/stdout/stderr all go to your tty)&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Wodisch&lt;BR /&gt;</description>
      <pubDate>Wed, 20 Nov 2002 17:11:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lsof-vs-sar-v/m-p/2849017#M92995</guid>
      <dc:creator>Wodisch</dc:creator>
      <dc:date>2002-11-20T17:11:15Z</dc:date>
    </item>
    <item>
      <title>Re: lsof vs sar -v</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lsof-vs-sar-v/m-p/2849018#M92996</link>
      <description>Hi!&lt;BR /&gt;&lt;BR /&gt;You have a system wide file table, sized by tunable nfile. The sar -v output gets the number of currently used slots of this file table... it uses pstat_getdynamic() to get the psd_activefiles metric. This has nothing to do with caching... the metric is accurate and actually indicates when "File table overflow" (ENFILE) would occure.&lt;BR /&gt;&lt;BR /&gt;The lsof goes the other way round, starting from the processes file descriptors (not global) which may reference file table slots.&lt;BR /&gt;&lt;BR /&gt;I never saw both reporting exaclty the same, but similar values using this:&lt;BR /&gt;&lt;BR /&gt;# lsof +ff  | cut -c 38-47 | sort -u | wc -l&lt;BR /&gt;&lt;BR /&gt;... where +ff adds the FILE-ADDR to the output.&lt;BR /&gt;&lt;BR /&gt;Best regards...&lt;BR /&gt; Dietmar.</description>
      <pubDate>Thu, 21 Nov 2002 11:44:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lsof-vs-sar-v/m-p/2849018#M92996</guid>
      <dc:creator>Dietmar Konermann</dc:creator>
      <dc:date>2002-11-21T11:44:56Z</dc:date>
    </item>
  </channel>
</rss>

