Monitoring, Management & Location Tracking

How to find the PGSQL database table size in Airwave
Q:

How to find the database table size in Airwave for a specific table?



A:

We could execute the command below in the Airwave CLI to find the size of a specific table:

# dbc "select pg_size_pretty(pg_total_relation_size('ap'));

The above command will show the size of the ap table, as shown in the example output below:

[root@localhost mercury]# dbc "select pg_size_pretty(pg_total_relation_size('ap'));"
 pg_size_pretty
----------------
 272 kB
(1 row)

However, if we want to see the size of all the tables individually, we could run the below command:

# dbsize

This command will list out the table name's and their size's, individually.

Note: The list will be big, might not be easy to read in the single window, we could use the flags like "# dbsize | more" or  "# dbsize | less" to see the list in pages or we could also pipe the output to a text file, by running the command # dbsize > /tmp/<anyfilename.txt>

 

 

 

 

 

 

 

 

 

Version History
Revision #:
2 of 2
Last update:
‎12-19-2016 10:07 AM
Updated by:
 
Labels (1)
Contributors
Search Airheads
Showing results for 
Search instead for 
Did you mean: 
Is this a frequent problem?

Request an official Aruba knowledge base article to be written by our experts.