qtools 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +10 -1
- data/bin/qundo +22 -0
- data/lib/qtools.rb +4 -1
- data/lib/qtools/version.rb +1 -1
- data/qtools.gemspec +2 -2
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff64b4d0551d64bc0271ada2001d0d293cb70b0c
|
4
|
+
data.tar.gz: 295eb6942865985a0cbeac0d1756fec46329eb33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cbb6bb21edf9c6becead7fe74ad01df9288e6fa6c72208238181ff405510d30f2585a25e271c7821a6d0432ff4f31e452ee12259801866e49bad9ef375b81f5b
|
7
|
+
data.tar.gz: 8507473670fcb4405637c42da0656537711b019130c42f83436fc62ec705beddc3394f5cd89c33015a6a9694a56e77b4469ad84ec47615cb42918005af7c61c0
|
data/README.md
CHANGED
@@ -15,7 +15,8 @@ Install `qtools` using `gem`:
|
|
15
15
|
- `qclean` to remove `.e[0-9]*` and `.o[0-9]*` files in the current directory
|
16
16
|
- `qwatch` to see the running jobs for the current user
|
17
17
|
- `qcount` to see the number of running jobs for the current user
|
18
|
-
- `qnode` to
|
18
|
+
- `qnode` to list the free nodes
|
19
|
+
- `qundo` to stop the last submitted job for the current user
|
19
20
|
|
20
21
|
### qqsub
|
21
22
|
|
@@ -61,6 +62,14 @@ Usage:
|
|
61
62
|
|
62
63
|
The command above will print the list of free nodes sorted by their `LOAD`. Use `qnode -m` to sort the list of free nodes by memory available and `qnode -c` to sort the list by the number of free cores.
|
63
64
|
|
65
|
+
### qundo
|
66
|
+
|
67
|
+
Usage:
|
68
|
+
|
69
|
+
$ qundo
|
70
|
+
|
71
|
+
The command above will try to run `qdel` for the last job submitted.
|
72
|
+
|
64
73
|
## Contributing
|
65
74
|
|
66
75
|
Bug reports and pull requests are welcome on [GitHub](https://github.com/kerkomen/qtools).
|
data/bin/qundo
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'qtools'
|
4
|
+
|
5
|
+
last_job = `qstat -u $USER | tail -n 1`
|
6
|
+
last_job_id = `qstat -u $USER | tail -n 1 | sed -rn 's/(^[0-9]*).*/\1/p'`
|
7
|
+
|
8
|
+
unless last_job.empty?
|
9
|
+
puts "-- The following job will be stopped:"
|
10
|
+
puts last_job
|
11
|
+
puts "-- Continue? [y/n]"
|
12
|
+
|
13
|
+
answer = gets.strip.downcase
|
14
|
+
if answer == 'y' or answer == 'yes'
|
15
|
+
`qdel #{last_job_id}`
|
16
|
+
puts "-- Ok, master. The job #{last_job_id} was stopped."
|
17
|
+
else
|
18
|
+
puts "-- Ok, master. No means no."
|
19
|
+
end
|
20
|
+
else
|
21
|
+
puts "-- No jobs of yours are currently running."
|
22
|
+
end
|
data/lib/qtools.rb
CHANGED
@@ -4,8 +4,11 @@ help_string = <<-HELP
|
|
4
4
|
|
5
5
|
-- qtools:
|
6
6
|
- qqsub to submit a script or a compiled executable
|
7
|
-
- qwatch to see the running jobs for the current user
|
8
7
|
- qclean to remove .e* and .o* run files in the current directory
|
8
|
+
- qwatch to see the running jobs for the current user
|
9
|
+
- qcount to see the number of running jobs for the current user
|
10
|
+
- qnode to list the free nodes
|
11
|
+
- qundo to stop the last job for the current user
|
9
12
|
|
10
13
|
HELP
|
11
14
|
|
data/lib/qtools/version.rb
CHANGED
data/qtools.gemspec
CHANGED
@@ -23,9 +23,9 @@ Gem::Specification.new do |spec|
|
|
23
23
|
end
|
24
24
|
|
25
25
|
# spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
26
|
-
spec.files = %w{ .gitignore .travis.yml Gemfile LICENSE.txt README.md Rakefile bin/console bin/qclean bin/qqsub bin/qwatch bin/qcount bin/qnode bin/setup lib/qtools.rb lib/qtools/version.rb qtools.gemspec}
|
26
|
+
spec.files = %w{ .gitignore .travis.yml Gemfile LICENSE.txt README.md Rakefile bin/console bin/qclean bin/qqsub bin/qwatch bin/qcount bin/qnode bin/qundo bin/setup lib/qtools.rb lib/qtools/version.rb qtools.gemspec}
|
27
27
|
spec.bindir = "bin"
|
28
|
-
spec.executables = ["qwatch", "qclean", "qqsub", "qcount", "qnode"]
|
28
|
+
spec.executables = ["qwatch", "qclean", "qqsub", "qcount", "qnode", "qundo"]
|
29
29
|
spec.require_paths = ["lib"]
|
30
30
|
|
31
31
|
spec.add_development_dependency "bundler", "~> 1.10"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qtools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel
|
@@ -47,6 +47,7 @@ executables:
|
|
47
47
|
- qqsub
|
48
48
|
- qcount
|
49
49
|
- qnode
|
50
|
+
- qundo
|
50
51
|
extensions: []
|
51
52
|
extra_rdoc_files: []
|
52
53
|
files:
|
@@ -61,6 +62,7 @@ files:
|
|
61
62
|
- bin/qcount
|
62
63
|
- bin/qnode
|
63
64
|
- bin/qqsub
|
65
|
+
- bin/qundo
|
64
66
|
- bin/qwatch
|
65
67
|
- bin/setup
|
66
68
|
- lib/qtools.rb
|