Skip to content

Script to gather and display requested information from Univa Grid Engine / SGE

Notifications You must be signed in to change notification settings

CodyKank/node_search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 

Repository files navigation

                   _                                     _                   
                  | |                                   | |                  
   _ __   ___   __| | ___ ______ ___  ___  __ _ _ __ ___| |__    _ __  _   _ 
  | '_ \ / _ \ / _` |/ _ \______/ __|/ _ \/ _` | '__/ __| '_ \  | '_ \| | | |
  | | | | (_) | (_| |  __/      \__ \  __/ (_| | | | (__| | | |_| |_) | |_| |
  |_| |_|\___/ \__,_|\___|      |___/\___|\__,_|_|  \___|_| |_(_) .__/ \__, |
                                                                | |     __/ |
                                                                |_|    |___/ 
-------------------------------------------------------------------------------
* node-search.py started in late July/Early August 2016.

* node-search.py is a utility script, which can be seen as a swiss-army knife
  type of program for finding relevant information for the Univa Grid Engine(UGE) /
  Sun Grid Engine (SGE).

* How Does it work:
    node-search.py is a python 3 script, which is placed in the AFS space
    currently, and it uses the subprocess module to spawn new subprocesses
    which are usually running qstat or qconf and gather their output back into
    the python script which will then parse that output depending on what its
    looking for at that time. Due to this, sometimes the script will run very
    slow, as its waiting on the subprocess to report back the output as some-
    -times UGE takes awhile to repond with those commands. 

* There is a manpage included in the git repo, which should explain in greater
  detail how the script works. To view it from within this dir, type: 
      man ./node-search.1
  You can also add it to your own manpages if you'd like.

* The node_search.sh script allows node-search to be ran without loading the
  Python 3 module. By default, there are no modules loaded and it would be a 
  pain to have to load the python 3 module everytime you wanted check the 
  status of a job, so this bash script sets up the environment temporarily
  to run Python 3 scripts. The only configuration needed with this is to
  properly specifiy the full path for the actual python 3 script. Occasionally,
  the python3 module which is loaded will also have to be updated depending on
  when a module is deprecated. 

* node_search was developed for a specific environment. If you are attempting to 
  use it for your own organization, there may be a few hiccups. In theory, as long
  as a system has UGE, qstat, qconf, and xymon, node_search should work.

* node-search.py will search through information gathered from qstat and other tools 
  about the UGE environment, including information about nodes, users, user-lists, host-
  groups, and it can even give a visualization of a host-group.

* This script is assuming (1) Python 3 is installed, tested with python 3.6.0 and 3.6.4,
  (2) the subprocess module is installed [should be by default], and (3) you
  have qconf, qstat, and xymon working and configured.

* To do:
  Add jobs to Host groups --details output
  Make --stats option for total core usage. Possible a --report also, for total number
  of jobs, users, utilization, % nodes down, etc.
  Add -j option to search for a specific job-id.