home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / ip / manage / condor / Condor_4.1.3b / src / h / proc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-06-17  |  3.4 KB  |  107 lines

  1. /* 
  2. ** Copyright 1986, 1987, 1988, 1989, 1990, 1991 by the Condor Design Team
  3. ** 
  4. ** Permission to use, copy, modify, and distribute this software and its
  5. ** documentation for any purpose and without fee is hereby granted,
  6. ** provided that the above copyright notice appear in all copies and that
  7. ** both that copyright notice and this permission notice appear in
  8. ** supporting documentation, and that the names of the University of
  9. ** Wisconsin and the Condor Design Team not be used in advertising or
  10. ** publicity pertaining to distribution of the software without specific,
  11. ** written prior permission.  The University of Wisconsin and the Condor
  12. ** Design Team make no representations about the suitability of this
  13. ** software for any purpose.  It is provided "as is" without express
  14. ** or implied warranty.
  15. ** 
  16. ** THE UNIVERSITY OF WISCONSIN AND THE CONDOR DESIGN TEAM DISCLAIM ALL
  17. ** WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
  18. ** OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE UNIVERSITY OF
  19. ** WISCONSIN OR THE CONDOR DESIGN TEAM BE LIABLE FOR ANY SPECIAL, INDIRECT
  20. ** OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
  21. ** OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  22. ** OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
  23. ** OR PERFORMANCE OF THIS SOFTWARE.
  24. ** 
  25. ** Authors:  Allan Bricker and Michael J. Litzkow,
  26. **              University of Wisconsin, Computer Sciences Dept.
  27. ** 
  28. */ 
  29.  
  30.  
  31. typedef struct {
  32.     int        cluster;
  33.     int        proc;
  34. } PROC_ID;
  35.  
  36. typedef struct {
  37.     int                version_num;        /* version of this structure */
  38.     PROC_ID            id;                    /* job id */
  39.     char            *owner;                /* login of person submitting job */
  40.     int                q_date;                /* UNIX time job was submitted */
  41.     int                completion_date;    /* UNIX time job was completed */
  42.     int                status;                /* Running, unexpanded, completed, .. */
  43.     int                prio;                /* Job priority */
  44.     int                notification;        /* Notification options */
  45.     int                image_size;            /* Size of the virtual image in K */
  46.     char            *cmd;                /* a.out file */
  47.     char            *args;                /* command line args */
  48.     char            *env;                /* environment */
  49.     char            *in;                /* file for stdin */
  50.     char            *out;                /* file for stdout */
  51.     char            *err;                /* file for stderr */
  52.     char            *rootdir;            /* Root directory for chroot() */
  53.     char            *iwd;                /* Initial working directory   */
  54.     char            *requirements;        /* job requirements */
  55.     char            *preferences;        /* job preferences */
  56.     struct rusage    local_usage;        /* accumulated usage by shadows */
  57.     struct rusage    remote_usage;        /* accumulated usage on remote hosts */
  58. } PROC;
  59.  
  60. typedef struct {
  61.     PROC_ID            id;        
  62.     char            *owner;
  63.     int                q_date;
  64.     int                status;
  65.     int                prio;
  66.     int                notification;        /* Notification options */
  67.     char            *cmd;
  68.     char            *args;
  69.     char            *env;
  70.     char            *in;
  71.     char            *out;
  72.     char            *err;
  73.     char            *rootdir;            /* Root directory for chroot() */
  74.     char            *iwd;                /* Initial working directory   */
  75.     char            *requirements;
  76.     char            *preferences;
  77.     struct rusage    local_usage;
  78.     struct rusage    remote_usage;
  79. } OLD_PROC;
  80. /*
  81. **    Possible notification options
  82. */
  83. #define NOTIFY_NEVER        0
  84. #define NOTIFY_ALWAYS        1
  85. #define    NOTIFY_COMPLETE        2
  86. #define NOTIFY_ERROR        3
  87.  
  88. typedef struct {
  89.     int        n_ids;
  90.     int        array_len;
  91.     int        next_id;
  92.     int        id[1];    /* dummy, space for actual array to be malloc'd as needed */
  93. } CLUSTER_LIST;
  94.  
  95. #define READER    1
  96. #define WRITER    2
  97. #define    UNLOCK    8
  98.  
  99. #define UNEXPANDED    0
  100. #define IDLE        1
  101. #define RUNNING        2
  102. #define REMOVED        3
  103. #define COMPLETED    4
  104. #define SUBMISSION_ERR    5
  105.  
  106. #define PROC_VERSION    2
  107.