Differentiations of DF and DU and problems of disk space

xiaoxiao2021-03-06  38

Solaris Sparc Root DF -KB Results / DEV / VX / DSK / Home 12197220 11086515 988733 92% / Home Du -ks View / Home Partitions 10 Dep 27 Lost Found 395517 Oracle 288 Bigml.lsof 212309 WEI 4041696 LAN 346074 XUE 520 What is the result of Xue.log du adds to DF? !

Below this article gives an answer

Document ID: 26928Synopsis: DU and DF DIFFERENCES (Originally Published 8/91)

Update Date: 2001-05-13Description: DU and DF DIFFERENCES

- - - - -----------

This Article Explains How Reporting Disk Usage Du and Reporting Free Disk Space

On File Systems DF May Show Different Numbers.

DU

-

The Du User Command Gives The Number of Kilobytes Contained in All Files and,

Recursively, Directories Within Each Specified Directory OR File (FileName).

IF filename is missing, `'' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' ''

Has Multiple Links To It is Only Counted Once.

EXAMPLE:

System% du

5./jokes

33 ./squash

44 ./tech.papers/lpr.document

217 ./tech.papers/new.manager

401 ./tech.papers

144 ./memos

80 ./Letters

388 ./window

93 ./messages

15 ./Useful.news

1211.

Note That The last Number, 1211 Is The Grand Total (In Kilobytes) for the

Directory.

DF

-

The DF User Command Displays The Following Information:

Amount of Disk Space Occupied by Currently Mounted File Systems

The Amount of Used and Available Space

How much of the file system's table keta

Used without arguments, DF Reports on All Mounted File Systems.

EXAMPLE:

SYSTEM% DF

FileSystem Kbytes Used Avail Capacity Mounted ON

/ DEV / IP0A 7445 4714 1986 70% /

/ DEV / IP0G 42277 35291 2758 93% / usr

NOTE: Used Plus Avail Is Less Than The Amount of Space In The File System

(kilobytes) Because the system reserves a fraction of the space in the filesystem to thingthing allocation routines to work well. The Amount Reserved is

Typically About 10%. (this May be adjusted. Refer to

THE MAN PAGES ON Tunefs (8) for more information.) When all the space on a file

System, Except for this Reserve, IS in Use, ONLY THE SUPER-USER CAN Allocate

New Files and Data Blocks to EXISTING FILES. THIS, HOWEVER, May Cause the file

System to be over allocated .hen a file system is over allocated in this Way,

DF May Report That The File System Is More Than 100% Utilized.

IF arguments to df are disk partitions (for example, / dev / ip0as or path name),

DF Produces a report on the file system containing the name, thus, df

Shows The Amount of Space on The File System Containing The Current Directory.

Problem definition

----------------

This Section Gives The Technical Explanization of Why Du and DF Sometimes Report

DIFFERENT TOTALS OF DISK SPACE USAGE.

WHEN a Program That Is Running in The Background Writes to a File While THE

Process is Running, The File to Which this process is writing is deleted.

Running Df and du shows a discrepancy in the Amount of Disk space usage. The

DF Command Shows a higher value.

Explanation Summary

-----------------

WHEN you open a file, you get a pointer. Subsequent Writes to this file

References this file pointer. The Write Call Does Not Check To See iF The File

Is there ipecified number of character orthhoting Number of Characters Starting, IT JUST WRITES TO

AT a predetermined location. Regardless of Whather The File Exist or Not, DISK

Blocks are buy by the write operation.

The DF Command Reports The Number of Disk Blocks Used While Du Goes THROUGH Thefile Structure And and Reports The Number of Blocks Used by Each Directory. AS

Far As du is converned, The file used by the process does not exist, so it does

Not Report Blocks Used by this Phantom File. But DF Keeps TRACK OF DISK BLOCKS

Used, and it reports the block..

转载请注明原文地址:https://www.9cbs.com/read-55649.html

New Post(0)