NetFlow Analyzer的数据大小查询

NetFlow Analyzer的数据大小查询

NetFlow Analyzer包括聚合数据、1分钟数据和原始数据等。按照下面的方法查看各种数据占用的磁盘空间大小。

1. 原始数据大小查询

SELECT relname as TableName, pg_size_pretty(pg_table_size(relid)) as TableSIZE,pg_size_pretty(pg_indexes_size(relid)) 
as IndexSIZE FROM pg_catalog.pg_stat_user_tables where relname in (select lower(LOOKUP_TABLENAME) from RawMetaTable union all select lower(LOOKUP_TABLENAME) from MEDIANET_MetaTable union all
select lower(LOOKUP_TABLENAME) from APPFLOW_MetaTable union all select lower(LOOKUP_TABLENAME) from ArtFlow_MetaTable union all
select lower(LOOKUP_TABLENAME) from QoSFlow_MetaTable union all select lower(LOOKUP_TABLENAME) from QoSDrop_MetaTable union all
 select lower(LOOKUP_TABLENAME) from UrlFlow_MetaTable union all select lower(LOOKUP_TABLENAME) from WLCFlow_MetaTable)
ORDER BY pg_total_relation_size(relid) DESC;


2. 聚合数据大小查询

SELECT relname as TableName,pg_size_pretty(pg_table_size(relid)) as TableSIZE,pg_size_pretty(pg_indexes_size(relid)) as 
IndexSIZE,n_live_tup  as RowCounts FROM pg_catalog.pg_stat_user_tables where relname in (select lower(LOOKUP_TABLENAME) from NFA_MetaTable union all select lower(LOOKUP_TABLENAME) from AvcAppMetaTable union all
select lower(LOOKUP_TABLENAME) from NBAR_MetaTable union all select lower(LOOKUP_TABLENAME) from QOS_MetaTable union all
select lower(LOOKUP_TABLENAME) from MATCH_QOS_MetaTable union all select lower(LOOKUP_TABLENAME) from TopStatsMetaTable union all
 select lower(LOOKUP_TABLENAME) from WlcMetaTable union all select lower(LOOKUP_TABLENAME) from WLCTopStatsMetaTable union all
select lower(LOOKUP_TABLENAME) from SocialMediaMetatable)
ORDER BY pg_total_relation_size(relid) DESC;

3. 1分钟数据大小


  • 打开安装目录 <OpManager_Home>
  • 找到data文件夹,查看1分钟数据大小。