Merge pull request #66 from hamano/fix_mod_admin_extra_stats
fix mod_admin_extra stats command
This commit is contained in:
commit
b7a7d9ae16
|
@ -1425,14 +1425,14 @@ privacy_set(Username, Host, QueryS) ->
|
||||||
stats(Name) ->
|
stats(Name) ->
|
||||||
case Name of
|
case Name of
|
||||||
<<"uptimeseconds">> -> trunc(element(1, erlang:statistics(wall_clock))/1000);
|
<<"uptimeseconds">> -> trunc(element(1, erlang:statistics(wall_clock))/1000);
|
||||||
<<"registeredusers">> -> length(ejabberd_auth:dirty_get_registered_users());
|
<<"registeredusers">> -> lists:foldl(fun(Host, Sum) -> ejabberd_auth:get_vh_registered_users_number(Host) + Sum end, 0, ?MYHOSTS);
|
||||||
<<"onlineusersnode">> -> length(ejabberd_sm:dirty_get_my_sessions_list());
|
<<"onlineusersnode">> -> length(ejabberd_sm:dirty_get_my_sessions_list());
|
||||||
<<"onlineusers">> -> length(ejabberd_sm:dirty_get_sessions_list())
|
<<"onlineusers">> -> length(ejabberd_sm:dirty_get_sessions_list())
|
||||||
end.
|
end.
|
||||||
|
|
||||||
stats(Name, Host) ->
|
stats(Name, Host) ->
|
||||||
case Name of
|
case Name of
|
||||||
<<"registeredusers">> -> length(ejabberd_auth:get_vh_registered_users(Host));
|
<<"registeredusers">> -> ejabberd_auth:get_vh_registered_users_number(Host);
|
||||||
<<"onlineusers">> -> length(ejabberd_sm:get_vh_session_list(Host))
|
<<"onlineusers">> -> length(ejabberd_sm:get_vh_session_list(Host))
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue