[SERVER-18676] Dump the storage engine in the mongo shell prompt Created: 27/May/15  Updated: 27/Oct/21  Resolved: 27/Oct/21

Status: Closed
Project: Core Server
Component/s: Admin, Shell
Affects Version/s: 3.0.3
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Michael Kania Assignee: Geert Bosch
Resolution: Won't Do Votes: 0
Labels: nc
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

Since replicasets can contain nodes running different storage engines it would be useful to have the mongo shell dump the storage engine on start up.



 Comments   
Comment by Ramon Fernandez Marina [ 27/May/15 ]

dynamike, adding startup messages may not be desirable as it may break users' scripts. There's however a simple way to accomplish this by adding the following code to ~/.mongorc.js:

var engine = db.serverStatus().storageEngine
printjson(engine)

Here's the effect:

$ mongo
MongoDB shell version: 3.0.3
connecting to: 127.0.0.1:27017/test
{ "name" : "mmapv1" }
> 

Is this the functionality you're requesting in this ticket? If not, can you please add more details?

Thanks,
Ramón.

Generated at Thu Feb 08 03:48:25 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.