Skip to content

Instantly share code, notes, and snippets.

@darron
darron / apache-memory-pid-stats.rb
Last active October 14, 2016 23:38
Combine RSS memory usage and Apache 2 /server-status for heatmap with Datadog.
require 'rubygems'
require 'nokogiri'
require 'open-uri'
require 'pp'
require 'statsd'
statsd = Statsd.new
def get_memory_usage
memory_usage = {}