1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

Add "process links" graph to ejabberd_resources

This commit is contained in:
Artem Sheremet 2015-08-19 17:55:00 +02:00
parent 69534a70d0
commit 99a42cafd6

View file

@ -1,7 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# ejabberd_resources_ revision 4 (Mar 2015)
#
# Tested with ejabberd 2.1.x # Tested with ejabberd 2.1.x
# #
# This plugin is capable to show: # This plugin is capable to show:
@ -206,6 +204,20 @@ function ejabberd_report_mnesia_recs() {
ejabberd_report_mnesia "$1" recs ejabberd_report_mnesia "$1" recs
} }
function ejabberd_report_process_links() {
ejabberd_exec "
lists:filtermap(
fun(Name) ->
case whereis(Name) of
Pid when is_pid(Pid) ->
{links, Links} = erlang:process_info(Pid, links),
{true, {Name, length(Links)}};
_ ->
false
end,
registered())"
}
function open_files_counter_util() { function open_files_counter_util() {
if hash lsof &>/dev/null; then if hash lsof &>/dev/null; then
echo lsof echo lsof
@ -281,6 +293,7 @@ case $1 in
memory memory
processes processes
ports ports
process_links
online_users online_users
registered_users registered_users
mnesia_recs mnesia_recs