Skip to content

daddygongon/tiny_ge

Repository files navigation

tiny_ge

tiny_ge is a tiny grid engine like SGE.

Usage

outline

tiny_ge has a similar interface with SGE.

> tge --help

qsub [shell]        # submit shell job
qstat               # show queue status
qdel [pid]          # delete job
qfinish [pid]       # finish forcely

qsub

When you ‘qsub [SHELL].sh’, SHELL.s[qid] will be made.

> qsub lamda_025.sh
> cat lamda_025.s64
#!/bin/sh
while ! qsub 64; do
  sleep 10
  done

  sh /home/lamda_025.sh

  qfinish 64

The job is queued on ~/.tge_test_jobs.txt as YAML format.

qstat

qstat shows the status like ‘waiting’.

> qstat
   60:   883:   finished: /home/lamda_025.sh
   61:  2380:    deleted: /home/lamda_025.sh
   62:  3799:   finished: /home/lamda_025.sh
   63: 26944:    running: /home/lamda_025.sh
   64:  6871:    waiting: /home/lamda_025.sh

You may write the job in lambda_025.sh, then the queue system waits the finish of previous job and will run the waiting job.

qdel

‘qdel [queue ID]’ delete quese id and child processes recursively, and change the status from ‘running’ or ‘waiting’ to ‘deleted’.

> qdel 61
0  1000  2380     1  20   0  10872  2964 -      S    pts/1      0:00 sh ./lamda_025.s61
0  1000  2408  2380  20   0  11004  3188 -      S    pts/1      0:00 sh /home/.../lamda_025.sh
0  1000  2885  2855  20   0  10872  3060 -      S+   pts/0      0:00 sh -c ps -xal |grep 2380
0  1000  2890  2885  20   0  10284   984 -      S+   pts/0      0:00 grep 2380
[2380]
[2380, 2408, 2445, 2473, 2477, 2482, 2483, 2484, 2485, 2486, 2487, 2488, 2489]
"kill -9 2380"
"kill -9 2408"
"kill -9 2445"
"kill -9 2473"
"kill -9 2477"
"kill -9 2482"
"kill -9 2483"
"kill -9 2484"
"kill -9 2485"
"kill -9 2486"
"kill -9 2487"
"kill -9 2488"
"kill -9 2489"
qid 61 is deleted from the qeueu.

About

tiny_ge is a tiny queue system like SGE

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published