GithubHelp home page GithubHelp logo

v-pap / linux-job-management-system Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 20 KB

Job management system for linux (and other UNIX-like Operating Systems).

License: MIT License

Makefile 2.43% C 94.95% Shell 2.62%

linux-job-management-system's Introduction

Linux Job Management System (jms)

This project is an implementation of a job management system for linux (and other UNIX-like Operating Systems).

Overview of the System

The jms consists of two different parts: the jms_coord and the jms_console.

  • The jms_coord is responsible for managing jobs (processes). jms_coord is not managing the jobs directly, but with the help of pools, that each one handles a maximum number of jobs. These pools are created dynamicaly as needed for serving all the submited jobs. When they have served their maximum number of jobs, they get removed, after they have reported their stats. The communication between the pools and the jms_coord is done via named pipes.
  • The jms_console handles all the input/output from/to the user for submitting and checking the status of various processes. This program communicates with the jms_coord via named pools.

overview of the system

About the jobs output

It should be noted that the job's outputs (stdout & stderr) are redirected to two files called

stdout_jobid stderr_jobid where jobid is the id of the job

These files will be located on a directory with a specific name:

sdi1400139_jobid_pid_date_time

  • jobid the id of the job
  • pid the linux pid of the job
  • date date in the from of YearMonthDate e.g. 20181005
  • time time in the form of Hours:Minutes:Seconds e.g. 17:50:02

Also a bash script is provided for better managing these dirs/files called jms_script.sh

Getting Started

The following steps are required in order to set up your enviroment and run the above programs.

Prerequisites

Apart from having a linux system with a gcc compiler there are no other requirements.

Installing

  1. Get a copy of the project
git clone https://github.com/v-pap/linux-job-management-system.git
  1. Go into the directory
cd linux-job-management-system
  1. Compile the project
make

Using the program(s)

In order to run the program(s) you will have to use one one of the following commands:

  1. jms_coord
./jms_coord -l <path> -n <jobs_pool> -w <jms_in> -r <jms_out>
  • path name of the directory where all the directories and files created during the usage of the jms_coord will be saved to
  • jobs_pool maximum number of jobs per pool
  • jms_in named pipe for reading data coming from the jms_console
  • jms_out named pipe for writing data to the jms_console
  1. jms_console
./jms_console -w <jms_in> -r <jms_out> -o <operations_file>
  • jms_in named pipe for reading data coming from the jms_coord
  • jms_out named pipe for writing data to the jms_coord
  • operations_file optional file which contains user commands (instead of using the stdin)
  1. jms_script.sh
./jms_script.sh -l <path> -c <command>
  • path name of the directory where all the directories and files created during the usage of the jms_coord were saved
  • command the name of the command to be used by the script (one of those below)
  1. list shows a list with all the directories that the jobs created
  2. size shows a list with all the directories that the jobs created, sorted by their size. Optionally the n can be specify the first n entries to be shown.
  3. purge deletes all the directories that the jobs created

List of available commands

The following commands can be run on jms_console after jms_coord has been initialized

  1. submit <job>
  • Submits a job to the jms

  • job a process to be run e.g. sleep 30

  1. status <JobID>
  • Returns the status of the job

  • JobID the id of the job

  1. status-all [time-duration]
  • Returns the status of all the jobs

  • time-duration optional argument for returning the status of jobs that are running for equal or less time than time_duration

  1. show-active
  • Returns the jobs that are still active
  1. show-pools
  • Returns the number of jobs for each pool
  1. show-finished
  • Returns the jobs that have finished
  1. suspend <JobID>
  • Suspends a job

  • JobID the id of the job

  1. resume <JobID>
  • Resumes a job

  • JobID the id of the job

  1. shutdown
  • Shuts down the whole system including the managed jobs

License

This project is licensed under the MIT License

linux-job-management-system's People

Contributors

v-pap avatar

Stargazers

Panayiotis Raptis avatar  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.