Sunday, November 30, 2025

Script to listing MongoDB assortment URI (to map to WiredTiger recordsdata)


When tracing I/O to WiredTiger recordsdata, like with strace -y, the filenames don’t give the gathering title:

strace -yy -e hint=pwrite64 -s100 -fqT -p $(pgrep -d, mongod)
Enter fullscreen mode

Exit fullscreen mode

[pid   237] pwrite64(15, "26314kK201300211204300percent202265table:collection-2fb69242-1b95-4a08-9939-23172e5ea178+22numRecords3"..., 512, 200576) = 512 <0.000179>
[pid   238] pwrite64(69, "10`27412022521375t15201214(350i*%214377377337303300207200247'2_id6test12marker7Franck"..., 4096, 4096) = 4096 <0.000053>
[pid   238] pwrite64(69, "t@26 12022B312326158*350i*%214377377337303300207200207200201344t374361U"..., 4096, 8192) = 4096 <0.000034>
[pid   238] pwrite64(69, "002n1120V335F25134236532200317300337300200200"..., 4096, 12288) = 4096 <0.000028>
[pid   238] pwrite64(69, "9211120m/30230613423653220034237300317300342/30034237300200201212342o300304Oencryption=(keyid=,title=),block"..., 4096, 16384) = 4096 <0.000022>
[pid   238] pwrite64(37, "5322474120)1=201P202FZidZ204<353316272256317E17240nK233X~2336ZuidZ 343260304B2303743424232373364310231o271$'256A344d233223L244225"..., 4096, 20480) = 4096 <0.000069>
[pid   238] pwrite64(37, "6E26 120p3142240158*350i*%F377377337302300205345E37737733730020720420134420<340351"..., 4096, 24576) = 4096 <0.000057>
[pid   238] pwrite64(37, "003v1120364'AB134236532200342/300337300200200"..., 4096, 28672) = 4096 <0.000083>
[pid   238] pwrite64(37, "003v1120210201f23113423653220031730034237300200201207342o300304Gencryption=(keyid=,title=),block_metad"..., 4096, 32768) = 4096 <0.000012>
[pid   238] pwrite64(36, "532014741203y34133215201214(350i*%F377377337302300s2003002023023_idH5id204^v252=334206IR272320264246v35327.5uid"..., 4096, 20480) = 4096 <0.000051>
[pid   238] pwrite64(36, "6E26 120241yx34158*350i*%F377377337302300205345E377377337300207204201344332341X303"..., 4096, 24576) = 4096 <0.000085>
[pid   238] pwrite64(36, "003v1120364'AB134236532200342/300337300200200"..., 4096, 28672) = 4096 <0.000027>
[pid   238] pwrite64(36, "003v1120d3230Y13423653220031730034237300200201207342o300304Oencryption=(keyid=,title=),block_metad"..., 4096, 32768) = 4096 <0.000041>
[pid   238] pwrite64(5, "10'1674120333122473631P202FZidZ204<353316272256317E17240nK233X~2336ZuidZ 343260304B2303743424232373364310231o271$'256A344d233223L244225"..., 4096, 4096) = 4096 <0.000026>
[pid   238] pwrite64(5, "tE26 12034321367&158*350i*$374377377337303300205345217377377337277207200201344363247251333"..., 4096, 8192) = 4096 <0.000271>
[pid   238] pwrite64(5, "002n1120V335F25134236532200317300337300200200"..., 4096, 12288) = 4096 <0.000055>
[pid   238] pwrite64(5, "9211120H224$30513423653220034237300317300342/30034237300200201212342o300304Gencryption=(keyid=,title=),block"..., 4096, 16384) = 4096 <0.000127>
[pid   238] pwrite64(49, "10P267412024322226434615201214(350i*$374377377337303300c200300f2463_idH5id204243,2762057376F244205zr343216216f3765uid"..., 4096, 4096) = 4096 <0.000124>
[pid   238] pwrite64(49, "tE26 12025472200158*350i*$374377377337303300207345217377377337300207200201344346264rc"..., 4096, 8192) = 4096 <0.000058>
[pid   238] pwrite64(49, "002n1120V335F25134236532200317300337300200200"..., 4096, 12288) = 4096 <0.000085>
[pid   238] pwrite64(49, "92111203052323732413423653220034237300317300342/30034237300200201212342o300304Oencryption=(keyid=,title=),block"..., 4096, 16384) = 4096 <0.000010>
[pid   238] pwrite64(41, "v34533H741 317@3352341%350i*$335377377337301200235]2op2n2ns13o352msg17initiatin"..., 8192, 20480) = 8192 <0.000038>
[pid   238] pwrite64(41, "f00426 1202772240200158207204202344234335 217"..., 4096, 28672) = 4096 <0.000027>
[pid   238] pwrite64(41, "004f1120^245335343134236532200342/30034217300200200"..., 4096, 32768) = 4096 <0.000017>
[pid   238] pwrite64(41, "=251120372257271374134236532200342o30031730031730034237300342177300317300200201215342217300304jencryption=(keyid=,title=),b"..., 4096, 36864) = 4096 <0.000009>
[pid   238] pwrite64(24, "10s274120?330w815201200207G2_id30oplogTruncateAfterPoint21oplogTruncateAfter"..., 4096, 4096) = 4096 <0.000137>
[pid   238] pwrite64(24, "t00426 120271p261a1582072002013448w267377"..., 4096, 8192) = 4096 <0.000087>
[pid   238] pwrite64(24, "002n1120V335F25134236532200317300337300200200"..., 4096, 12288) = 4096 <0.000102>
[pid   238] pwrite64(24, "921112020320633-13423653220034237300317300342/30034237300200201212342o300304Mencryption=(keyid=,title=),block"..., 4096, 16384) = 4096 <0.000074>
[pid   238] pwrite64(18, "va53474120256dT3701Itable:_mdb_catalog257+22numRecords2222dataSize36334"..., 4096, 20480) = 4096 <0.000064>
[pid   238] pwrite64(18, "f00426 120W24310:158207204201344370TDn"..., 4096, 24576) = 4096 <0.000014>
[pid   238] pwrite64(18, "003v1120364'AB134236532200342/300337300200200"..., 4096, 28672) = 4096 <0.000047>
[pid   238] pwrite64(18, "003v112034265ch13423653220031730034237300200201215342o3003045encryption=(keyid=,title=),block_metad"..., 4096, 32768) = 4096 <0.000027>
[pid   238] pwrite64(16, "10hn2474120:92242301005203201212350i*$335377377337303200214x350i*$33537737733730330021201207200301=350i*$335377377337304350i*$335377377337303203j13md306"..., 4096, 4096) = 4096 <0.000129>
[pid   238] pwrite64(16, "tM26 12031333Y221158~350i*$33537737733730330020734525637737733727734525637737733730020020020720020134423022430372"..., 4096, 8192) = 4096 <0.000046>
[pid   238] pwrite64(16, "002n1120V335F25134236532200317300337300200200"..., 4096, 12288) = 4096 <0.000023>
[pid   238] pwrite64(16, "9211120$jAb13423653220034237300317300342/30034237300200201212342o300305230encryption=(keyid=,title=),block"..., 4096, 16384) = 4096 <0.000062>
[pid   238] pwrite64(15, "200)300374y204207202"..., 13568, 201088) = 13568 <0.000091>
[pid   238] pwrite64(13, "3324nf741pY232Q~1Ycolgroup:_mdb_catalog200300^app_metadata=(formatVersion=1),ass"..., 28672, 4096) = 28672 <0.000034>
[pid   238] pwrite64(13, "345m(741p253|333*1341file:collection-af1de828-88d4-462d-8163-138c3e6a94de.wt200304213"..., 28672, 102400) = 28672 <0.000184>
[pid   238] pwrite64(13, "35*bl741p002pLs1315file:index-679f8d22-1c9e-4852-8909-903c3809d2b4.wt200304305acces"..., 28672, 131072) = 28672 <0.000018>
[pid   238] pwrite64(13, "36o66 120352=F361158 300212207200207344~Qz31Ifile:collection-af8 300212207230207344*333k5file:index-678"..., 4096, 32768) = 4096 <0.000046>
[pid   238] pwrite64(13, ":2211202262230230134236532200317300342_3003431o300342277300200200"..., 4096, 36864) = 4096 <0.000027>
[pid   238] pwrite64(13, "@301120}c245(1342365322003421773003173003422173003422773003432O3003421773002002012373432357300305Hencryption=(keyid=,title="..., 4096, 40960) = 4096 <0.000124>
[pid   238] pwrite64(64, "WiredTiger model stringnWiredTiger 12.0.0: (November 15, 2024)nWiredTiger versionnmajor=12,minor=0"..., 1471, 0) = 1471 <0.000048>
[pid   238] pwrite64(15, "200D376332222002013432361@200"..., 128, 214656) = 128 <0.000029>
Enter fullscreen mode

Exit fullscreen mode

Here’s a fast script to run with mongosh that will get the URI for all collections:

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles