ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » Different df and du values for log file system

Post new topic  Reply to topic
 Different df and du values for log file system « View previous topic :: View next topic » 
Author Message
crossland
PostPosted: Fri Jul 29, 2005 2:39 am    Post subject: Different df and du values for log file system Reply with quote

Master

Joined: 26 Jun 2001
Posts: 248

My client is getting two different values for the amount of space being used for the MQ log filesystem, depending upon whether they use the df or du command.

As I understand it, df is based on information from statvfs while du actually adds the space used by all the files it finds.

They are using linear logging and have a script to remove unwanted log files. The difference between the output from the 2 commands is considerable.

Has anyone seen this happen before?

Thanks,

Tim
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Jul 29, 2005 3:24 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Are they sure they aren't looking at one number in KB and another number in MB, or similar?

Also, define "considerable"... how much difference? Is the difference explainable by block allocation vs. byte count?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
crossland
PostPosted: Fri Jul 29, 2005 5:52 am    Post subject: Reply with quote

Master

Joined: 26 Jun 2001
Posts: 248

As the -k flag is being used on both commands, the output should be in units of 1024 bytes in both cases.

du -k shows 1471457 for /var/mqm/log

while the used column of df -k shows 6815129 for the same file system.

Regards,

Tim
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Jul 29, 2005 6:01 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Are they running du as mqm or root - a user that has full permissions on all files underneath /var/mqm/log?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Jul 29, 2005 11:57 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Depending on the flavor and the way the file system is created there are some inherent differences between df and du.

1) assumption is that the user will have full permissions to the file system so that no authorization problems skews the data.

Unix file systems are defined by a number of nodes or possible descriptors. You will see something about it with the df commande:
Quote:

Iused %Iused
4380 2%


Now each node has a number of allocated bytes.
Files may span multiple nodes but not fully occupy a single node.
Thus true usage in MB or kB does not reflect node usage.

How ever for free space calculation the free nodes are used....

What does this mean? The more your file system is fragmented ... the less free space you have even though the total amount of bytes in the files does nowhere amount to the calculation (Total space - Free space).

Enjoy
Back to top
View user's profile Send private message Send e-mail
csmith28
PostPosted: Fri Jul 29, 2005 5:04 pm    Post subject: Reply with quote

Grand Master

Joined: 15 Jul 2003
Posts: 1196
Location: Arizona

crossland wrote:
As the -k flag is being used on both commands, the output should be in units of 1024 bytes in both cases.

du -k shows 1471457 for /var/mqm/log

while the used column of df -k shows 6815129 for the same file system.

Regards,

Tim


I have seen this before and it usually indicates that someone deleted a file that was actively being written to when it was deleted so the Inodes have been orphaned and the statvfs is not being updated.

In older versions of AIX a reboot of the server was needed to restore normal behavior but now if you can, and this part gets tricky, devine what process was doing the write to the file that was deleted and restart it the the df command will start to function as expected.

Under the circumstances since the Filesystem is /var/mqm/errors I suspect that someone may have deleted a *.FDC file while it was being written too. Unfortunately this may require you to stop and restart the MQManager involved.
_________________
Yes, I am an agent of Satan but my duties are largely ceremonial.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Different df and du values for log file system
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.