0

I've loaded .tbl files in the tables, now how I can see the total space used on the disk by the database? I'm using Fedora

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Mark
  • 141
  • 1
  • 3
  • 15

2 Answers2

2

The disk footprint can be assessed using the (Linux) command 'du' on the dbfarm directory or to run the query 'select * from storage();

Source: http://www.monetdb.org/Documentation/Userguide/diskspace

almost smart
  • 115
  • 6
  • it gives a table with: schema, table, column, type, location, count, type, width, but it doesn't give the size... – Mark Mar 07 '14 at 16:11
  • the easiest way to get the size is by running "du" on the farm directory. if you're unfamiliar with the command, there's a quick overview here: http://www.tecmint.com/check-linux-disk-usage-of-files-and-directories/ . if you need the size of a particular table (in bytes), you can run a sum over the "columnsize" column in storage(). – almost smart Mar 07 '14 at 22:51
1

You can try as follows:

mclient -d dwh -f tab -s "select location from storage() where table='name_of_a_table';" | xargs -i du -m /var/monetdb5/dbfarm/dwh/bat/{}.tail | cut -f1 | paste -sd+ | bc
echox
  • 9,726
  • 6
  • 33
  • 51