1
|
.
/mongosniff
--
source
NET lo
|
1
2
3
4
5
6
7
8
9
10
|
[root@localhost bin]
# ./mongo
MongoDB shell version: 1.8.1
connecting to:
test
> show dbs
admin 0.0625GB
foo
0.0625GB
local
(empty)
test
0.0625GB
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
[root@localhost bin]
# ./mongosniff --source NET lo
sniffing... 27017
127.0.0.1:38500 -->> 127.0.0.1:27017 admin.$cmd 60 bytes
id
:537ebe0f 1400815119
query: { whatsmyuri: 1 } ntoreturn: 1 ntoskip: 0
127.0.0.1:27017 <<-- 127.0.0.1:38500 78 bytes
id
:531c3855 1394358357 - 1400815119
reply n:1 cursorId: 0
{ you:
"127.0.0.1:38500"
, ok: 1.0 }
127.0.0.1:38500 -->> 127.0.0.1:27017 admin.$cmd 80 bytes
id
:537ebe10 1400815120
query: { replSetGetStatus: 1, forShell: 1 } ntoreturn: 1 ntoskip: 0
127.0.0.1:27017 <<-- 127.0.0.1:38500 92 bytes
id
:531c3856 1394358358 - 1400815120
reply n:1 cursorId: 0
{ errmsg:
"not running with --replSet"
, ok: 0.0 }
127.0.0.1:38500 -->> 127.0.0.1:27017 admin.$cmd 67 bytes
id
:537ebe11 1400815121
query: { listDatabases: 1.0 } ntoreturn: -1 ntoskip: 0
127.0.0.1:27017 <<-- 127.0.0.1:38500 293 bytes
id
:531c3857 1394358359 - 1400815121
reply n:1 cursorId: 0
{ databases: [ { name:
"foo"
, sizeOnDisk: 67108864.0, empty:
false
}, { name:
"test"
,
sizeOnDisk: 67108864.0, empty:
false
}, { name:
"admin"
, sizeOnDisk: 67108864.0, empty:
false
},
{ name:
"local"
, sizeOnDisk: 1.0, empty:
true
} ], totalSize: 201326592.0, ok: 1.0 }
127.0.0.1:38500 -->> 127.0.0.1:27017 admin.$cmd 80 bytes
id
:537ebe12 1400815122
query: { replSetGetStatus: 1, forShell: 1 } ntoreturn: 1 ntoskip: 0
127.0.0.1:27017 <<-- 127.0.0.1:38500 92 bytes
id
:531c3858 1394358360 - 1400815122
reply n:1 cursorId: 0
{ errmsg:
"not running with --replSet"
, ok: 0.0 }
|
1
2
3
4
5
6
7
8
|
.
/mongostat
connected to: 127.0.0.1
insert query update delete getmore
command
flushes mapped vsize res faults locked db idx miss % qr|qw ar|aw netIn netOut conn
time
*0 *0 *0 *0 0 1|0 0 160m 507m 50m 0
test
:0.0% 0 0|0 0|0 62b 2k 1 20:21:26
*0 *0 *0 *0 0 1|0 0 160m 507m 50m 0
test
:0.0% 0 0|0 0|0 62b 2k 1 20:21:27
*0 *0 *0 *0 0 1|0 0 160m 507m 50m 0
test
:0.0% 0 0|0 0|0 62b 2k 1 20:21:28
*0 2 *0 *0 0 1|0 1 160m 507m 50m 0
test
:0.0% 0 0|0 0|0 62b 2k 1 20:21:29
*0 *0 *0 *0 0 1|0 0 160m 507m 50m 0
test
:0.0% 0 0|0 0|0 62b 2k 1 20:21:30
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
> db.stats()
{
"db"
:
"test"
,
"collections"
: 9,
#collection数量
"objects"
: 52,
#对象数量
"avgObjSize"
: 60.46153846153846,
#对象平均大小
"dataSize"
: 3144,
#数据大小
"storageSize"
: 249856,
#数据大小含预分配空间
"numExtents"
: 9,
#事件数量
"indexes"
: 9,
#索引数量
"indexSize"
: 73584,
#索引大小
"fileSize"
: 201326592,
#文件大小
"nsSizeMB"
: 16,
"dataFileVersion"
: {
"major"
: 4,
"minor"
: 5
},
"ok"
: 1
}
|