<?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: /var displaying incorrect disk usage in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/var-displaying-incorrect-disk-usage/m-p/2927736#M110941</link>
    <description>SCLEDI:/var {130}&amp;gt; du -sk&lt;BR /&gt;57014   .&lt;BR /&gt;SCLEDI:/var {131}&amp;gt; df -k /var&lt;BR /&gt;/var                   (/dev/vg00/lvol8       ) :   484096 total allocated Kb&lt;BR /&gt;                                                    422983 free allocated Kb&lt;BR /&gt;                                                     61113 used allocated Kb&lt;BR /&gt;                                                        12 % allocation used&lt;BR /&gt;SCLEDI:/var {132}&amp;gt; bdf /var&lt;BR /&gt;Filesystem          kbytes    used   avail %used Mounted on&lt;BR /&gt;/dev/vg00/lvol8     512000   61113  422983   13% /var&lt;BR /&gt;SCLEDI:/var {133}&amp;gt; who -r&lt;BR /&gt;   .       run-level 3  Mar 15 07:05    3    0    S&lt;BR /&gt;&lt;BR /&gt;I rebooted that box on Saturday and the big difference on results of du and bdf is gone. &lt;BR /&gt;Is there a script available to find which processes still holding the disk space and which bdf still shows used even though the space already cleared?</description>
    <pubDate>Mon, 17 Mar 2003 15:44:22 GMT</pubDate>
    <dc:creator>Mike_Ca Li</dc:creator>
    <dc:date>2003-03-17T15:44:22Z</dc:date>
    <item>
      <title>/var displaying incorrect disk usage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/var-displaying-incorrect-disk-usage/m-p/2927728#M110933</link>
      <description>SCLEDI:/var {406}&amp;gt; du -sk&lt;BR /&gt;46486   .&lt;BR /&gt;SCLEDI:/var {407}&amp;gt; df -k /var&lt;BR /&gt;/var                   (/dev/vg00/lvol8       ) :   507302 total allocated Kb&lt;BR /&gt;                                                     75072 free allocated Kb&lt;BR /&gt;                                                    432230 used allocated Kb&lt;BR /&gt;                                                        85 % allocation used&lt;BR /&gt;SCLEDI:/var {408}&amp;gt; bdf /var&lt;BR /&gt;Filesystem          kbytes    used   avail %used Mounted on&lt;BR /&gt;/dev/vg00/lvol8     512000  432229   75073   85% /var&lt;BR /&gt;&lt;BR /&gt;why is du and bdf showing different values and how to fix? Thanks.&lt;BR /&gt;</description>
      <pubDate>Fri, 14 Mar 2003 17:17:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/var-displaying-incorrect-disk-usage/m-p/2927728#M110933</guid>
      <dc:creator>Mike_Ca Li</dc:creator>
      <dc:date>2003-03-14T17:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: /var displaying incorrect disk usage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/var-displaying-incorrect-disk-usage/m-p/2927729#M110934</link>
      <description>A very common question with two possible answers.  Either a file was removed but a process still has it open - therefore the space hasn't been re-claimed yet  - OR - sparse files, where a section is written and then the program seeks further into the file and  writes again - like databases, for example.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Fri, 14 Mar 2003 17:23:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/var-displaying-incorrect-disk-usage/m-p/2927729#M110934</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2003-03-14T17:23:07Z</dc:date>
    </item>
    <item>
      <title>Re: /var displaying incorrect disk usage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/var-displaying-incorrect-disk-usage/m-p/2927730#M110935</link>
      <description>Mike,&lt;BR /&gt;&lt;BR /&gt;What you're seeing is a difference in how bdf and du report information.  du shows disk space in a more positive light than bdf.  You'll see this difference if you've recently deleted files but bdf will eventually 'catch up' and report in line with du.  Take a look at knowledge base doc #TBRIXKBRC00001367     for more information.&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Eric</description>
      <pubDate>Fri, 14 Mar 2003 17:23:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/var-displaying-incorrect-disk-usage/m-p/2927730#M110935</guid>
      <dc:creator>erics_1</dc:creator>
      <dc:date>2003-03-14T17:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: /var displaying incorrect disk usage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/var-displaying-incorrect-disk-usage/m-p/2927731#M110936</link>
      <description>The space used by a file can be a bit tricky to define.  For simple files, the space used is straightforward, but space used by a sparse file is unique.  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 quite large.&lt;BR /&gt;&lt;BR /&gt;   To locate sparse files, you must search for files where the difference is quite large between wc -c and the du(1) command.  The du(1) command reads the file's disk space from the directory entries and would represent actual space on the disk.  wc -c will read the file sequentially, and the filesystem will supply the missing data records as a stream of zeros.  On tapes where compression is not available, the space used on the tape will be much more than the apparent disk space.&lt;BR /&gt;&lt;BR /&gt;   It is possible to create a 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.&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 a sparse is /usr/lib/aliases.pag&lt;BR /&gt;(or /etc/mail/aliases.pag for 10.xx).  And of course, any programmer could write special code that creates a sparse file.&lt;BR /&gt;&lt;BR /&gt;   bdf also shows inconsistent results for vxfs mount points versus the corresponding device file.  For the HFS filesystem, inodes and superblocks are preset via newfs but for the Journaled File System there are no fixed inode locations.  Instead, VxFS filesystems consist of a number of dynamic attributes that describe the filesystem.  These dynamic attributes are called structural files and they are kept in a separate fileset (Fileset 1) from the user files (Fileset 999).&lt;BR /&gt;&lt;BR /&gt;   Since these structures are dynamic and can grow as more files are added to the filesystem, it is impossible to determine how much space will be used used by structural files and how much space will be used by user files.  Unlike an HFS filesystem, where all the inodes are preallocated when the filesystem is created, a VxFS filesystem can continue to allocate more inodes as needed.  However, each time a new block of inodes is allocated, the number of actual data blocks are reduced.&lt;BR /&gt;&lt;BR /&gt;   So bdf and du must guess as to the number of inodes that might be needed and the space available.  The bdf 'used' column represents&lt;BR /&gt;space used by both user files and structural files.  The bdf 'avail' column represents the Kbytes available after subtracting the actual Kbytes used and the estimated Kbytes needed for inodes.&lt;BR /&gt;</description>
      <pubDate>Fri, 14 Mar 2003 17:40:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/var-displaying-incorrect-disk-usage/m-p/2927731#M110936</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2003-03-14T17:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: /var displaying incorrect disk usage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/var-displaying-incorrect-disk-usage/m-p/2927732#M110937</link>
      <description>Thanks for the replies.&lt;BR /&gt;Using HPUX 11.11&lt;BR /&gt;Pete: &lt;BR /&gt;Server not be rebooted since Dec8/2002&lt;BR /&gt;If I reboot bdf will show about 47 MB used?&lt;BR /&gt;&lt;BR /&gt;Eric: Could not find TBRIXKBRC00001367, please include link in reply.&lt;BR /&gt;&lt;BR /&gt;Bill: Good suggestion about sparse files&lt;BR /&gt;I looked for core files and found only a directory /var/opt/cifsclient/core&lt;BR /&gt;Thanks for the algoritm. But is there a script available to locate sparse file so that I don't have to reinvent the wheel. &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 14 Mar 2003 17:52:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/var-displaying-incorrect-disk-usage/m-p/2927732#M110937</guid>
      <dc:creator>Mike_Ca Li</dc:creator>
      <dc:date>2003-03-14T17:52:36Z</dc:date>
    </item>
    <item>
      <title>Re: /var displaying incorrect disk usage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/var-displaying-incorrect-disk-usage/m-p/2927733#M110938</link>
      <description>No, it's not possible to locate a sparse file without copying it to see if undefined records turn into zeros and make the copy larger. You probably don't want to search for sparse files (as if they were bad things). After all, most all database programs create sparse files for the database.</description>
      <pubDate>Fri, 14 Mar 2003 19:23:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/var-displaying-incorrect-disk-usage/m-p/2927733#M110938</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2003-03-14T19:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: /var displaying incorrect disk usage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/var-displaying-incorrect-disk-usage/m-p/2927734#M110939</link>
      <description>Mike,&lt;BR /&gt;&lt;BR /&gt;Yes, it's entirely possible, but not guaranteed, that a reboot may fix this discrepancy.  This assumes of course that it *IS* an open process situation rather than a sparse file situation.&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Fri, 14 Mar 2003 19:31:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/var-displaying-incorrect-disk-usage/m-p/2927734#M110939</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2003-03-14T19:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: /var displaying incorrect disk usage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/var-displaying-incorrect-disk-usage/m-p/2927735#M110940</link>
      <description>Here is a similar thread I had:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x87c83a7b3682d611abdb0090277a778c,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x87c83a7b3682d611abdb0090277a778c,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;Marty</description>
      <pubDate>Fri, 14 Mar 2003 20:08:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/var-displaying-incorrect-disk-usage/m-p/2927735#M110940</guid>
      <dc:creator>Martin Johnson</dc:creator>
      <dc:date>2003-03-14T20:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: /var displaying incorrect disk usage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/var-displaying-incorrect-disk-usage/m-p/2927736#M110941</link>
      <description>SCLEDI:/var {130}&amp;gt; du -sk&lt;BR /&gt;57014   .&lt;BR /&gt;SCLEDI:/var {131}&amp;gt; df -k /var&lt;BR /&gt;/var                   (/dev/vg00/lvol8       ) :   484096 total allocated Kb&lt;BR /&gt;                                                    422983 free allocated Kb&lt;BR /&gt;                                                     61113 used allocated Kb&lt;BR /&gt;                                                        12 % allocation used&lt;BR /&gt;SCLEDI:/var {132}&amp;gt; bdf /var&lt;BR /&gt;Filesystem          kbytes    used   avail %used Mounted on&lt;BR /&gt;/dev/vg00/lvol8     512000   61113  422983   13% /var&lt;BR /&gt;SCLEDI:/var {133}&amp;gt; who -r&lt;BR /&gt;   .       run-level 3  Mar 15 07:05    3    0    S&lt;BR /&gt;&lt;BR /&gt;I rebooted that box on Saturday and the big difference on results of du and bdf is gone. &lt;BR /&gt;Is there a script available to find which processes still holding the disk space and which bdf still shows used even though the space already cleared?</description>
      <pubDate>Mon, 17 Mar 2003 15:44:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/var-displaying-incorrect-disk-usage/m-p/2927736#M110941</guid>
      <dc:creator>Mike_Ca Li</dc:creator>
      <dc:date>2003-03-17T15:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: /var displaying incorrect disk usage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/var-displaying-incorrect-disk-usage/m-p/2927737#M110942</link>
      <description>You could look into a utility called lsof (as in ls open files), available here (among other places):&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.connect.org.uk/hppd/hpux/Sysadmin/lsof-4.64/" target="_blank"&gt;http://hpux.connect.org.uk/hppd/hpux/Sysadmin/lsof-4.64/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Mon, 17 Mar 2003 15:49:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/var-displaying-incorrect-disk-usage/m-p/2927737#M110942</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2003-03-17T15:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: /var displaying incorrect disk usage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/var-displaying-incorrect-disk-usage/m-p/2927738#M110943</link>
      <description>/var is the hardest place to get an accurate snapshot under any circumstances.&lt;BR /&gt;&lt;BR /&gt;At any time, there is data being added to log files such as /var/adm/syslog/syslog.log and lots of other ones.&lt;BR /&gt;&lt;BR /&gt;Every time a user su's it gets logged. Depending on logging level set , every time a user logs in via ftp, it gets logged.  This changes file sizes and the results of your query, which obviously uses two very different ways of calculating desk space.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Mon, 17 Mar 2003 15:50:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/var-displaying-incorrect-disk-usage/m-p/2927738#M110943</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-03-17T15:50:07Z</dc:date>
    </item>
  </channel>
</rss>

