GithubHelp home page GithubHelp logo

utbm-utiltoolsforsysadmins's Introduction

Adminsys utils

Usage

usage: sysadmin.sh [-a | -i | -s <service_name>] [-c] [-l <limit>] [-h]

Options (only choose one):
  -s / --service <service_name>   Permet to check a service existance, and / or
                                  configure it
  -i / --info                     Show some global system stats
  -a / --all                      Show all services, and their characteristics

Other options:
  -c / --cpu-monitoring           Launch the CPU monitoring daemon
  -l / --cpu-limit <limit>        Set the CPU limit for warn of load (1-99). Set
                                  this setting enable cpu monitoring
  -h / --help                     Display this message

Explanations

This is the sample of the school project we need to do to simpligy adminsys life.

Bash scripts are in the scripts folder, and the two files availables are :

  • sysadmin.sh : permet to check the system or a specific program, and install it if needed
  • cpuwarning.sh : permet to launch a process that warn if the cpu usage is too high

Those two files need to be in the same directory, and you only need to launch the sysadmin.sh script.

CPU warning instance is launched using the command screen with the name cpuwarning. To reattach to the tab, just do :

screen -r cpuwarning

(To quit without destroying the session, press CTRL-A then CTRL-D)

Those scripts were tested only on Ubuntu 16.04

Default text editor for configurations files is vim, you can set-up another (such nano) by setting-up an environment variable called EDITOR like in this example :

EDITOR=nano ./sysadmin.sh -s apache2

If you set another file editor, you need it to be able to edit multiple files simultaneously

Vagrant

A Vagrantfile for Vagrant is available to simplify test of this script (for Virtualbox provider).

To use Vagrant, just type the following in a terminal :

# Create the VM and / or launch it
vagrant up

# Connect to the VM with ssh
vagrant ssh

Scripts folder is available in default user home : /home/vagrant/scripts

utbm-utiltoolsforsysadmins's People

Contributors

transrian 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.