     ]
   print ""
   stats
+
+get_cpu_usage = ->
+  cpus = os.cpus()
+  used = 0
+  total = 0
+
+  for i of cpus
+    cpu = cpus[i]
+    for type of cpu.times
+      total += cpu.times[type]
+      if type != 'idle'
+        used += cpu.times[type]
+
+  Math.floor 100 * used / total
 
 # Pushes stats to Librato
 push = (stats) ->

      load1,
      load5,
      load15,
      # Memory
      memory_used,
      # Users

    name: 'load'
    source: '15:' + node_id
    value: loadavg[2]

  # CPU usage
  cpu_usage = get_cpu_usage()
  print "CPU usage: " + cpu_usage
  cpu_total =
    name: 'cpu'
    source: node_id
    value: cpu_usage

  # Available memory
  mem_total = os.totalmem() / (1024 * 1024)
