Projet

Général

Profil

Révision f77cbb87

IDf77cbb87074a0d05d05444c731676fd007873b1a
Parent 08346aac
Enfant 7de8f2ca

Ajouté par Mike Koss il y a presque 14 ans

Simpler nginx working set plugin. Replaces nginx_memory (which displays total of virtual memory)
and ngnix_memory (sic) which has a bug including non-nginx processes.

Voir les différences:

plugins/nginx/nginx_working_set
1
#!/bin/bash
2
#
3
# Munin plugin for monitoring Nginx working set
4
#
5
# ---
6

  
7
if [ "$1" == config ]; then
8
    cat <<'EOF'
9
graph_title NGINX Working Set
10
graph_vlabel WS Bytes
11
graph_category nginx
12
graph_args --base 1024
13
ws.label Working Set
14
EOF
15
    exit 0
16
fi
17

  
18
KBS=$(ps -o rss --no-heading -p $(pidof nginx))
19
total=0
20
for size in $KBS
21
do
22
    total=$(($total + $size * 1024))
23
done
24
echo ws.value $total

Formats disponibles : Unified diff