GithubHelp home page GithubHelp logo

dizhaung / go-sysinfo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from elastic/go-sysinfo

0.0 1.0 0.0 394 KB

go-sysinfo is a library for collecting system information.

License: Apache License 2.0

Go 97.59% Makefile 1.01% Ruby 1.39%

go-sysinfo's Introduction

go-sysinfo

Build Status Go Documentation

go-sysinfo is a library for collecting system information. This includes information about the host machine and processes running on the host.

The available features vary based on what has been implemented by the "provider" for the operating system. At runtime you check to see if additional interfaces are implemented by the returned Host or Process. For example:

process, err := sysinfo.Self()
if err != nil {
	return err
}

if handleCounter, ok := process.(types.OpenHandleCounter); ok {
	count, err := handleCounter.OpenHandleCount()
	if err != nil {
		return err
	}
	log.Printf("%d open handles", count)
}

These tables show what methods are implemented as well as the extra interfaces that are implemented.

Host Features Darwin Linux Windows
Info() x x x
Memory() x x x
CPUTimer x x x
VMStat x
Process Features Darwin Linux Windows
Info() x x x
Memory() x x x
User() x x x
Parent() x x x
CPUTimer x x x
Environment x x
OpenHandleEnumerator x
OpenHandleCounter x
Seccomp x
Capabilities x

go-sysinfo's People

Contributors

andrewkroh avatar axw avatar adriansr avatar fearful-symmetry avatar mikemadden42 avatar marclop avatar ruflin avatar kvch avatar ph avatar tsg avatar vjsamuel avatar strawgate avatar mmta avatar

Watchers

James Cloos 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.