mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-22 17:28:25 +01:00
Use homogeneous s2s connections stats (#761)
This commit is contained in:
parent
8a2fa62cac
commit
c62bd0c911
@ -1478,10 +1478,8 @@ get_stats(global, Lang) ->
|
|||||||
+ Total
|
+ Total
|
||||||
end,
|
end,
|
||||||
0, ?MYHOSTS),
|
0, ?MYHOSTS),
|
||||||
S2SConns = ejabberd_s2s:dirty_get_connections(),
|
OutS2SNumber = ejabberd_s2s:outgoing_s2s_number(),
|
||||||
S2SConnections = length(S2SConns),
|
InS2SNumber = ejabberd_s2s:incoming_s2s_number(),
|
||||||
S2SServers = length(lists:usort([element(2, C)
|
|
||||||
|| C <- S2SConns])),
|
|
||||||
[?XAE(<<"table">>, [],
|
[?XAE(<<"table">>, [],
|
||||||
[?XE(<<"tbody">>,
|
[?XE(<<"tbody">>,
|
||||||
[?XE(<<"tr">>,
|
[?XE(<<"tr">>,
|
||||||
@ -1492,10 +1490,10 @@ get_stats(global, Lang) ->
|
|||||||
?XC(<<"td">>, (pretty_string_int(OnlineUsers)))]),
|
?XC(<<"td">>, (pretty_string_int(OnlineUsers)))]),
|
||||||
?XE(<<"tr">>,
|
?XE(<<"tr">>,
|
||||||
[?XCT(<<"td">>, <<"Outgoing s2s Connections:">>),
|
[?XCT(<<"td">>, <<"Outgoing s2s Connections:">>),
|
||||||
?XC(<<"td">>, (pretty_string_int(S2SConnections)))]),
|
?XC(<<"td">>, (pretty_string_int(OutS2SNumber)))]),
|
||||||
?XE(<<"tr">>,
|
?XE(<<"tr">>,
|
||||||
[?XCT(<<"td">>, <<"Outgoing s2s Servers:">>),
|
[?XCT(<<"td">>, <<"Incoming s2s Connections:">>),
|
||||||
?XC(<<"td">>, (pretty_string_int(S2SServers)))])])])];
|
?XC(<<"td">>, (pretty_string_int(InS2SNumber)))])])])];
|
||||||
get_stats(Host, Lang) ->
|
get_stats(Host, Lang) ->
|
||||||
OnlineUsers =
|
OnlineUsers =
|
||||||
length(ejabberd_sm:get_vh_session_list(Host)),
|
length(ejabberd_sm:get_vh_session_list(Host)),
|
||||||
|
Loading…
Reference in New Issue
Block a user