[JDEV] How to get current number of users?
jabber.org at ralphm.ik.nu
Wed Jan 22 06:56:50 CST 2003
On Wed, Jan 22, 2003 at 01:27:29PM +0100, Sylvain Roberdeau wrote:
> I'm looking for a way to get current number of connected users for a
> stat service and RRD Tools.
> First, I thought that an admin command or an jabberd module exist.
> Before create a specific module, I would like to know if there is an
> existing way to do that.
> Thanks for the anwser
The easiest way to measure this outside jabber is to count the number of
incoming connections to port 5222. You can do this by parsing the output of
netstat -a, but if you are familiar with snmp, use cricket and have an snmpd
running, the information is available there, too.
You can try querying:
where x.x.x.x is your external IP address, y.y.y.y is the other party and p is
the port their local port. If y.y.y.y is 0.0.0.0 and p is 0 you found the
listen entry (value is 2), established connections have a value of 5.
More information about the JDev