du and dfspace reporting


 
Thread Tools Search this Thread
Operating Systems SCO du and dfspace reporting
# 29  
Old 09-15-2012
I am presuming that the purpose for the original question is disk space management.
"dfspace" or "df -v" are very accurate in terms of disk space available. If you run out of disk space on a file system and then delete a file, "df" correctly reports the new space.
I use "du -a |sort -r -n" to find where the space is being used. The output shows files in descending order by size, and directories in descending order by size of files within. Generally the problems show on the first page of output (either one or two extremely large files, or a directory with a large number of small files.)
# 30  
Old 09-15-2012
But note that du, at least on SCO as you demonstrated, has the odd behavior to account space used on non disk based file system entities.
Edit: Solaris is actually doing the same, one more reason to avoid investigating non disk based file systems.

In any case, for a meaningful comparison, you should always use the -xoption to limit du to the requested file system.

Last edited by jlliagre; 09-15-2012 at 10:39 AM..
# 31  
Old 09-18-2012
OK. I was missing this point of using -x option with du. This helped me . Your posts helped me with that. But , do "df -k -v" also shows other fileystems mounted on / as well (it shows /stand separately) and if yes do this have any option like x for du, to limit it to / only.

If "Df -k -v" donot show other mounted filesystems , is it correct to take blocks as the whole partition size of / (excluding other filesystems)


Code:
# df -k -v
Mount Dir  Filesystem              blocks      used      free   %used
/          /dev/root            871678974  64246922 807432052     8%
/stand     /dev/boot                40959      6413     34546    16%

---------------
Dexter

Last edited by radoulov; 09-18-2012 at 08:23 AM..
# 32  
Old 09-18-2012
df -k / will only show statistics belonging to the / file system. Mounted file systems information is never merged by df.
The -v option is useless with df.
# 33  
Old 09-19-2012
"The -v option is useless with df."

-v option for displaying the used blocks which by default don't show up in df.
-------------------------

Lastly,Will it be correct to say from the following , that :

# du -xk / | tail -1
38195512

# df -k -v
Mount Dir Filesystem blocks used free %used
/ /dev/root 871678974 64231830 807447144 8%
/stand /dev/boot 40959 6413 34546 16%

For my / partition

total partition space (df)= 871678974 blocks = 871.6 gb (approx.)

present used space by whole partition (df -v) = 64231830 blocks= 64.2 gb (approx.)

space usage by files and directories (du) = 38195512 blocks = 38.1 gb (approx.)

space used by filesystem entities/data = 64.2 - 38.1 gb = 26.1 gb (approx.)

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

regards,

Dexter
# 34  
Old 09-19-2012
For comparison:
Code:
#dfspace
/z        : Disk space: 354341.99 MB of 357144.24 MB available (99.22%).
                                                         
 
# cd /z                                                                 
# l                                                                     
total 0                                                                 
drwxr-xr-x    2 root     sys         96 Aug 22 20:47 lost+found

I think that what has made the 26gb of overhead appear excessive is the fact that the partition is only eight percent used.
So 26gb over 64gb used looks unusual, whereas 26gb/871gb total is only three percent waste.
# 35  
Old 09-19-2012
I'm not familiar enough with SCO but I guess it support more than one file system type so are you using the same one, and which one is it ?

@dextergenious: you are right with the -v option. As it is not POSIX, it has been dropped in other Unix implementations.

You states "space used by filesystem entities = 26.1 gb". Did you reboot and you perform a fsck to rule out deleted still open files and file system corruption ?

Last edited by jlliagre; 09-19-2012 at 01:06 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Reporting lines above a particular pattern

Below is a typical report each of the lines represent the fields in the report component1 component2 <pattern> .. .. n lines ... .. VIOL = 2 the command should display component1 component2 VIOL = 2 only if pattern field of the report is "good" component1 and... (8 Replies)
Discussion started by: dll_fpga
8 Replies

2. Solaris

Monitoring and Reporting Solutions

Hi, I am hunting for a low cost Monitoring & Reporting Tool for the SUN Environment. I have all and all SUN Environment with LDOMs, Zones. The monitoring Tool 1. Hardware failure. 2. Disk space and failure. 3. LDOMS,Zones. 4. CPU,Memory Utilization. 5. ping,URL Monitors 6. Send... (4 Replies)
Discussion started by: menonk
4 Replies

3. Shell Programming and Scripting

Disk space reporting

I need to accomplish the following task - I have a number of accounts for a number of applications that i deploy on a unix server. There are a number of directories for each account in /prod/apps directory. eg. For an account Application1 I have /prod/apps/Application1_1 /prod/apps/Application1_2... (4 Replies)
Discussion started by: niranjandighe
4 Replies

4. Filesystems, Disks and Memory

Storage Monitoring/Reporting?

Hi. How do you guys, monitor/report your Storage environment? I have people (don't we all? ) that like to have monthly reports on space (raw/assigned/available), ports available/used, switches and the such. Do you use anything special? Or are you like me, a nice big Excel spreadsheet? How... (1 Reply)
Discussion started by: Stephan
1 Replies

5. UNIX for Dummies Questions & Answers

Error reporting script

I am very new to unix/linux and am unsure how to do the following tasks within my script 1) append a log file and add a timestamped echo "Error occured" to it, if posibble to print it to file and on screen at the same time would be even better. 2) As my main script will be calling on a couple... (1 Reply)
Discussion started by: shamwick
1 Replies

6. Shell Programming and Scripting

Reporting SU and Failedlogins

Hi:- I am working on an audit report that produces a monthly summary of account activity on a particular AIX host. I am struggling with su activity and failed logins as these tend to come back with more then a month's data. Is there a easy way that these files can be rotated/cleaned out on a... (1 Reply)
Discussion started by: janet
1 Replies

7. SCO

regarding dfspace

hi, i m having a sco unix system...i want to store the output of dfspace command ie %free space of each partition to different variable so that i can use it for further processing.......can anybody pls help me out thx girish (1 Reply)
Discussion started by: girish_shukla
1 Replies

8. UNIX for Dummies Questions & Answers

Progress reporting

Hi everyone, I'm completely new to the board and to UNIX and I have the following question regarding a script I am building. I am trying to copy an entire directory into a new directory and I was wondering if there is any way of printing on screen a progress report, for example a percentage. It... (9 Replies)
Discussion started by: Ypnos
9 Replies

9. UNIX for Dummies Questions & Answers

Reporting

I have to do a lot of reporting for the company that I work for and was wondering if anyone had suggestions for a way to create professional looking reports. I currently use Filepro so much that I rarely see the shell. Any help is appreciated. (3 Replies)
Discussion started by: Mike11
3 Replies
Login or Register to Ask a Question