Coder Social home page Coder Social logo

pilino1234 / resman Goto Github PK

View Code? Open in Web Editor NEW

This project forked from j4cobgarby/resman

0.0 0.0 0.0 36 KB

A simple resource manager for helping people to not accidentally run experiments at the same time.

License: MIT License

Shell 3.18% Python 96.82%

resman's Introduction

resman

A simple system resource reservation manager.

Usage:

resman [-h] [-d DURATION] [-x [COMMAND ...]] [-r [REASON ...]] [-R] [-c] [-u USER]

A simple system resource allocation program. Persistent state stored in /etc/res_lock. This program does not impose any actual lock on system resource usage; it only keeps track of which user (if any) has laid claim to it for the time being, and if applicable how long they have it reserved for. The purpose of this is to prevent two people accidentally running experiments at the same time.

Options:

Flag(s) Description
-h, --help Show this help message and exit
-d DURATION, --duration DURATION How long to reserve server use for (e.g. 1h30m, 25m, 4h)
-x [COMMAND ...], --run [COMMAND ...] Reserve the server until COMMAND finishes. quotes (') are needed around COMMAND if it contains '-'s, otherwise they're optional.
-r [REASON ...], --reason [REASON ...] What experiment are you running? Default is blank. Completely optional.
-c, --confirm Interactively tell the user the current status of things. If the server is reserved, they are prompted to press enter to confirm they understand this.
-u USER, --user USER Who is using the server during the reservation? Default is your username.

Can also be run with no arguments, to check status. Exits with 0 if not reserved, or 1 if currently reserved. Just echo $? afterwards.

Development

Install development dependencies inside a virtual environment:

$ python3 -m venv venv
$ source venv/bin/activate

(venv)$ pip install -e .[dev] 
(venv)$ pre-commit install

resman's People

Contributors

j4cobgarby avatar pilino1234 avatar kvgeijer 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.