#695 prosodyctl connected_users_number

Reporter Dan
Owner Zash
Created
Updated
Stars ★ (1)
Tags
  • Status-Fixed
  • Type-Enhancement
  • Priority-Medium
  • AdminSocket
  • Milestone-0.12
  1. Dan on

    Please support printing the number of currently connected users with prosodyctl (comparable to ejabberdctl).

  2. Dan on

    answering to myself here: this can be achieved via mod_listusers. After placing it into the modules path you can get the number of currently connected users via: prosodyctl mod_listusers --connected |wc -l If you want to get the number of "unique" users currently online, i.e. filtering out the simultaneously connected ressources of the same user, you can achieve this via: prosodyctl mod_listusers --connected |cut -d"/" -f1 |sort -u |wc -l

  3. Dan on

    only (big) caveat here with mod_listusers is, that it depends on mod_admin_telnet, something I would definitely like to avoid, as calls to prosodyctl can be way better controlled (e.g. with sudo) than those to the local telnet console...

  4. Zash on

    Like #706, this would still depend on some way for prosodyctl to talk to Prosody.

  5. Zash on

    This is now possible via the admin socket

    Changes
    • tags AdminSocket
  6. Zash on

    You can now run `prosodyctl shell c2s count` to get a count of number of connected clients, or `prosodyctl shell c2s show' to list connected sessions. Is this enough to consider this done?

    Changes
    • tags Status-NeedInfo
  7. Dan on

    yes, thank you!

  8. Zash on

    Great, thanks

    Changes
    • owner Zash
    • tags Milestone-0.12 Status-Fixed

New comment

Not published. Used for spam prevention and optional update notifications.