Sylvain Roberdeau wrote:

HI,

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

Sylvain

Add this in users.c in js_users_gs after ghash_walk.
si->stats_file can be configured in jsm.c or you may set it constant.

   if (si->stats_file) {
     FILE *plik;
     plik = fopen(si->stats_file, "w");
     if (plik) {
       fprintf(plik, "%d\r\n", js__usercount);
       fclose(plik);
     }
     else {
       log_debug(ZONE,"Error opening log file");
     }
   }



_______________________________________________
jdev mailing list
[EMAIL PROTECTED]
http://mailman.jabber.org/listinfo/jdev

Reply via email to