1
0
mirror of https://github.com/librenms/librenms-agent.git synced 2024-05-09 09:54:52 +00:00
Files
librenms-librenms-agent/snmp/voipmon-stats.sh
2021-03-18 20:07:25 +01:00

14 lines
356 B
Bash

#!/bin/bash
# Author: Sharad Kumar <skumar@securevoip.io>
used_memory=$(ps -C voipmonitor -o rsz | awk 'FNR==2 {print}')
cpu_load=$(ps -C voipmonitor -o %cpu | awk 'FNR==2 {print}')
pid=$(pidof voipmonitor)
total_files=$(find /proc/"${pid}"/fd | wc -l)
echo "Used Memory=""$used_memory"
echo "CPU Load=""$cpu_load"
echo "Open files=""$total_files"
exit