Skip to content

rondou/sysinfo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

System Information

Introduction

The main goal

Collect the system information from you specified.

Operation

This tool will collect data and show in the monitor according to the instructions. The instruction is a JSON file.

Development

Prerequisite

Optional

Setup

  1. Create a virtual environment using Python 3.5
pipenv --python 3.5
  1. Install all dependencies for the project (including dev):
pipenv install -e .

Usage

Installation

pip install git+git://github.com/rondou/sysinfo.git

or

pipenv install 'git+ssh://git@github.com/rondou/sysinfo.git#egg=sysinfo'

Execute the code

Here is script.json content the key __meta__ is a magic key.

{
    "load": {
        "__meta__": {
            "type": "shell",
            "cmd": "echo \"[$(uptime | awk '{print $10}')]\"",
            "rtype": "json",
            "concurrent": true
        }
    }
}

Run sysinfo and specify json file.

sysinfo -p etc/script.json | jq .

You will get the follow result.

{
    "load": [2.44]
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages