惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
News and Events Feed by Topic
T
The Exploit Database - CXSecurity.com
P
Palo Alto Networks Blog
T
Threat Research - Cisco Blogs
Cloudbric
Cloudbric
Recent Commits to openclaw:main
Recent Commits to openclaw:main
I
Intezer
Attack and Defense Labs
Attack and Defense Labs
P
Privacy International News Feed
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
L
Lohrmann on Cybersecurity
C
Cybersecurity and Infrastructure Security Agency CISA
V2EX - 技术
V2EX - 技术
AWS News Blog
AWS News Blog
O
OpenAI News
L
LINUX DO - 最新话题
N
News | PayPal Newsroom
PCI Perspectives
PCI Perspectives
www.infosecurity-magazine.com
www.infosecurity-magazine.com
T
Troy Hunt's Blog
Latest news
Latest news
D
Darknet – Hacking Tools, Hacker News & Cyber Security
A
Arctic Wolf
Spread Privacy
Spread Privacy
G
GRAHAM CLULEY
T
Tor Project blog
博客园_首页
Know Your Adversary
Know Your Adversary
有赞技术团队
有赞技术团队
S
Secure Thoughts
美团技术团队
Apple Machine Learning Research
Apple Machine Learning Research
爱范儿
爱范儿
T
Tailwind CSS Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
V
Visual Studio Blog
J
Java Code Geeks
Cisco Talos Blog
Cisco Talos Blog
Schneier on Security
Schneier on Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
S
Security Affairs
Jina AI
Jina AI
人人都是产品经理
人人都是产品经理
雷峰网
雷峰网
宝玉的分享
宝玉的分享
量子位
Last Week in AI
Last Week in AI
月光博客
月光博客
罗磊的独立博客
S
SegmentFault 最新的问题

博客园 - 风易微凉

AI笔记-快捷键2 AI笔记 快捷键1 AI笔记-钢笔PEN 我的2025 倒影中的你 后座有你 踏入破解行业 一个人、一场梦、一座空城、一生心疼 人间有味是清欢 安卓开发中遇到耗电量高的问题解决方案 no no no no 敢说不 逆向工程-反编译,嵌入 AlarmManager的使用 基于项目中遇到的技术问题,谈谈SharedPreferences的使用的注意问题 根据当前进程号,获取进程下线程数目 MongoDB数据库日志备份压缩脚本 mongodb数据库磁盘碎片整理。 mongodb mapreduce示例 mongodb表字段处理生成域名字段
mongodb库表信息监控脚本
风易微凉 · 2013-12-31 · via 博客园 - 风易微凉
var collnames=db.getCollectionNames();
//print(collnames)
var indexsize="";
var collline="";
var storagesize=""
var size=""
var count=""
/*print("|--------------------------------------------totalIndexSize----------------------------------------|")
for (coll in collnames)
{
    if(collnames[coll].substr(0,7)=='system.')
        continue;
    collline+=collnames[coll]+"   ";
    stats=db[collnames[coll]].stats();
//    print(collnames[coll]+": "+stats["totalIndexSize"]);
    indexsize=indexsize+"   "+stats["totalIndexSize"]
}
print("|"+collline+"|")
print("|"+indexsize+"|")
print("|--------------------------------------------totalIndexSize----------------------------------------|")
*/
print("******************"+db.getName()+"*******************")
for (coll in collnames)
{
        if(collnames[coll].substr(0,7)=='system.')
                continue;
    collline+=collnames[coll]+"   ";
        stats=db[collnames[coll]].stats();
    printjson(stats);
    indexsize=indexsize+"   "+stats["totalIndexSize"]
    storagesize=storagesize+"   "+stats["storageSize"]
    count=count+"   "+stats["count"]
    size=size+"   "+stats["size"]
}
print("******************"+db.getName()+"*******************")
print("|"+db.getName())
print("|-------------------------------------------[totalIndexSize]---------------------------------------|")
print("|"+collline+"|")
print("|"+indexsize+"|")
print("|-------------------------------------------[totalIndexSize]---------------------------------------|")
print("|-------------------------------------------[storageSize]------------------------------------------|")
print("|"+collline+"|")
print("|"+storagesize+"|")
print("|-------------------------------------------[storageSize]------------------------------------------|")
print("|-------------------------------------------[count]------------------------------------------------|")
print("|"+collline+"|")
print("|"+count+"|")
print("|-------------------------------------------[count]------------------------------------------------|")
print("|-------------------------------------------[size]-------------------------------------------------|")
print("|"+collline+"|")
print("|"+size+"|")
print("|-------------------------------------------[size]-------------------------------------------------|")

posted @ 2013-12-31 14:22  风易微凉  阅读(376)  评论()    收藏  举报