list who is connected to a cluster
Hello,
On a sharded instance, I try to identify the connected physical people.
It is not easy. I cannot identify my own connection. 😦
Can we have a command to find out who is connected to the platform (excluding host2host connections, backup process, ...)?
The closest command but not complete and friendly :
use config
DBQuery.shellBatchSize = 300
db.system.sessions.aggregate( [ { $listSessions: { allUsers: true } },
{ $project: { _id: 0, "user":"$user.name" } } ,
{ $group : { _id: {"user": "$user" }, count: { $sum: 1 } } },
])
Regards
Jerome
2
votes
![](https://secure.gravatar.com/avatar/47f9b3deec0f64dd748704dd7b6f05aa?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)