Sha256: 80f2513154ca78b6fc97bfc546b6300e203de9238a9f912ca6122c2630a9216c
Contents?: true
Size: 1.02 KB
Versions: 6
Compression:
Stored size: 1.02 KB
Contents
#!/bin/sh #%# family=auto #%# capabilities=autoconf case "$1" in autoconf|detect) if [ -z "${pid_file}" ]; then echo "no (PID file isn't specified by env.pid_file)" exit 1 elif [ -f "${pid_file}" ]; then echo "yes" exit 0 else echo "no (PID file doesn't exist: ${pid_file})" exit 1 fi ;; config) if [ -z "${label}" ]; then title="groonga: memory usage" else title="groonga: ${label}: memory usage" fi cat <<EOF graph_title ${title} graph_vlabel memory usage graph_category groonga graph_info groonga memory usage rss.label resident set size rss.type GAUGE vsz.label virtual memory size vsz.type GAUGE EOF exit 0 ;; *) esac if [ -z "${pid_file}" ]; then echo "PID file isn't specified by env.pid_file" exit 1 fi groonga_pid=$(cat ${pid_file}) read rss_in_kb vsz_in_kb <<EOC $(ps h -o rss,vsz -p ${groonga_pid}) EOC echo "rss.value ${rss_in_kb}000" echo "vsz.value ${vsz_in_kb}000"
Version data entries
6 entries across 6 versions & 1 rubygems