Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

server_metrics

Package Overview
Dependencies
Maintainers
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

server_metrics

  • 1.2.18
  • Rubygems
  • Socket score

Version published
Maintainers
3
Created
Source

SystemMetrics

Collects key metrics on CPU, disks, memory, network interfaces, and processes.

Use

$ gem install server_metrics

require 'server_metrics'
cpu=ServerMetrics::Cpu.new
cpu.run
pp cpu.data.inspect

# same with:

ServerMetrics::Disk.new
ServerMetrics::Memory.new
ServerMetrics::Network.new

# also see:

ServerMetrics::SystemInfo.to_hash

Creating a new collector

Inherit from either Collector (if you're generating just one set of data), or MultiCollector (if you will be generating N sets of data -- for example if you're monitoring disks or network interfaces).

TODOs

  • better mac compatibility
  • more test coverage
  • rethink module hierarchy

FAQs

Package last updated on 05 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc