All Projects → crystal-community → hardware

crystal-community / hardware

Licence: ISC license
Get CPU, Memory and Network informations of the running OS and its processes

Programming Languages

crystal
512 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to hardware

Iglance
Free system monitor for OSX and macOS. See all system information at a glance in the menu bar.
Stars: ✭ 1,358 (+1840%)
Mutual labels:  cpu, system, hardware, memory
Sympact
🔥 Stupid Simple CPU/MEM "Profiler" for your JS code.
Stars: ✭ 439 (+527.14%)
Mutual labels:  cpu, system, memory
Heim
Cross-platform async library for system information fetching 🦀
Stars: ✭ 572 (+717.14%)
Mutual labels:  cpu, system, memory
Xfce4 Genmon Scripts
🐭 XFCE panel generic monitor scripts
Stars: ✭ 69 (-1.43%)
Mutual labels:  cpu, memory
Walle
iOS Application performance monitoring
Stars: ✭ 19 (-72.86%)
Mutual labels:  cpu, memory
Tenyr
Simple, orthogonal 32-bit computer architecture and environment
Stars: ✭ 24 (-65.71%)
Mutual labels:  cpu, hardware
Server Stats
Statsy is a easy to use open source PHP tool for developers, that allows you to return various types of information about your server.
Stars: ✭ 101 (+44.29%)
Mutual labels:  cpu, memory
Neorv32
A small and customizable full-scale 32-bit RISC-V soft-core CPU and SoC written in platform-independent VHDL.
Stars: ✭ 106 (+51.43%)
Mutual labels:  cpu, hardware
Easydeviceinfo
📱 [Android Library] Get device information in a super easy way.
Stars: ✭ 1,698 (+2325.71%)
Mutual labels:  cpu, memory
human-computer
A computer that uses nothing but human resources
Stars: ✭ 16 (-77.14%)
Mutual labels:  cpu, hardware
Sysstat
Performance monitoring tools for Linux
Stars: ✭ 2,055 (+2835.71%)
Mutual labels:  cpu, memory
Wgcloud
linux运维监控工具,支持系统信息,内存,cpu,温度,磁盘空间及IO,硬盘smart,系统负载,网络流量等监控,API接口,大屏展示,拓扑图,进程监控,端口监控,docker监控,文件防篡改,日志监控,数据可视化,web ssh,堡垒机,指令下发批量执行,linux面板,探针,故障告警
Stars: ✭ 2,669 (+3712.86%)
Mutual labels:  cpu, memory
Detoxinstruments
Detox Instruments is a performance–analysis and testing framework, designed to help developers profile their mobile apps in order to better understand and optimize their app's behavior and performance.
Stars: ✭ 513 (+632.86%)
Mutual labels:  cpu, memory
Rainbarf
it's like Rainmeter, but for CLI!
Stars: ✭ 1,087 (+1452.86%)
Mutual labels:  cpu, memory
React Adaptive Hooks
Deliver experiences best suited to a user's device and network constraints
Stars: ✭ 4,750 (+6685.71%)
Mutual labels:  cpu, memory
Pubg mobile memory hacking examples
Pubg Mobile Emulator Gameloop Memory Hacking C++ code examples. Ex: Name, Coord, Bones, Weapons, Items, Box, Drop etc.
Stars: ✭ 224 (+220%)
Mutual labels:  cpu, memory
Arch
极客时间专栏《许式伟的架构课》相关的源代码:冯诺伊曼结构
Stars: ✭ 335 (+378.57%)
Mutual labels:  cpu, memory
Pidusage
Cross-platform process cpu % and memory usage of a PID
Stars: ✭ 364 (+420%)
Mutual labels:  cpu, memory
Touch Bar Istats
Show CPU/GPU/MEM temperature on Touch Bar with BetterTouchTool!
Stars: ✭ 141 (+101.43%)
Mutual labels:  cpu, memory
Ios Monitor Platform
📚 iOS 性能监控 SDK —— Wedjat(华狄特)开发过程的调研和整理
Stars: ✭ 2,316 (+3208.57%)
Mutual labels:  cpu, memory

hardware

GitHub release Build Status

A basic module to get CPU, memory and network informations of the current running OS and its processes.

Tested on Linux.

Installation

Add this to your application's shard.yml:

dependencies:
  hardware:
    github: crystal-community/hardware

Documentation

The documentation is accessible at https://crystal-community.github.io/hardware.

It is generated with crystal docs in the gh-pages branch.

Examples

require "hardware"

memory = Hardware::Memory.new
memory.used         #=> 2731404
memory.percent.to_i #=> 32

cpu = Hardware::CPU.new
pid_stat = Hardware::PID.new.stat            # Default is Process.pid
app_stat = Hardware::PID.new("firefox").stat # Take the first matching PID

loop do
  sleep 1
  p cpu.usage!.to_i          #=> 17
  p pid_stat.cpu_usage!      #=> 1.5
  p app_stat.cpu_usage!.to_i #=> 4
end

Development

Docker

You can run the specs in a Docker container:

$ docker-compose up
$ docker-compose run spec

Contributing

  1. Fork it ( https://github.com/crystal-community/hardware/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].