Get all users count and online

Hello everyone.

I want to display total count user of our homenet network of jabber server and current number online user on our web-site.

How can I do it? Need I implemented plugin for this task or can receive this info just from asp (for example) script? Web Server and Jabber server is the same.

Thanks.

Message was edited by: vinnitu

I have the same problem,here is the It2000’'s answer

Hi,

the intention of this plugin was to display whether a user is online or not within a web page and not to deliver a web page similar to the ones in the admin console to display who’‘s online. It’'s similar to ICQ ( http://www.icq.com/features/web/indicator.html ) or AIM status icons.

It was used in the forum to display within the posts who’'s online at xmpp:...@jivesoftware.com.

You could iterate through the list of all users to display their status or write another plugin which delivers a full list.

LG

for your task see on

http://www.jivesoftware.org/wildfire/plugins.jsp

Presence Service plugin

Hi,

the number of registered users is stored in the database or very easy to get with a “select count(*) from jiveuser” while a list or number of online users is only available in memory. So you can either write a Wildfire plugin or use the web admin console to query this information.

I did write a perl and one other did write a php script to log in using the web admin console and then use the broadcast service. If you want to do it this way you need another webserver to publish the received data.

Perl (or PHP) must be installed to use it, here’'s the link to the perl script which does a simple broadcast:

http://www.jivesoftware.org/community/thread.jspa?messageID=126512

So you have to tweak it a little bit to get the list of all users (http://server:9090/session-summary.jsp?range=1000) as HTML and then you probably want to parse the received web page to use a completely other design, and this will be the hard part.

LG

Hey Victor,

If your client supports ad-hoc commands then you can execute:

http://jabber.org/protocol/admin#get-online-users-num --> to GetNumberOnlineUsers

and

http://jabber.org/protocol/admin#get-active-users-num --> GetNumberActiveUsers (users that sent an available presence)

If you are going to use this solution then let me know so I can quickly create the “get number of users in the system” command.

I was saw ad-hoc commands.But I don’'t know how to use it.

I’'m using Miranda 0.5 +wildfire 3.01.

What shoule I do?

Hey buggub,

I don’'t think Miranda has support for ad-hoc commands. I know that Psi, Exodus and TKabber do have support. We will soon add support for ad-hoc commands to Smack so you will be able to use them from Spark.

Regards,

– Gato

Hi Gato,

I’‘ve given this a try with Psi and I’'m getting a bad-request in reply. Does this look correct to you?

  • Request* ***

<iq from="st0nkingbyte@domain.com/Psi" type=“get” id=“get-active-users-num-1” to=“domain.com” xml:lang=“en”>

<command xmlns=“http://jabber.org/protocol/commands” node=“http://jabber.org/protocol/admin#get-active-users-num” action=“execute”/>

</iq>

  • Reply* ***

<iq from=“domain.com” type=“error” to="st0nkingbyte@domain.com/Psi" id=“get-active-users-num-1” >

<command xmlns=“http://jabber.org/protocol/commands” node=“http://jabber.org/protocol/admin#get-active-users-num” action=“execute” />

<error type=“modify” code=“400” >

<bad-request xmlns=“urn:ietf:params:xml:ns:xmpp-stanzas”/>

</error>

</iq>

I patterning my request after the example found here:

http://www.jabber.org/jeps/jep-0133.html#get-active-users-num