<?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 weird different output of &amp;quot;df&amp;quot; and &amp;quot;du&amp;quot; in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/weird-different-output-of-quot-df-quot-and-quot-du-quot/m-p/3432235#M15096</link>
    <description>This morning, I found that the "emagent" ( one of the oracle 10g services, very buggy one !!! ) was leaking the disk space, by using "df":&lt;BR /&gt;&lt;BR /&gt;# df&lt;BR /&gt;Filesystem           1K-blocks      Used Available Use% Mounted on&lt;BR /&gt;/dev/vg00/lv01        20158332   8173420  10960912  43% /&lt;BR /&gt;/dev/cciss/c0d0p1        98747     48786     44862  53% /boot&lt;BR /&gt;/dev/vg00/lv02         1007896    248276    708420  26% /home&lt;BR /&gt;none                   1912528         0   1912528   0% /dev/shm&lt;BR /&gt;/dev/vg00/lv03         4031680     32920   3793960   1% /tmp&lt;BR /&gt;/dev/vg00/lv04        20158332   2969416  16164916  16% /u01&lt;BR /&gt;&lt;BR /&gt;The "Used" number of mount point "/u01" was getting increase about 2MB/second !&lt;BR /&gt;Within 20mins:&lt;BR /&gt;&lt;BR /&gt;# df&lt;BR /&gt;Filesystem           1K-blocks      Used Available Use% Mounted on&lt;BR /&gt;/dev/vg00/lv01        20158332   8173276  10961056  43% /&lt;BR /&gt;/dev/cciss/c0d0p1        98747     48786     44862  53% /boot&lt;BR /&gt;/dev/vg00/lv02         1007896    447404    509292  47% /home&lt;BR /&gt;none                   1912528         0   1912528   0% /dev/shm&lt;BR /&gt;/dev/vg00/lv03         4031680     32920   3793960   1% /tmp&lt;BR /&gt;/dev/vg00/lv04        20158332   9476816   9657516  50% /u01&lt;BR /&gt;&lt;BR /&gt;But when I shutdown the "emagent", "/u01" went back to original size immediately ! It seemed one temporary file ( a big one ) was removed...&lt;BR /&gt;&lt;BR /&gt;I tried to find out such temporary file when "/u01" was leaking, but I couldn't successfully locate this file :(&lt;BR /&gt;&lt;BR /&gt;One thing very weird was that the output of "du" ( "du -ks /u01" ) was always showing me the same:&lt;BR /&gt;# du -ks /u01&lt;BR /&gt;2937064 /u01&lt;BR /&gt;Although the output of "df" showed the "/u01" decreased 2MB/second !&lt;BR /&gt;I thought the output of "du" and "df" should show a similar number for the same mount point, why there is such difference in this case ! "du" had 2.9GB on /u01 while "df" showed 9.4GB on /u01 !&lt;BR /&gt;&lt;BR /&gt;Thanks !</description>
    <pubDate>Mon, 29 Nov 2004 10:50:35 GMT</pubDate>
    <dc:creator>yyghp</dc:creator>
    <dc:date>2004-11-29T10:50:35Z</dc:date>
    <item>
      <title>weird different output of "df" and "du"</title>
      <link>https://community.hpe.com/t5/operating-system-linux/weird-different-output-of-quot-df-quot-and-quot-du-quot/m-p/3432235#M15096</link>
      <description>This morning, I found that the "emagent" ( one of the oracle 10g services, very buggy one !!! ) was leaking the disk space, by using "df":&lt;BR /&gt;&lt;BR /&gt;# df&lt;BR /&gt;Filesystem           1K-blocks      Used Available Use% Mounted on&lt;BR /&gt;/dev/vg00/lv01        20158332   8173420  10960912  43% /&lt;BR /&gt;/dev/cciss/c0d0p1        98747     48786     44862  53% /boot&lt;BR /&gt;/dev/vg00/lv02         1007896    248276    708420  26% /home&lt;BR /&gt;none                   1912528         0   1912528   0% /dev/shm&lt;BR /&gt;/dev/vg00/lv03         4031680     32920   3793960   1% /tmp&lt;BR /&gt;/dev/vg00/lv04        20158332   2969416  16164916  16% /u01&lt;BR /&gt;&lt;BR /&gt;The "Used" number of mount point "/u01" was getting increase about 2MB/second !&lt;BR /&gt;Within 20mins:&lt;BR /&gt;&lt;BR /&gt;# df&lt;BR /&gt;Filesystem           1K-blocks      Used Available Use% Mounted on&lt;BR /&gt;/dev/vg00/lv01        20158332   8173276  10961056  43% /&lt;BR /&gt;/dev/cciss/c0d0p1        98747     48786     44862  53% /boot&lt;BR /&gt;/dev/vg00/lv02         1007896    447404    509292  47% /home&lt;BR /&gt;none                   1912528         0   1912528   0% /dev/shm&lt;BR /&gt;/dev/vg00/lv03         4031680     32920   3793960   1% /tmp&lt;BR /&gt;/dev/vg00/lv04        20158332   9476816   9657516  50% /u01&lt;BR /&gt;&lt;BR /&gt;But when I shutdown the "emagent", "/u01" went back to original size immediately ! It seemed one temporary file ( a big one ) was removed...&lt;BR /&gt;&lt;BR /&gt;I tried to find out such temporary file when "/u01" was leaking, but I couldn't successfully locate this file :(&lt;BR /&gt;&lt;BR /&gt;One thing very weird was that the output of "du" ( "du -ks /u01" ) was always showing me the same:&lt;BR /&gt;# du -ks /u01&lt;BR /&gt;2937064 /u01&lt;BR /&gt;Although the output of "df" showed the "/u01" decreased 2MB/second !&lt;BR /&gt;I thought the output of "du" and "df" should show a similar number for the same mount point, why there is such difference in this case ! "du" had 2.9GB on /u01 while "df" showed 9.4GB on /u01 !&lt;BR /&gt;&lt;BR /&gt;Thanks !</description>
      <pubDate>Mon, 29 Nov 2004 10:50:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/weird-different-output-of-quot-df-quot-and-quot-du-quot/m-p/3432235#M15096</guid>
      <dc:creator>yyghp</dc:creator>
      <dc:date>2004-11-29T10:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: weird different output of "df" and "du"</title>
      <link>https://community.hpe.com/t5/operating-system-linux/weird-different-output-of-quot-df-quot-and-quot-du-quot/m-p/3432236#M15097</link>
      <description>df and du calcuate space differently.&lt;BR /&gt;&lt;BR /&gt;Sometimes when a process has reserved disk space and not used it, the disk space figures will vary.&lt;BR /&gt;&lt;BR /&gt;If the emagent service was shut down normally, you'd find the figures would balance out.&lt;BR /&gt;&lt;BR /&gt;If a process is killed while disk is allocated for use but not used, the figures will sometimes disagree. Usually restarting the server will clear the issue and cause the figures to agree again.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Mon, 29 Nov 2004 11:31:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/weird-different-output-of-quot-df-quot-and-quot-du-quot/m-p/3432236#M15097</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2004-11-29T11:31:19Z</dc:date>
    </item>
    <item>
      <title>Re: weird different output of "df" and "du"</title>
      <link>https://community.hpe.com/t5/operating-system-linux/weird-different-output-of-quot-df-quot-and-quot-du-quot/m-p/3432237#M15098</link>
      <description>This is probably due to a pre-allocation.&lt;BR /&gt;&lt;BR /&gt;You can see such a behaviour on Oracle temp file. You tell Oracle to use a 100MB temporary file, but using du you see it very small. Using df it's the size you asked. It's because Oracle pre-allocates your 100MB but do not write a 100MB file. It only uses what it needs.&lt;BR /&gt;&lt;BR /&gt;It doesn't mean you agent is not buggy and that it doesn't waste space (pre-allocated space is considered as used and can not be allocate for anyone else) but it means that you will not be able to see it through du.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Fred&lt;BR /&gt;</description>
      <pubDate>Mon, 29 Nov 2004 11:36:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/weird-different-output-of-quot-df-quot-and-quot-du-quot/m-p/3432237#M15098</guid>
      <dc:creator>Fred Ruffet</dc:creator>
      <dc:date>2004-11-29T11:36:42Z</dc:date>
    </item>
    <item>
      <title>Re: weird different output of "df" and "du"</title>
      <link>https://community.hpe.com/t5/operating-system-linux/weird-different-output-of-quot-df-quot-and-quot-du-quot/m-p/3432238#M15099</link>
      <description>If you want to know what file emagent is creating, then run it as a unique user and then do lsof | grep {user}. This should list all files open by that user and you can then track down which one it is.&lt;BR /&gt;&lt;BR /&gt;There's probably a better way to do this with lsof, so use the man page!</description>
      <pubDate>Tue, 30 Nov 2004 04:11:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/weird-different-output-of-quot-df-quot-and-quot-du-quot/m-p/3432238#M15099</guid>
      <dc:creator>Michael Williams_6</dc:creator>
      <dc:date>2004-11-30T04:11:26Z</dc:date>
    </item>
  </channel>
</rss>

