Git Product home page Git Product logo

systemkit's Introduction

SystemKit

An OS X system library in Swift based off of libtop, from Apple's top implementation.

  • For an example usage of this library, see dshb, an OS X system monitor in Swift
  • For other system related statistics in Swift for OS X, see SMCKit

Requirements

Installation

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate SystemKit into your Xcode project using Carhage, specify it in your Cartfile:

github "beltex/SystemKit"

Run carthage update to build the framework and drag the built SystemKit.framework into your Xcode project. Don't forget to alter your Carthage building phase for OS X.

Example

Sample ouput from example.

// MACHINE STATUS

-- CPU --
  PHYSICAL CORES:  2
  LOGICAL CORES:   2
  SYSTEM:          10%
  USER:            17%
  IDLE:            71%
  NICE:            0%

-- MEMORY --
  PHYSICAL SIZE:   7.75GB
  FREE:            1.33GB
  WIRED:           866MB
  ACTIVE:          5.04GB
  INACTIVE:        516MB
  COMPRESSED:      0MB

-- SYSTEM --
  MODEL:           MacBookPro7,1
  SYSNAME:         Darwin
  NODENAME:        beltex.local
  RELEASE:         13.4.0
  VERSION:         Darwin Kernel Version 13.4.0: Sun Aug 17 19:50:11 PDT 2014...
  MACHINE:         x86_64
  UPTIME:          6d 21h 4m 38s
  PROCESSES:       197
  THREADS:         967
  LOAD AVERAGE:    [3.18, 3.89, 3.99]
  MACH FACTOR:     [0.436, 0.385, 0.322]

-- POWER --
  CPU SPEED LIMIT: 100.0%
  CPUs AVAILABLE:  2
  SCHEDULER LIMIT: 100.0%
  THERMAL LEVEL:   Not Published

-- BATTERY --
  AC POWERED:      true
  CHARGED:         true
  CHARGING:        false
  CHARGE:          100.0%
  CAPACITY:        1675 mAh
  MAX CAPACITY:    1675 mAh
  DESGIN CAPACITY: 5450 mAh
  CYCLES:          646
  MAX CYCLES:      1000
  TEMPERATURE:     30.0°C
  TIME REMAINING:  0:45

References

License

This project is under the MIT License.

systemkit's People

Contributors

beltex avatar stansidel avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.