GithubHelp home page GithubHelp logo

gl-camp-python's Introduction

This repository includes python script that based on python 3.8.5

The docker image of the script you can find below

The python script collects and prints CPU or Memory information about Linux OS to console.

The script accepts a single parameter cpu or mem and outputs relevant metrics

Requirements

  • python3
  • pip
  • psutil
  • loguru

Usage

  1. Clone repo [email protected]:moonchildua/gl-camp-python.git
  2. Make executable chmod +x python3-package.sh
  3. /python3-package.sh
  4. python3 metrics.py mem(or cpu)

Examples:

$ python3 metrics.py cpu
system.cpu.idle 26024.38
system.cpu.user 14430.91
system.cpu.guest 0.0
system.cpu.iowait 83.7
system.cpu.stolen 0.0
system.cpu.system 4277.

$ python3 metrics.py mem
virtual total 33569067008
virtual used 8036671488
virtual free 2804436992
virtual shared 1528705024
swap total 1023406080
swap used 0
swap free 1023406080

Docker

Please install docker before run script in container.

Docker image you can find follow the link

Usage

Passing command to the container for execution You can pass the command to the container from the command line:

docker run -t --rm moonchild/gl-camp-python:tagname cpu
docker run -t --rm moonchild/gl-camp-python:tagname mem

gl-camp-python's People

Contributors

moonchildua avatar

Watchers

 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.