diff --git a/nginx_memory b/nginx_memory index 0e99df9..14f686a 100755 --- a/nginx_memory +++ b/nginx_memory @@ -82,15 +82,6 @@ if (exists $ARGV[0] and $ARGV[0] eq "config") { exit 0; } else { - ## Get the current OS name. - my $osname = $^O; - - if ($osname eq 'freebsd') { # FreeBSD - my $pid_nginx = "pgrep -d ' ' nginx"; - } else { # Linux - my $pid_nginx = "pidof nginx"; - } - my $m = `ps u -p \$(pgrep -d ' ' nginx) | awk 'NR > 1 {nm += \$5} END {print nm*1024}'`; print "ram.value $m";