JSD(1)                      General Commands Manual                     JSD(1)



NAME
       jsd - job scheduler daemon

SYNOPSIS
       jsd  [ -V | --version ] [ -v | --verbose | -d level | --debug=level ] [
       -h | --help ] [ -p | --paths ] [ -n | --simulate ] [  -r  res:qty[,...]
       | --resources=res:qty[,...]  ] [ --suspend ]

DESCRIPTION
       Jsd  is  a  very simple job scheduler daemon. It "manages" an arbitrary
       set of system resources (e.g. memory, CPUs, disk  space)  and  executes
       jobs  that  have  been submitted (see jss(1)) when their demand for re-
       sources can be met.

CONFIGURATION
       None

OPTIONS
       -d level, --debug=level  Determines how verbose this program  will  be.
                                The  message types displayed for the different
                                values of level are as follows: 0 displays  no
                                messages;  1  displays only errors, 2 displays
                                errors and warnings; 3 displays errors,  warn-
                                ings and informational messages; higher values
                                display errors, warnings,  informational  mes-
                                sages and various messages intended for debug-
                                ging.  The default is 2.

       -h, --help               Displays a brief usage message.

       -p, --paths              Lists the compiled-in paths of  various  files
                                and  directories  that this program uses.  -n,
                                --simulate Some external  commands  that  this
                                program  runs may be displayed rather than ac-
                                tually executed.  BEWARE:  different  programs
                                implement  different  levels of simulation; so
                                this option may work perfectly; on  the  other
                                hand it may do nothing at all!

       -v, --verbose            Equivalent to -d 3.

       -V, --version            Prints the program's version number and exits.

       -r res:qty[,...], --resources=res:qty[,...]
                                Specifies  the  names of the resources and the
                                quantities of each of  them  initially  avail-
                                able.  res must adhere to the usual definition
                                of a word; qty must be an integer.  It  is  an
                                error for no resources to be specified.

       --suspend                Start  jsd  with  the scheduler suspended. See
                                jsc(1)'s suspend and resume commands for  more
                                information.

EXIT STATUS
       On  success  jsd  returns zero. On failure it returns non-zero and dis-
       plays a diagnostic message.

FILES
       None.

ENVIRONMENT VARIABLES
       JS_NAME or LOGNAME       If JS_NAME is set then it is used to  set  the
                                name  of  the  instance of jsd(1).  If that is
                                not set then LOGNAME is used instead.  If that
                                is also not set then an error occurs.

       JS_res_AFFINITY          Set  to  the specific resources that have been
                                allocated, e.g.:

                                JS_CPU_AFFINITY=0-3,16-19

       JS_res_LIMIT             Set to the count of resources that  have  been
                                allocated, e.g.:

                                JS_CPU_LIMIT=8

EXAMPLES
       This command manages some standard resources:

              MEM=$(head -1 /proc/meminfo | awk '{ print $2 }')
              CPU=$(grep -c '^processor' /proc/cpuinfo)
              jsd --resources=mem:$MEM,cpu:$CPU

       This command manages some considerably less standard resources:

              jsd --resources=alexis:1,suzie:1,peter:1,jane:1

CAVEATS
       Jsd  has no understanding of resource types; it simply maintains a list
       of the quantity of each resource that currently executing jobs are con-
       suming  and  if  a  job can be executed without exceeding the specified
       maximum available quantities of all resources, then it runs  that  job.
       See also the CAVEATS section of jss(1).

       Affinity  is enforced through jsd's use of js-shepherd.  js-shepherd is
       currently not documented.

STANDARDS
       This manual page documents version 2 of jsd.

SEE ALSO
       js-config(1), jsc(1), jsq(1), jss(1), taskset(1)

AUTHOR
       Alexis Huxley <alexishuxley@gmail.com>

COPYRIGHT & DISTRIBUTION POLICY
       Copyright (C) 2015-2024 Alexis Huxley

       This program is free software; you can redistribute it and/or modify it
       under  the  terms of the GNU General Public License as published by the
       Free Software Foundation; either version 2 of the License, or (at  your
       option) any later version.

       This  program  is  distributed  in the hope that it will be useful, but
       WITHOUT ANY  WARRANTY;  without  even  the  implied  warranty  of  MER-
       CHANTABILITY  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
       Public License for more details.

       You should have received a copy of the GNU General Public License along
       with this program; if not, write to the Free Software Foundation, Inc.,
       675 Mass Ave, Cambridge, MA 02139, USA.



                                  26 Jul 2024                           JSD(1)