<?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: Discrepancy between du and bdf in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/discrepancy-between-du-and-bdf/m-p/2821544#M86625</link>
    <description>&lt;BR /&gt;(1) using lsof, find what files DON'T exist any more but are being REPORTED by bdf&lt;BR /&gt;&lt;BR /&gt;(2) don't have a stroke if bdf and du show differences, its very possible and maybe in your situation, normal. Files can be open and consuming space, but du can't see them, and bdf can, especially files that have been deleted while still open!!!!!&lt;BR /&gt;&lt;BR /&gt;(3) The / filesystem is 188 MEGS not 40 MEGS&lt;BR /&gt;&lt;BR /&gt;(4) What does 145633280 have to do with disk space?&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
    <pubDate>Wed, 09 Oct 2002 10:42:07 GMT</pubDate>
    <dc:creator>harry d brown jr</dc:creator>
    <dc:date>2002-10-09T10:42:07Z</dc:date>
    <item>
      <title>Discrepancy between du and bdf</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/discrepancy-between-du-and-bdf/m-p/2821539#M86620</link>
      <description>Hi, everyone.&lt;BR /&gt;I have encountered one big problem.&lt;BR /&gt;Here is the output of du and bdf&lt;BR /&gt;# bdf&lt;BR /&gt;Filesystem          kbytes    used   avail %used Mounted on&lt;BR /&gt;/dev/vg00/lvol3     188416  181664    6389   97% /&lt;BR /&gt;&lt;BR /&gt;# du -akx / | sort -nr | more&lt;BR /&gt;35729   /&lt;BR /&gt;17717   /sbin&lt;BR /&gt;17689   /etc&lt;BR /&gt;10857   /etc/lvmconf&lt;BR /&gt;4689    /etc/opt&lt;BR /&gt;4526    /etc/opt/resmon&lt;BR /&gt;3532    /sbin/fs&lt;BR /&gt;3447    /etc/opt/resmon/lbin&lt;BR /&gt;2488    /etc/opt/resmon/lbin/mibmond&lt;BR /&gt;1657    /sbin/fs/vxfs&lt;BR /&gt;1454    /sbin/fs/hfs&lt;BR /&gt;971     /etc/lvmconf/pcemc2.conf&lt;BR /&gt;957     /etc/lvmconf/pcemc5.conf.old&lt;BR /&gt;957     /etc/lvmconf/pcemc5.conf&lt;BR /&gt;955     /etc/lvmconf/pcemc3.conf&lt;BR /&gt;953     /etc/lvmconf/pcemc7.conf&lt;BR /&gt;951     /etc/lvmconf/pcemc4.conf.old&lt;BR /&gt;....&lt;BR /&gt;....&lt;BR /&gt;&lt;BR /&gt;So there is a big discrepancy between their output.&lt;BR /&gt;&lt;BR /&gt;So I am very confused about such an phenomenon.&lt;BR /&gt;And I tried to use 'lsof' to find the reason.&lt;BR /&gt;&lt;BR /&gt;nfskd      1762     root    2w  VREG 64,0x3 145633280 3046 / (/dev/vg00/lvol3)&lt;BR /&gt;bin        2946     root    1w  VREG 64,0x3 145633280 3046 / (/dev/vg00/lvol3)&lt;BR /&gt;bin        2946     root    2w  VREG 64,0x3 145633280 3046 / (/dev/vg00/lvol3)&lt;BR /&gt;uvdlockd   2979     root    1w  VREG 64,0x3 145633280 3046 / (/dev/vg00/lvol3)&lt;BR /&gt;uvdlockd   2979     root    2w  VREG 64,0x3 145633280 3046 / (/dev/vg00/lvol3)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;145,633,280 must be abnormal because normally the size of the / filesystem is 40MB or so.&lt;BR /&gt;&lt;BR /&gt;So could you give me some invaluable advises?&lt;BR /&gt;Thanks a lot.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Al.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 09 Oct 2002 05:20:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/discrepancy-between-du-and-bdf/m-p/2821539#M86620</guid>
      <dc:creator>albert_hua</dc:creator>
      <dc:date>2002-10-09T05:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: Discrepancy between du and bdf</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/discrepancy-between-du-and-bdf/m-p/2821540#M86621</link>
      <description>Hi &lt;BR /&gt;&lt;BR /&gt;there was the same question this day &lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x2b8b402f24d5d61190050090279cd0f9,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x2b8b402f24d5d61190050090279cd0f9,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Please read and tell us if there is a similar problem&lt;BR /&gt;&lt;BR /&gt;Chris</description>
      <pubDate>Wed, 09 Oct 2002 05:50:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/discrepancy-between-du-and-bdf/m-p/2821540#M86621</guid>
      <dc:creator>Christian Gebhardt</dc:creator>
      <dc:date>2002-10-09T05:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: Discrepancy between du and bdf</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/discrepancy-between-du-and-bdf/m-p/2821541#M86622</link>
      <description>No Christian:&lt;BR /&gt;I have met the phenomenon you mentioned. That 's the question of nested file system. But my situation is not the same. The / filesystem begins to be full suddenly.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Al.</description>
      <pubDate>Wed, 09 Oct 2002 05:54:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/discrepancy-between-du-and-bdf/m-p/2821541#M86622</guid>
      <dc:creator>albert_hua</dc:creator>
      <dc:date>2002-10-09T05:54:54Z</dc:date>
    </item>
    <item>
      <title>Re: Discrepancy between du and bdf</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/discrepancy-between-du-and-bdf/m-p/2821542#M86623</link>
      <description>Hi,&lt;BR /&gt;The du command gives the number of 512-byte blocks allocated for all&lt;BR /&gt;files and (recursively) directories within each directory and file&lt;BR /&gt;specified by the name operands. &lt;BR /&gt;So 35729 * 512 =18293248 Bytes means ~182 MB which nearly your bdf output.&lt;BR /&gt;Regarding the "sudden fillup of /" ,look for any core file  or /dev/rmt/om instead of Zero it is O.&lt;BR /&gt;</description>
      <pubDate>Wed, 09 Oct 2002 06:03:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/discrepancy-between-du-and-bdf/m-p/2821542#M86623</guid>
      <dc:creator>Animesh Chakraborty</dc:creator>
      <dc:date>2002-10-09T06:03:06Z</dc:date>
    </item>
    <item>
      <title>Re: Discrepancy between du and bdf</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/discrepancy-between-du-and-bdf/m-p/2821543#M86624</link>
      <description>Hi,animesh:&lt;BR /&gt;I have used '-k' option.&lt;BR /&gt;So 35729 * 512 =18293248 Bytes &lt;BR /&gt;18,293,248 it should be 18MB.&lt;BR /&gt;&lt;BR /&gt;And no large and new core files are found in / filesystem.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Al.&lt;BR /&gt;</description>
      <pubDate>Wed, 09 Oct 2002 06:08:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/discrepancy-between-du-and-bdf/m-p/2821543#M86624</guid>
      <dc:creator>albert_hua</dc:creator>
      <dc:date>2002-10-09T06:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: Discrepancy between du and bdf</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/discrepancy-between-du-and-bdf/m-p/2821544#M86625</link>
      <description>&lt;BR /&gt;(1) using lsof, find what files DON'T exist any more but are being REPORTED by bdf&lt;BR /&gt;&lt;BR /&gt;(2) don't have a stroke if bdf and du show differences, its very possible and maybe in your situation, normal. Files can be open and consuming space, but du can't see them, and bdf can, especially files that have been deleted while still open!!!!!&lt;BR /&gt;&lt;BR /&gt;(3) The / filesystem is 188 MEGS not 40 MEGS&lt;BR /&gt;&lt;BR /&gt;(4) What does 145633280 have to do with disk space?&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Wed, 09 Oct 2002 10:42:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/discrepancy-between-du-and-bdf/m-p/2821544#M86625</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-10-09T10:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: Discrepancy between du and bdf</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/discrepancy-between-du-and-bdf/m-p/2821545#M86626</link>
      <description>&lt;BR /&gt;&lt;BR /&gt;The -k option gives it in 1024 multiples.&lt;BR /&gt;&lt;BR /&gt;Again, the two numbers will NEVER be the same. It's just one of those things you just accept as normal, even though its strange - like allowing democrats to vote.&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 09 Oct 2002 10:47:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/discrepancy-between-du-and-bdf/m-p/2821545#M86626</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-10-09T10:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: Discrepancy between du and bdf</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/discrepancy-between-du-and-bdf/m-p/2821546#M86627</link>
      <description>The du vs. bdf question is fairly common and the answer is easy: sparse files. A sparse file is one that has been created with 'holes' or unwritten parts. Consider writing a file with record #1, then by seeking to record one million, writing another record and then closing the file. The file has but two records and occupies only a couple of blocks but the missing parts are not stored nor counted in bdf(1) or du(1). Depending on the size of the file and the spareseness, the difference in apparent versus actual size may be VERY large. &lt;BR /&gt;&lt;BR /&gt;Create your own sparse file with: &lt;BR /&gt;&lt;BR /&gt;dd if=/etc/issue of=/var/tmp/sparse bs=2048k seek=1 &lt;BR /&gt;&lt;BR /&gt;where you will see the original file is just a few dozen bytes, the result with ls -l or wc -c shows a 2 meg file, but du(1) will show the file as occupying just a bit more than the original /etc/issue file. A cp(1) of the file will create a new file that is the same size (using ls -l or wc -c) but du(1) will now show a MUCH larger size than the original file. &lt;BR /&gt;&lt;BR /&gt;A common file that is often sparse is a core file from a crashed program. Another file that might be sparse is /etc/mail/aliases.pag. And of course, any programmer could write special code that creates a sparse file. &lt;BR /&gt;&lt;BR /&gt;Now to troubleshoot your / filesystem, use du as in:&lt;BR /&gt;&lt;BR /&gt;du -kx / | sort -rn | head&lt;BR /&gt;&lt;BR /&gt;Look for big directories at the top of the list. This is fairly normal:&lt;BR /&gt;&lt;BR /&gt;35855   /&lt;BR /&gt;18926   /sbin&lt;BR /&gt;14000   /etc&lt;BR /&gt;6811    /etc/opt&lt;BR /&gt;&lt;BR /&gt;NEVER allow non-HP-UX directories to exist in the / filesystem (mountpoints are fine).&lt;BR /&gt;&lt;BR /&gt;Then look for big files with:&lt;BR /&gt;&lt;BR /&gt;ll /sbin | sort -rnk5 | more</description>
      <pubDate>Wed, 09 Oct 2002 11:06:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/discrepancy-between-du-and-bdf/m-p/2821546#M86627</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2002-10-09T11:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: Discrepancy between du and bdf</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/discrepancy-between-du-and-bdf/m-p/2821547#M86628</link>
      <description>Hi, &lt;BR /&gt;&lt;BR /&gt;I had similar problem. I had users with one aplication which intensively writes to some files and then deletes those files. Problem is that space on filesystem is not free up until process is not finished ( du thinks it is because read from inode table but superblock is not updated ) precisely until process release file. We solve problem by restarting aplication periodicly. Same problem is with oracle database. When dba deletes one datafile, space on filesystem is not free up, until this process die ( release file). Workarround is (db case) to truncate this file, and then delete it. &lt;BR /&gt;&lt;BR /&gt;I hope this help.&lt;BR /&gt;&lt;BR /&gt;BR,&lt;BR /&gt;&lt;BR /&gt;Hrvoje&lt;BR /&gt;</description>
      <pubDate>Wed, 09 Oct 2002 11:20:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/discrepancy-between-du-and-bdf/m-p/2821547#M86628</guid>
      <dc:creator>Hrvoje Dubravica</dc:creator>
      <dc:date>2002-10-09T11:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: Discrepancy between du and bdf</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/discrepancy-between-du-and-bdf/m-p/2821548#M86629</link>
      <description>Hi Harry,&lt;BR /&gt;Just reading throught this thread and got a good chuckle from your comment.  Anytime you can get a good dig about a democrat!  10 points for that one!&lt;BR /&gt;Theresa</description>
      <pubDate>Wed, 09 Oct 2002 12:14:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/discrepancy-between-du-and-bdf/m-p/2821548#M86629</guid>
      <dc:creator>Theresa Patrie</dc:creator>
      <dc:date>2002-10-09T12:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: Discrepancy between du and bdf</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/discrepancy-between-du-and-bdf/m-p/2821549#M86630</link>
      <description>Hi,Bill:&lt;BR /&gt;Really appreciate your excellent reply.&lt;BR /&gt;It tells me a lot.&lt;BR /&gt;I know your meaning is there must be some files with large size which can not be countered by du(1). We can find them by 'll'.&lt;BR /&gt;I think I can write one shell to find out the files for me.&lt;BR /&gt;&lt;BR /&gt;Hi,Harry:&lt;BR /&gt;(4) What does 145633280 have to do with disk space? &lt;BR /&gt;&lt;BR /&gt;nfskd 1762 root 2w VREG 64,0x3 145633280 3046 / (/dev/vg00/lvol3) &lt;BR /&gt;&lt;BR /&gt;145,633,280 is the size of the file opened by nfskd and / is the name of the mount point on which the file resides so I am confused which file occupies so large space. &lt;BR /&gt; &lt;BR /&gt;bin 2946 root 1w VREG 64,0x3 145633280 3046 / (/dev/vg00/lvol3) &lt;BR /&gt;bin 2946 root 2w VREG 64,0x3 145633280 3046 / (/dev/vg00/lvol3) &lt;BR /&gt;uvdlockd 2979 root 1w VREG 64,0x3 145633280 3046 / (/dev/vg00/lvol3) &lt;BR /&gt;uvdlockd 2979 root 2w VREG 64,0x3 145633280 3046 / (/dev/vg00/lvol3) &lt;BR /&gt;&lt;BR /&gt;There are also other processes opening such a large 'file'.&lt;BR /&gt;&lt;BR /&gt;Because I am not very familiar with the usage of 'lsof'.  So the output really makes me lost.&lt;BR /&gt;&lt;BR /&gt;Can anyone explain it for me?&lt;BR /&gt;Any advises will be appreciated.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Al.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;  &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 10 Oct 2002 02:01:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/discrepancy-between-du-and-bdf/m-p/2821549#M86630</guid>
      <dc:creator>albert_hua</dc:creator>
      <dc:date>2002-10-10T02:01:26Z</dc:date>
    </item>
  </channel>
</rss>

