#!/usr/bin/env python import os,sys list = [] for i in range(3,50): l = os.popen("/bin/echo 'show collections'| /usr/local/mongodb/mongodb/bin/mongo 127.0.0.1:27103/数据库名|sed -n '%sp'" %i) #获取数据库的集合列表 l = l.read() if l != "": list.appen…
1. 统计数据文件.暂时文件.日志文件大小 select sum(bytes)/1024/1024/1024 as GB from dba_data_files; select sum(bytes)/1024/1024/1024 as GB from dba_temp_files; select sum(bytes)/1024/1024/1024 as GB from v$log; 2. 统计Oracle数据库文件占用空间 Total Size of the database= A+B+C se…