How to estimate filesystem size used by a subtree ?

Author Message

H-Works Agency

Saturday 16 July 2011 6:05:56 am

Hey,

I have a rather unusual question about mysql and ezpublish :

I need to be able to tell how much space on the filesystem a certain subtree is using.

I know how to do that with /var but how to estimate database amount of data for a certain subtree ?

Thanx in advance for any help.

Cheers !

EZP is Great

Ivo Lukac

Sunday 17 July 2011 6:52:51 am

How about:

  • get the table size and number of rows in ezcontentobject_attribute table
  • calculate the average row size from the data above
  • get number of objects for each class in the subtree
  • calculate number of attributes with the data from previous line
  • finally, multiply average attribute row size with number of attributes 

A very rough estimate, but could do the trick.

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

H-Works Agency

Sunday 17 July 2011 9:11:14 am

Thats sounds like a good procedure, thank you for that Ivo.

I'll explore that way - maybe thru a shell script - and will post the results back here !

EZP is Great

Romeo Antony

Sunday 17 July 2011 3:56:18 pm

Very usefull post.

 

Thanks Ivo .

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.