{"id":18152431,"url":"https://github.com/chanioxaris/job-manager","last_synced_at":"2025-04-07T00:31:30.245Z","repository":{"id":144416668,"uuid":"96716545","full_name":"chanioxaris/job-manager","owner":"chanioxaris","description":"Job manager for UNIX systems","archived":false,"fork":false,"pushed_at":"2019-03-25T14:55:07.000Z","size":95,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-13T06:17:24.680Z","etag":null,"topics":["custom-signal-handler","jobs","named-pipes","pool","process-manager","processes","sigterm-signal","unix","zombie-processes"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chanioxaris.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-09T23:04:46.000Z","updated_at":"2019-03-25T15:26:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"4b54d5c2-e866-4490-a104-4d4da714aab1","html_url":"https://github.com/chanioxaris/job-manager","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chanioxaris%2Fjob-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chanioxaris%2Fjob-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chanioxaris%2Fjob-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chanioxaris%2Fjob-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chanioxaris","download_url":"https://codeload.github.com/chanioxaris/job-manager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247574088,"owners_count":20960495,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["custom-signal-handler","jobs","named-pipes","pool","process-manager","processes","sigterm-signal","unix","zombie-processes"],"created_at":"2024-11-02T02:07:14.542Z","updated_at":"2025-04-07T00:31:30.223Z","avatar_url":"https://github.com/chanioxaris.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Overview\n\nA job management system implemented for unix systems. A coordinator handles the jobs submitted from user, using job pools. Each pool can handle up to a number of jobs, defined as a command line parameter. \n\u003cbr /\u003e\nEach job redirects his standard output and standard error to two different files, which are stored under a directory named after the string that includes the Job ID, Process pid, Date and Time. Also, a custom signal handler implemented to ensure a smooth shutdown of the application. More details included below.\n\n\u003cbr /\u003e\nThe below image describes the structure of the application.\n\u003cbr /\u003e\n\n![Jms](https://github.com/chanioxaris/job-manager/blob/master/img/jms.png)\n\n\n\n### Console\n\nThe console is the user interface and handles the communication him and the coordinator using a pair of two [named pipes](https://en.wikipedia.org/wiki/Named_pipe). Also prints the results of operation submitted from user, to inform about the status of pools and jobs.\n\n### Coord\n\nThe coordinator creates and handles the operation of pools and jobs. The communication with pools, are been established using a pair of [named pipes](https://en.wikipedia.org/wiki/Named_pipe) for each pool process. Pools are created dynamically, so it can handle any number of submitted jobs.\n\n \n### Custom signal handler\n\nA custom signal handler implemented using [sigaction](https://en.wikipedia.org/wiki/Sigaction), to catch and manage the [SIGTERM signal](https://en.wikipedia.org/wiki/Signal_(IPC)). It is highly recommended to use a custom signal handler, so there are no [zombie processes](https://en.wikipedia.org/wiki/Zombie_process) remaining after the shutdown of the application. If a pool receives a [SIGTERM signal](https://en.wikipedia.org/wiki/Signal_(IPC)), then redirects it to any active or suspended processes, waits for all of them to exit and then terminates his operation. All other signals are ignored and the default operation takes place.\n\n\n\n## Interface description\n\nA user can perform the following operations:\n- #### submit [Job]\nSubmit a new job (e.g \"ls -l\", \"pwd\", \"sleep 100\", \"cat\" etc.).\n- #### status [Job ID]\nPrint the status of job with requested ID.\n- #### status-all\nPrint the status (active, suspended, finished) of every job.\n- #### show-active\nPrint the active job's IDs.\n- #### show-pools\nPrint the active pool linux pids, followed by the number of active jobs by pool.\n- #### show-finished\nPrint the finished job's IDs.\n- #### suspend [Job ID]\nSuspend the execution of job with requested ID.\n- #### resume [Job ID]\nResume the execution of job with requested ID.\n- #### shutdown\nTerminate the service and free the memory.\n\n\n## Compile\n\n`./makefile`\n\n## Usage\n\n`./jms_coord -l [directory name] -n [jobs per pool] -w [fifo name (out)] -r [fifo name (in)]`\n\n`./jms_console  -w [fifo name (in)] -r [fifo name (out)]`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchanioxaris%2Fjob-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchanioxaris%2Fjob-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchanioxaris%2Fjob-manager/lists"}