Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

added reporting of memory info #1

Merged
merged 1 commit into from

2 participants

@rodnaph

No description provided.

@suguru suguru merged commit 285f2f4 into ameba-proteus:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 25, 2014
  1. @rodnaph

    added reporting of memory info

    rodnaph authored
This page is out of date. Refresh to see the latest.
Showing with 10 additions and 1 deletion.
  1. +10 −1 watcher.js
View
11 watcher.js
@@ -51,7 +51,7 @@ Watcher.prototype = {
retrieve: function() {
var self = this;
- nodestat.get('stat', 'load', 'net', 'disk', function(err, data) {
+ nodestat.get('mem', 'stat', 'load', 'net', 'disk', function(err, data) {
// skip first time
if (self.firstTime) {
@@ -77,6 +77,8 @@ Watcher.prototype = {
// disk
var disk = data.disk;
var name, value;
+ // mem
+ var mem = data.mem;
// send cpu stats
client.gauge('cpu.user', cpu.user);
@@ -88,6 +90,13 @@ Watcher.prototype = {
client.gauge('cpu.softirq', cpu.softirq);
client.gauge('cpu.steal', cpu.steal);
+ // send mem stats
+ client.gauge('mem.used', mem.used);
+ client.gauge('mem.total', mem.total);
+ client.gauge('mem.free', mem.free);
+ client.gauge('mem.buffer', mem.buffer);
+ client.gauge('mem.cached', mem.cached);
+
// send process
client.gauge('process.running', proc.running);
client.gauge('process.blocked', proc.blocked);
Something went wrong with that request. Please try again.