|
From: Tony S. <tsh...@os...> - 2007-04-15 22:07:06
|
mysql -u <user> --password=<pass> <db_name> -e 'show table status;' |
awk '{sum=sum+$7+$9;} END {print sum/1024/1024}'
where <user>, <pass> and <db_name> is your account and database.
returns the size of (sum of) columns Data_length + Index_length in MB
That came from mysql's website. So far as total space available,
that's trickier. Unless you've built-in some sort of limit for a
particular database, it would be ~= to the amount of space left of the
filesystem that the database resides on *or* ~= to the space available
left in the ndb cluster. Good question either way though. :\
Michal Ludvig wrote:
> Tony Shadwick wrote:
>
>> manager# df -h
>> Filesystem Size Used Avail Capacity Mounted on
>> /dev/ad0s1a 496M 76M 380M 17% /
>> devfs 1.0K 1.0K 0B 100% /dev
>> /dev/ad0s1e 496M 20K 456M 0% /tmp
>> /dev/ad0s1f 28G 1.9G 24G 7% /usr
>> /dev/ad0s1d 2.9G 39M 2.6G 1% /var
>> devfs 1.0K 1.0K 0B 100% /var/named/dev
>> /dev/fuse1 0B 0B 0B 100% /mysqlfs
>>
>> Um...capacity 100%?
>
> I have no idea how to get an amount of free space from MySQL. I could
> indeed count the Used space quite easily but not the free space. I'm not
> sure that MySQL can report it somehow. Any ideas?
>
> Michal
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Mysqlfs-general mailing list
> Mys...@li...
> https://lists.sourceforge.net/lists/listinfo/mysqlfs-general
|