COMPILATION LISTING OF SEGMENT reset_proj Compiled by: Multics PL/I Compiler, Release 30, of February 16, 1988 Compiled at: Honeywell Bull, Phoenix AZ, SysM Compiled on: 07/13/88 1021.0 mst Wed Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* * Copyright (c) 1972 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* *********************************************************** */ 9 10 11 /* Procedure to subtract resource usage from a PDT in an admin directory from resource usage info 12* in the system copy of a PDT: this procedure modifies the system copy only. 13* See the "reset_usage" command for a command which does all pdt's listed in a SAT. 14* 15* This procedure takes two arguments: 16* 17* 1) path of system copy of Project Definition Table (PDT) 18* 2) path of admin copy of PDT 19* 20* THVV 7/73 21* Janice B. Phillipps, April 14, 1972 22* Modified by R. McDonald May 1980 to include page charges. 23**/ 24 25 26 reset_proj: procedure; 27 28 dcl (argp, hp, sp, pp, cp, cpdtp, pdtp, pdtep, satp, satep, csatp) ptr, 29 (arglg, code, i, j, k, kk) fixed bin, 30 delta fixed bin, 31 doubledelta fixed bin (71), 32 doubletime fixed bin (71), 33 deltafloat float bin, 34 twodays fixed bin (35) int static init (2880000000); 35 36 dcl (addr, null, divide) builtin; 37 38 dcl c32 char (32) aligned, 39 pdt_name char (32) aligned, 40 pdt_dir char (168) aligned, 41 cpdt_dir char (168) aligned; 42 43 dcl clock_ entry () returns (fixed bin (71)), 44 com_err_ entry options (variable), 45 cu_$arg_ptr entry (fixed bin, ptr, fixed bin, fixed bin), 46 expand_path_ entry (ptr, fixed bin, ptr, ptr, fixed bin), 47 hcs_$delentry_file entry (char (*) aligned, char (*) aligned, fixed bin), 48 hcs_$initiate entry (char (*) aligned, char (*) aligned, char (*) aligned, fixed bin (1), 49 fixed bin (2), ptr, fixed bin), 50 hcs_$make_seg entry (char (*) aligned, char (*) aligned, char (*) aligned, fixed bin (5), ptr, fixed bin), 51 hcs_$terminate_noname entry (ptr, fixed bin), 52 hcs_$truncate_seg entry (ptr, fixed bin, fixed bin), 53 ioa_ entry options (variable), 54 ioa_$rsnnl entry options (variable), 55 set_lock_$lock entry (bit (36) aligned, fixed bin, fixed bin), 56 set_lock_$unlock entry (bit (36) aligned, fixed bin); 57 58 dcl error_table_$lock_wait_time_exceeded fixed bin ext; 59 60 61 1 1 /* BEGIN INCLUDE FILE ... user_attributes.incl.pl1 TAC 10/79 */ 1 2 1 3 1 4 /****^ HISTORY COMMENTS: 1 5* 1) change(86-12-11,Brunelle), approve(87-07-13,MCR7741), 1 6* audit(87-04-19,GDixon), install(87-08-04,MR12.1-1056): 1 7* Add incl for abs_attributes.incl.pl1 to automatically include absentee 1 8* attribute switches. 1 9* 2) change(87-04-19,GDixon), approve(87-07-13,MCR7741), 1 10* audit(87-07-16,Brunelle), install(87-08-04,MR12.1-1056): 1 11* A) Add USER_ATTRIBUTE_NAMES arrays. attribute_names.incl.pl1 can thereby 1 12* be deleted. 1 13* B) Add constants identifying attributes that can be changed by user at 1 14* login, etc. 1 15* END HISTORY COMMENTS */ 1 16 1 17 1 18 /* Modified 82-01-03 E. N. Kittlitz. to declare a complete level-1 structure */ 1 19 1 20 /* format: style4 */ 1 21 dcl 1 user_attributes aligned based, /* the user user_attributes */ 1 22 (2 administrator bit (1), /* 1 system administrator privileges */ 1 23 2 primary_line bit (1), /* 2 user has primary-line privileges */ 1 24 2 nobump bit (1), /* 2 user cannot be bumped */ 1 25 2 guaranteed_login bit (1), /* 4 user has guaranteed login privileges */ 1 26 2 anonymous bit (1), /* 5 used only in SAT. project may have anon.users */ 1 27 2 nopreempt bit (1), /* 6 used only in PDT. user not preemptable by others 1 28* . of same project (distinct from "nobump") */ 1 29 2 nolist bit (1), /* 7 don't list user on "who" */ 1 30 2 dialok bit (1), /* 8 user may have multiple consoles */ 1 31 2 multip bit (1), /* 9 user may have several processes */ 1 32 2 bumping bit (1), /* 10 in SAT. Can users in project bump each other? */ 1 33 2 brief bit (1), /* 11 no login or logout message */ 1 34 2 vinitproc bit (1), /* 12 user may change initial procedure */ 1 35 2 vhomedir bit (1), /* 13 user may change homedir */ 1 36 2 nostartup bit (1), /* 14 user does not want start_up.ec */ 1 37 2 sb_ok bit (1), /* 15 user may be standby */ 1 38 2 pm_ok bit (1), /* 16 user may be primary */ 1 39 2 eo_ok bit (1), /* 17 user may be edit_only */ 1 40 2 daemon bit (1), /* 18 user may login as daemon */ 1 41 2 vdim bit (1), /* 19 * OBSOLETE * user may change outer mdle */ 1 42 2 no_warning bit (1), /* 20 no warning message */ 1 43 2 igroup bit (1), /* 21 in SAT: this project may give its users individual groups 1 44* . in PDT: this user has an individual load control group */ 1 45 2 save_pdir bit (1), /* 22 save pdir after fatal process error */ 1 46 2 disconnect_ok bit (1), /* 23 ok to save user's disconnected processes */ 1 47 2 save_on_disconnect bit (1), /* 24 save them unless -nosave login arg is given */ 1 48 2 pad bit (12)) unaligned; 1 49 1 50 dcl USER_ATTRIBUTE_NAMES (0:24) char (20) int static options (constant) init 1 51 ("none", /* 0 */ 1 52 "administrator", /* 1 */ 1 53 "primary_line", /* 2 */ 1 54 "nobump", /* 3 */ 1 55 "guaranteed_login", /* 4 */ 1 56 "anonymous", /* 5 */ 1 57 "nopreempt", /* 6 */ 1 58 "nolist", /* 7 */ 1 59 "dialok", /* 8 */ 1 60 "multip", /* 9 */ 1 61 "bumping", /* 10 */ 1 62 "brief", /* 11 */ 1 63 "vinitproc", /* 12 */ 1 64 "vhomedir", /* 13 */ 1 65 "nostartup", /* 14 */ 1 66 "no_secondary", /* 15 */ 1 67 "no_prime", /* 16 */ 1 68 "no_eo", /* 17 */ 1 69 "daemon", /* 18 */ 1 70 "", /* 19 vdim OBSOLETE */ 1 71 "no_warning", /* 20 */ 1 72 "igroup", /* 21 */ 1 73 "save_pdir", /* 22 */ 1 74 "disconnect_ok", /* 23 */ 1 75 "save_on_disconnect"); /* 24 */ 1 76 1 77 dcl ALT_USER_ATTRIBUTE_NAMES (0:24) char (20) int static options (constant) init 1 78 ("null", /* 0 */ 1 79 "admin", /* 1 */ 1 80 "", "", /* 2 - 3 */ 1 81 "guar", /* 4 */ 1 82 "anon", /* 5 */ 1 83 "", "", /* 6 - 7 */ 1 84 "dial", /* 8 */ 1 85 "multi_login", /* 9 */ 1 86 "preempting", /* 10 */ 1 87 "", /* 11 */ 1 88 "v_process_overseer", /* 12 */ 1 89 "v_home_dir", /* 13 */ 1 90 "no_start_up", /* 14 */ 1 91 "no_sec", /* 15 */ 1 92 "no_primary", /* 16 */ 1 93 "no_edit_only", /* 17 */ 1 94 "op_login", /* 18 */ 1 95 "", /* 19 */ 1 96 "nowarn", /* 20 */ 1 97 "", "", "", /* 21 - 23 */ 1 98 "save"); /* 24 */ 1 99 1 100 dcl USER_ATTRIBUTES_always_allowed bit (36) aligned int static 1 101 options(constant) init("000000000010000000010000000000000000"b); 1 102 /* SAT/PDT attributes not needed for user to give (brief, no_warning) */ 1 103 1 104 dcl USER_ATTRIBUTES_default_in_pdt bit (36) aligned int static 1 105 options(constant) init("000000000010000000010000000000000000"b); 1 106 /* PDT value for (brief, no_warning) is default */ 1 107 1 108 dcl USER_ATTRIBUTES_settable_by_user bit (36) aligned int static 1 109 options(constant) init("000100000110010000010000000000000000"b); 1 110 /* user MIGHT set (bump, ns, brief, guar, no_warning) */ 1 111 2 1 /* BEGIN INCLUDE FILE ... user_abs_attributes.incl.pl1 */ 2 2 2 3 /* * * * * * * * * * * * * * * * * * * * * * * * * * */ 2 4 /* */ 2 5 /* This include file describes the attributes of an absentee job. It is */ 2 6 /* used by user_table_entry.incl.pl1, abs_message_format.incl.pl1 */ 2 7 /* and PIT.incl.pl1. */ 2 8 /* */ 2 9 /* * * * * * * * * * * * * * * * * * * * * * * * * * */ 2 10 2 11 /****^ HISTORY COMMENTS: 2 12* 1) change(86-12-08,GDixon), approve(87-07-13,MCR7741), 2 13* audit(87-07-16,Brunelle), install(87-08-04,MR12.1-1056): 2 14* Separated abs_attributes from the request structure 2 15* (abs_message_format.incl.pl1) so that the identical structure could be 2 16* used in the ute structure (user_table_entry.incl.pl1). 2 17* 2) change(87-04-19,GDixon), approve(87-07-13,MCR7741), 2 18* audit(87-07-16,Brunelle), install(87-08-04,MR12.1-1056): 2 19* Added ABS_ATTRIBUTE_NAMES array. 2 20* 3) change(87-11-11,Parisek), approve(88-02-11,MCR7849), 2 21* audit(88-03-22,Lippard), install(88-07-13,MR12.2-1047): 2 22* Added the no_start_up flag. SCP6367 2 23* END HISTORY COMMENTS */ 2 24 2 25 dcl 1 user_abs_attributes aligned based, 2 26 2 restartable bit (1) unaligned, /* 1 if request may be started over from the beginning */ 2 27 2 user_deferred_until_time bit (1) unaligned, /* 1 if request was specified as deferred */ 2 28 2 proxy bit (1) unaligned, /* 1 if request submitted for someone else */ 2 29 2 set_bit_cnt bit (1) unaligned, /* 1 if should set bit count after every write call */ 2 30 2 time_in_gmt bit (1) unaligned, /* 1 if deferred_time is in GMT */ 2 31 2 user_deferred_indefinitely bit (1) unaligned, /* 1 if operator is to say when to run it */ 2 32 2 secondary_ok bit (1) unaligned, /* 1 if ok to log in as secondary foreground user */ 2 33 2 truncate_absout bit (1) unaligned, /* 1 if .absout is to be truncated */ 2 34 2 restarted bit (1) unaligned, /* 1 if job is restarted */ 2 35 2 no_start_up bit (1) unaligned, /* 1 if requested -ns */ 2 36 2 attributes_pad bit (26) unaligned; 2 37 2 38 dcl ABS_ATTRIBUTE_NAMES (10) char (28) varying int static options(constant) init( 2 39 "restartable", 2 40 "user_deferred_until_time", 2 41 "proxy", 2 42 "set_bit_cnt", 2 43 "time_in_gmt", 2 44 "user_deferred_indefinitely", 2 45 "secondary_ok", 2 46 "truncate_absout", 2 47 "restarted", 2 48 "no_start_up"); 2 49 2 50 /* END INCLUDE FILE ... user_abs_attributes.incl.pl1 */ 2 51 1 112 1 113 1 114 /* END INCLUDE FILE ... user_attributes.incl.pl1 */ 62 3 1 /* BEGIN INCLUDE FILE ... pdt.incl.pl1 */ 3 2 /* Requires user_attributes.incl.pl1 */ 3 3 3 4 /* Modified 740723 by PG to add AIM info */ 3 5 /* Modified 750604 by T. Casey to add priority scheduler parameters */ 3 6 /* Modified May 1976 by T. Casey to add cutoff warning thresholds and change version to 3 */ 3 7 /* Modified May 1977 by John Gintell to add reqfile, projfile, and SAT to header */ 3 8 /* Modified May 1978 by T. Casey to add pdir_quota to user entry */ 3 9 /* Modified June 1978 by T. Casey to add rel ptr to pdt hash table */ 3 10 /* Modified November 1978 by T. Casey to add max_(fore back)ground, n_(fore back)ground and abs_foreground_cpu_limit */ 3 11 /* Modified October 1979 by T. Casey to add counters for interactive and disconnected processes. */ 3 12 /* Modified Feb 1980 by M. B. Armstrong to implement multiple rate structures (UNCA). */ 3 13 /* Modified May 1980 by R. McDonald to use iod cpu time field for page charging (UNCA) */ 3 14 /* Modified December 1981 by E. N. Kittlitz for user_warn fields */ 3 15 /* Modified January 1982 by E. N. Kittlitz for user_attributes.incl.pl1 changes */ 3 16 /* Modified September 1982 by E. N. Kittlitz for default ring. */ 3 17 /* Modified 1984-07-05 BIM for min authorization, version to 4 */ 3 18 3 19 dcl (PDT_version init (4), /* version of this declaration */ 3 20 PDT_header_lth init (256), /* length in words of PDT head */ 3 21 PDT_entry_lth init (256), /* length in words of PDT entry */ 3 22 3 23 PDT_project_name_length init (9), /* proper length of pdt.project_name */ 3 24 PDT_person_id_length init (22) /* proper length of user.person_id */ 3 25 ) fixed bin internal static options (constant); 3 26 3 27 dcl 1 pdt based (pdtp) aligned, 3 28 4 1 /* BEGIN INCLUDE FILE author.incl.pl1 */ 4 2 4 3 /* the "author" items must always be the first ones in the table. The 4 4* module which moves the converted table to the System Control process 4 5* fills in these data items and assumes them to be at the head of the segment 4 6* regardless of the specific table's actual declaration. The variables 4 7* "lock" and "last_install_time" used to be "process_id" and "ev_channel" 4 8* respectively. For tables installed in multiple processes, these 4 9* are to be used to lock out multiple installations. */ 4 10 4 11 /* Lock should be used as a modification lock. Since, in general, 4 12* entries may not be moved in system tables, even by installations, 4 13* it is sufficient for only installers and programs that change threads 4 14* to set or respect the lock. Simply updating data in an entry 4 15* requires no such protection. 4 16* 4 17* Last_install_time is used by readers of system tables to detect 4 18* installations or other serious modifications. By checking it before 4 19* and after copying a block of data, they can be protected against 4 20* modifications. 4 21* 4 22* Modules that set the lock should save proc_group_id, and then 4 23* put their group id there for the time they hold the lock. 4 24* if they do not actually install the, they should restore the group id. 4 25**/ 4 26 4 27 2 author aligned, /* validation data about table's author */ 4 28 3 proc_group_id char (32), /* process-group-id (personid.projectid.tag) */ 4 29 3 lock bit (36), /* installation lock */ 4 30 3 update_attributes bit (1) unal, /* update/add/delete attributes */ 4 31 3 update_authorization bit (1) unal, /* update only authorizations */ 4 32 3 deferral_notified bit (1) unal, /* installer notified of deferral of installation */ 4 33 3 pad bit (33) unaligned, 4 34 3 last_install_time fixed bin (71), 4 35 3 table char (4), /* name of table, e.g., SAT MGT TTT RTDT PDT etc. */ 4 36 3 w_dir char (64), /* author's working directory */ 4 37 4 38 /* END INCLUDE FILE author.incl.pl1 */ 3 29 3 30 2 max_size fixed bin, /* max number of entries table can grow */ 3 31 2 current_size fixed bin, /* current size of table (in entries) */ 3 32 2 version fixed bin, /* table version */ 3 33 2 freep fixed bin, /* relptr to begin of free chain */ 3 34 2 n_users fixed bin, /* number of entries actually used */ 3 35 2 project_name char (28), /* name of project */ 3 36 2 project_dir char (64), /* treename of project's directory */ 3 37 2 projfile_version fixed bin, 3 38 2 projentry bit (66*36), 3 39 2 pad3 (5) bit (36) aligned, 3 40 2 reqfile_version fixed bin, 3 41 2 reqentry bit (40*36), 3 42 2 pad4 (9) fixed bin, 3 43 2 sat_version fixed bin, 3 44 2 satentry bit (52*36), /* everything in sat.project from project.at on */ 3 45 2 pad5 (4) bit (36) aligned, 3 46 2 date_reqfile_copied fixed bin (71), 3 47 2 rs_number fixed bin (9) unsigned unaligned, /* rate structure number, easier than looking in satentry */ 3 48 2 pad2l bit (27) unaligned, 3 49 2 pad2 (16) fixed bin, /* make header 256 words long */ 3 50 2 ht_relp fixed bin (18) aligned, /* if nonzero, pdt has hash table at that loc */ 3 51 2 user (1019) aligned, /* the project definition table entries */ 3 52 3 pad (256) bit (36) aligned; /* each entry is 256 words long */ 3 53 3 54 /* The hash table, if there is one, is right after the last user, and is described in hashst.incl.pl1 */ 3 55 3 56 3 57 3 58 dcl 1 user based (pdtep) aligned, /* declaration of a single PDT entry */ 3 59 2 state fixed bin, /* 1 = normal, 2 = deleted 0 = free */ 3 60 2 lock bit (36), /* update lock */ 3 61 2 person_id char (24) aligned, /* login name of user */ 3 62 2 now_in fixed bin, /* count of users logged in on this entry */ 3 63 2 password char (8) aligned, /* password for anonymous user */ 3 64 2 at like user_attributes aligned, /* include user_attributes.incl.pl1 */ 3 65 2 initial_procedure char (64) aligned, /* initproc and subsystem name packed into one string */ 3 66 2 home_dir char (64) aligned, /* user's default working directory */ 3 67 2 bump_grace fixed bin, /* number of minutes he is protected */ 3 68 2 high_ring fixed bin, /* highest ring user may use */ 3 69 2 default_ring fixed bin (17) unal, /* ring user will start in */ 3 70 2 low_ring fixed bin (17) unal, /* lowest ring user may use */ 3 71 2 outer_module char (32), /* outer module used if user is interactive */ 3 72 2 lot_size fixed bin, /* size of linkage offset table */ 3 73 2 kst_size fixed bin, /* size of known segment table */ 3 74 2 cls_size fixed bin, /* size of combined linkage */ 3 75 2 uflags, /* various flags */ 3 76 3 dont_call_init_admin bit (1) unal, /* call overseer direct */ 3 77 3 ip_given bit (1) unal, /* ip_len gives length of initproc packed in initial_procedure */ 3 78 3 ss_given bit (1) unal, /* subsystem name is packed in initial_procedure */ 3 79 3 flagpad bit (33) unal, 3 80 2 ip_len fixed bin (17) unal, /* length of initproc name packed in initial_procedure */ 3 81 2 ss_len fixed bin (17) unal, /* length of subsystem name packed in initial_procedure */ 3 82 2 dollar_limit float bin, 3 83 2 dollar_charge float bin, /* total dollars spent this month */ 3 84 2 shift_limit (0: 7) float bin, 3 85 2 daton fixed bin (71), /* date user added to system */ 3 86 2 datof fixed bin (71), /* date user deleted */ 3 87 2 last_login_time fixed bin (71), /* time of last login */ 3 88 2 last_login_unit char (4), /* terminal id last used */ 3 89 2 last_login_type fixed bin (17) unal, /* terminal type */ 3 90 2 last_login_line_type fixed bin (17) unal, /* terminal line type */ 3 91 2 time_last_bump fixed bin (71), /* for bump-wait */ 3 92 2 last_update fixed bin (71), /* time of last transaction */ 3 93 2 logins fixed bin, /* number of logins */ 3 94 2 crashes fixed bin, /* sessions abnormally terminated */ 3 95 2 interactive (0: 7), /* interactive use, shifts 0-7 */ 3 96 3 charge float bin, /* total dollar charge this shift */ 3 97 3 xxx fixed bin, 3 98 3 cpu fixed bin (71), /* cpu usage in microseconds */ 3 99 3 core fixed bin (71), /* core demand in page-microseconds */ 3 100 3 connect fixed bin (71), /* total console time in microseconds */ 3 101 3 io_ops fixed bin (71), /* total i/o ops on terminal */ 3 102 2 absentee (4), /* absentee use, queues 1-4 */ 3 103 3 charge float bin, /* dollar charge this queue */ 3 104 3 jobs fixed bin, /* number of jobs submitted */ 3 105 3 cpu fixed bin (71), /* total cpu time in microseconds */ 3 106 3 memory fixed bin (71), /* total memory demand */ 3 107 2 iod (4), /* io daemon use, queues 1-4 */ 3 108 3 charge float bin, /* dollar charge this queue */ 3 109 3 pieces fixed bin, /* pieces of output requested */ 3 110 3 pad fixed bin (35), 3 111 3 pages fixed bin (35), /* number of pages output */ 3 112 3 lines fixed bin (71), /* total record count of output */ 3 113 2 devices (16) float bin, /* device charges */ 3 114 2 time_last_reset fixed bin (71), /* time PDT last updated */ 3 115 2 absolute_limit float bin, /* Limit, not reset monthly */ 3 116 2 absolute_spent float bin, /* Spending against this */ 3 117 2 absolute_cutoff fixed bin (71), /* Spending will be reset on this date */ 3 118 2 absolute_increm fixed bin, /* .. time increment code. 0 = don't reset */ 3 119 2 pad_was_authorization bit (72) aligned, 3 120 2 group char (8), /* group for this user (if at.igroup = "1"b) */ 3 121 2 warn_days fixed bin (17) unaligned, /* warn user if less than this many days to cutoff */ 3 122 2 warn_pct fixed bin (17) unaligned, /* warn user if less than this percent of funds left */ 3 123 2 warn_dollars float bin, /* warn user if less than this amount of funds left */ 3 124 2 n_foreground fixed bin (9) unsigned unaligned, /* number of foreground and background processes */ 3 125 2 n_background fixed bin (9) unsigned unaligned, /* that this user has. see limits just below */ 3 126 2 max_foreground fixed bin (9) unsigned unaligned, /* max simultaneous foreground and */ 3 127 2 max_background fixed bin (9) unsigned unaligned, /* background processes that this user can have */ 3 128 2 n_interactive fixed bin (9) unsigned unaligned, /* number of interactive processes that user has */ 3 129 2 n_disconnected fixed bin (9) unsigned unaligned, /* number of disconnected processes that user has */ 3 130 2 pdtupad1 fixed bin (18) unsigned unaligned, 3 131 2 user_warn_days fixed bin (17) unaligned, /* warn user if less than this many days to user cutoff */ 3 132 2 user_warn_pct fixed bin (17) unaligned, /* warn user if less than this percent of user funds left */ 3 133 2 user_warn_dollars float bin, /* warn user if less than this amount of user funds left */ 3 134 2 user_authorization (2) bit (72) aligned, /* range */ 3 135 2 pdtupad (5) fixed bin, 3 136 2 abs_foreground_cpu_limit fixed bin (17) unaligned, /* time limit (sec) on foreground absentee jobs */ 3 137 2 pdir_quota fixed bin (17) unaligned, /* quota to put on user's pdir (0 => use default) */ 3 138 2 chain fixed bin; /* free chain */ 3 139 3 140 /* END INCLUDE FILE ... pdt.incl.pl1 */ 63 64 65 66 /* ======================================================= */ 67 68 doubletime = clock_ (); /* get time for PDT time_last_update */ 69 70 call cu_$arg_ptr (1, argp, arglg, code); 71 if code ^= 0 then do; 72 error: call com_err_ (code, "reset_proj", ""); 73 return; 74 end; 75 call expand_path_ (argp, arglg, addr (pdt_dir), addr (pdt_name), code); 76 if code ^= 0 then go to error; 77 call cu_$arg_ptr (2, argp, arglg, code); 78 if code ^= 0 then go to error; 79 call expand_path_ (argp, arglg, addr (cpdt_dir), addr (pdt_name), code); 80 if code ^= 0 then go to error; 81 82 call hcs_$initiate (cpdt_dir, pdt_name, "", 0, 0, cpdtp, code); /* initiate admin copy of PDT */ 83 if cpdtp = null then go to error; 84 call hcs_$initiate (pdt_dir, pdt_name, "", 0, 0, pdtp, code); /* get ptr to sys version of the PDT */ 85 if pdtp = null then go to error; 86 87 do j = 1 to pdt.current_size; /* loop thru each PDT to reset all users */ 88 sp = addr (pdtp -> pdt.user (j)); /* system copy of PDT */ 89 cp = addr (cpdtp -> pdt.user (j)); /* admin copy of PDT */ 90 if sp -> user.state = 2 then do; /* if user was deleted during month, free up slot on chain */ 91 sp -> user.state = 0; 92 sp -> user.chain = pdtp -> pdt.freep; 93 pdtp -> pdt.freep = j; /* index of freed slot on chain */ 94 end; 95 else if sp -> user.state = 1 then do; 96 97 if sp -> user.person_id ^= cp -> user.person_id then do; 98 call com_err_ (0, "reset_proj", 99 "copy of ^a is out of phase; name in system copy: ^a name in admin copy: ^a; Continuing to next user.", 100 pdt_name, sp -> user.person_id, cp -> user.person_id); 101 go to skip1; /* set next user */ 102 end; 103 104 call set_lock_$lock (sp -> user.lock, 600, code); /* lock data base while resetting */ 105 if code = error_table_$lock_wait_time_exceeded then do; 106 call com_err_ (code, "reset_proj", "^a ^a", pdt_name, sp -> user.person_id); 107 go to locked; 108 end; 109 if doubletime - sp -> user.time_last_reset < twodays then do; 110 call com_err_ (code, "reset_proj", 111 "Warning, reset_proj has been run within last two days!", 112 "Skipping over ^a.^a", sp -> user.person_id, pdt_name); 113 go to skip1; 114 end; 115 116 deltafloat = sp -> user.dollar_charge - cp -> user.dollar_charge; /* total user charge */ 117 if deltafloat >= 0 then 118 sp -> user.dollar_charge = deltafloat; 119 120 delta = sp -> user.logins - cp -> user.logins; 121 if delta >= 0 then 122 sp -> user.logins = delta; /* number of logins */ 123 delta = sp -> user.crashes - cp -> user.crashes; /* sessions abnormally terminated */ 124 if delta >= 0 then 125 sp -> user.crashes = delta; 126 127 128 do k = 0 to 7; /* interactive use shifts 0 - 7 */ 129 deltafloat = sp -> user.interactive.charge (k) - cp -> user.interactive.charge (k); 130 if deltafloat >= 0e0 then 131 sp -> user.interactive.charge (k) = deltafloat; /* total dollar charge this shift */ 132 133 doubledelta = sp -> user.interactive.cpu (k) - cp -> user.interactive.cpu (k); 134 if doubledelta >= 0 then 135 sp -> user.interactive.cpu (k) = doubledelta; /* cpu usage in microseconds */ 136 137 doubledelta = sp -> user.interactive.core (k) - cp -> user.interactive.core (k); 138 if doubledelta >= 0 then 139 sp -> user.interactive.core (k) = doubledelta; 140 141 doubledelta = sp -> user.interactive.connect (k) - cp -> user.interactive.connect (k); 142 if doubledelta >= 0 then 143 sp -> user.interactive.connect (k) = doubledelta; /* total console time in microseconds */ 144 145 doubledelta = sp -> user.interactive.io_ops (k) - cp -> user.interactive.io_ops (k); 146 if doubledelta >= 0 then 147 sp -> user.interactive.io_ops (k) = doubledelta; /* total io_ops time in microsecs */ 148 end; 149 150 do k = 1 to 4; /* absentee use of queues 1 - 4 */ 151 deltafloat = sp -> user.absentee.charge (k) - cp -> user.absentee.charge (k); 152 if deltafloat >= 0 then 153 sp -> user.absentee.charge (k) = deltafloat; /* dollar charge this queue */ 154 155 delta = sp -> user.absentee.jobs (k) - cp -> user.absentee.jobs (k); /* jobs submitted */ 156 if delta >= 0 then 157 sp -> user.absentee.jobs (k) = delta; 158 159 doubledelta = sp -> user.absentee.cpu (k) - cp -> user.absentee.cpu (k); /* time in usecs */ 160 if doubledelta >= 0 then 161 sp -> user.absentee.cpu (k) = doubledelta; 162 163 doubledelta = sp -> user.absentee.memory (k) - cp -> user.absentee.memory (k); 164 if doubledelta >= 0 then 165 sp -> user.absentee.memory (k) = doubledelta; 166 167 end; 168 169 do k = 1 to 4; /* io daemon use queues 1 - 4 */ 170 deltafloat = sp -> user.iod.charge (k) - cp -> user.iod.charge (k); /* $ charge this queue */ 171 if deltafloat >= 0e0 then 172 sp -> user.iod.charge (k) = deltafloat; 173 174 delta = sp -> user.iod.pieces (k) - cp -> user.iod.pieces (k); 175 if delta >= 0 then 176 sp -> user.iod.pieces (k) = delta; 177 178 doubledelta = sp -> user.iod.pages (k) - cp -> user.iod.pages (k); 179 if doubledelta >= 0 then 180 sp -> user.iod.pages (k) = doubledelta; 181 182 doubledelta = sp -> user.iod.lines (k) - cp -> user.iod.lines (k); 183 if doubledelta >= 0 then 184 sp -> user.iod.lines (k) = doubledelta; 185 186 end; 187 188 do k = 1 to 16; /* device charges */ 189 deltafloat = sp -> user.devices (k) - cp -> user.devices (k); 190 if deltafloat >= 0 then 191 sp -> user.devices (k) = deltafloat; 192 end; 193 194 sp -> user.time_last_reset = doubletime; 195 call set_lock_$unlock (sp -> user.lock, code); 196 end; 197 198 199 go to skip1; 200 locked: call ioa_ ("Continuing on to next user."); 201 go to skip1; 202 neg_delta: if sp -> user.state ^= 0 then do; 203 call com_err_ (code, "reset_proj", "Warning, encountered a negative delta for ^a.^a", 204 sp -> user.person_id, pdt_name); 205 end; 206 skip1: end; /* end of user loop */ 207 call hcs_$terminate_noname (pdtp, code); 208 call hcs_$terminate_noname (cpdtp, code); 209 210 end reset_proj; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 07/13/88 0941.2 reset_proj.pl1 >special_ldd>install>MR12.2-1047>reset_proj.pl1 62 1 08/06/87 0913.6 user_attributes.incl.pl1 >ldd>include>user_attributes.incl.pl1 1-112 2 07/13/88 0900.1 user_abs_attributes.incl.pl1 >special_ldd>install>MR12.2-1047>user_abs_attributes.incl.pl1 63 3 09/13/84 0921.6 pdt.incl.pl1 >ldd>include>pdt.incl.pl1 3-29 4 04/21/82 1211.8 author.incl.pl1 >ldd>include>author.incl.pl1 NAMES DECLARED IN THIS COMPILATION. IDENTIFIER OFFSET LOC STORAGE CLASS DATA TYPE ATTRIBUTES AND REFERENCES (* indicates a set context) NAMES DECLARED BY DECLARE STATEMENT. absentee 244 based structure array level 2 dcl 3-58 addr builtin function dcl 36 ref 75 75 75 75 79 79 79 79 88 89 arglg 000112 automatic fixed bin(17,0) dcl 28 set ref 70* 75* 77* 79* argp 000100 automatic pointer dcl 28 set ref 70* 75* 77* 79* chain 377 based fixed bin(17,0) level 2 dcl 3-58 set ref 92* charge 274 based float bin(27) array level 3 in structure "user" dcl 3-58 in procedure "reset_proj" set ref 170 170 171* charge 124 based float bin(27) array level 3 in structure "user" dcl 3-58 in procedure "reset_proj" set ref 129 129 130* charge 244 based float bin(27) array level 3 in structure "user" dcl 3-58 in procedure "reset_proj" set ref 151 151 152* clock_ 000010 constant entry external dcl 43 ref 68 code 000113 automatic fixed bin(17,0) dcl 28 set ref 70* 71 72* 75* 76 77* 78 79* 80 82* 84* 104* 105 106* 110* 195* 203* 207* 208* com_err_ 000012 constant entry external dcl 43 ref 72 98 106 110 203 connect 132 based fixed bin(71,0) array level 3 dcl 3-58 set ref 141 141 142* core 130 based fixed bin(71,0) array level 3 dcl 3-58 set ref 137 137 138* cp 000104 automatic pointer dcl 28 set ref 89* 97 98 116 120 123 129 133 137 141 145 151 155 159 163 170 174 178 182 189 cpdt_dir 000207 automatic char(168) dcl 38 set ref 79 79 82* cpdtp 000106 automatic pointer dcl 28 set ref 82* 83 89 208* cpu 246 based fixed bin(71,0) array level 3 in structure "user" dcl 3-58 in procedure "reset_proj" set ref 159 159 160* cpu 126 based fixed bin(71,0) array level 3 in structure "user" dcl 3-58 in procedure "reset_proj" set ref 133 133 134* crashes 123 based fixed bin(17,0) level 2 dcl 3-58 set ref 123 123 124* cu_$arg_ptr 000014 constant entry external dcl 43 ref 70 77 current_size 36 based fixed bin(17,0) level 2 dcl 3-27 ref 87 delta 000116 automatic fixed bin(17,0) dcl 28 set ref 120* 121 121 123* 124 124 155* 156 156 174* 175 175 deltafloat 000124 automatic float bin(27) dcl 28 set ref 116* 117 117 129* 130 130 151* 152 152 170* 171 171 189* 190 190 devices 324 based float bin(27) array level 2 dcl 3-58 set ref 189 189 190* dollar_charge 75 based float bin(27) level 2 dcl 3-58 set ref 116 116 117* doubledelta 000120 automatic fixed bin(71,0) dcl 28 set ref 133* 134 134 137* 138 138 141* 142 142 145* 146 146 159* 160 160 163* 164 164 178* 179 179 182* 183 183 doubletime 000122 automatic fixed bin(71,0) dcl 28 set ref 68* 109 194 error_table_$lock_wait_time_exceeded 000032 external static fixed bin(17,0) dcl 58 ref 105 expand_path_ 000016 constant entry external dcl 43 ref 75 79 freep 40 based fixed bin(17,0) level 2 dcl 3-27 set ref 92 93* hcs_$initiate 000020 constant entry external dcl 43 ref 82 84 hcs_$terminate_noname 000022 constant entry external dcl 43 ref 207 208 interactive 124 based structure array level 2 dcl 3-58 io_ops 134 based fixed bin(71,0) array level 3 dcl 3-58 set ref 145 145 146* ioa_ 000024 constant entry external dcl 43 ref 200 iod 274 based structure array level 2 dcl 3-58 j 000114 automatic fixed bin(17,0) dcl 28 set ref 87* 88 89 93* jobs 245 based fixed bin(17,0) array level 3 dcl 3-58 set ref 155 155 156* k 000115 automatic fixed bin(17,0) dcl 28 set ref 128* 129 129 130 133 133 134 137 137 138 141 141 142 145 145 146* 150* 151 151 152 155 155 156 159 159 160 163 163 164* 169* 170 170 171 174 174 175 178 178 179 182 182 183* 188* 189 189 190* lines 300 based fixed bin(71,0) array level 3 dcl 3-58 set ref 182 182 183* lock 1 based bit(36) level 2 dcl 3-58 set ref 104* 195* logins 122 based fixed bin(17,0) level 2 dcl 3-58 set ref 120 120 121* memory 250 based fixed bin(71,0) array level 3 dcl 3-58 set ref 163 163 164* null builtin function dcl 36 ref 83 85 pages 277 based fixed bin(35,0) array level 3 dcl 3-58 set ref 178 178 179* pdt based structure level 1 dcl 3-27 pdt_dir 000135 automatic char(168) dcl 38 set ref 75 75 84* pdt_name 000125 automatic char(32) dcl 38 set ref 75 75 79 79 82* 84* 98* 106* 110* 203* pdtp 000110 automatic pointer dcl 28 set ref 84* 85 87 88 92 93 207* person_id 2 based char(24) level 2 dcl 3-58 set ref 97 97 98* 98* 106* 110* 203* pieces 275 based fixed bin(17,0) array level 3 dcl 3-58 set ref 174 174 175* set_lock_$lock 000026 constant entry external dcl 43 ref 104 set_lock_$unlock 000030 constant entry external dcl 43 ref 195 sp 000102 automatic pointer dcl 28 set ref 88* 90 91 92 95 97 98 104 106 109 110 116 117 120 121 123 124 129 130 133 134 137 138 141 142 145 146 151 152 155 156 159 160 163 164 170 171 174 175 178 179 182 183 189 190 194 195 202 203 state based fixed bin(17,0) level 2 dcl 3-58 set ref 90 91* 95 202 time_last_reset 344 based fixed bin(71,0) level 2 dcl 3-58 set ref 109 194* twodays 000000 constant fixed bin(35,0) initial dcl 28 ref 109 user based structure level 1 dcl 3-58 in procedure "reset_proj" user 400 based structure array level 2 in structure "pdt" dcl 3-27 in procedure "reset_proj" set ref 88 89 user_attributes based structure level 1 dcl 1-21 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. ABS_ATTRIBUTE_NAMES internal static varying char(28) initial array dcl 2-38 ALT_USER_ATTRIBUTE_NAMES internal static char(20) initial array packed unaligned dcl 1-77 PDT_entry_lth internal static fixed bin(17,0) initial dcl 3-19 PDT_header_lth internal static fixed bin(17,0) initial dcl 3-19 PDT_person_id_length internal static fixed bin(17,0) initial dcl 3-19 PDT_project_name_length internal static fixed bin(17,0) initial dcl 3-19 PDT_version internal static fixed bin(17,0) initial dcl 3-19 USER_ATTRIBUTES_always_allowed internal static bit(36) initial dcl 1-100 USER_ATTRIBUTES_default_in_pdt internal static bit(36) initial dcl 1-104 USER_ATTRIBUTES_settable_by_user internal static bit(36) initial dcl 1-108 USER_ATTRIBUTE_NAMES internal static char(20) initial array packed unaligned dcl 1-50 c32 automatic char(32) dcl 38 csatp automatic pointer dcl 28 divide builtin function dcl 36 hcs_$delentry_file 000000 constant entry external dcl 43 hcs_$make_seg 000000 constant entry external dcl 43 hcs_$truncate_seg 000000 constant entry external dcl 43 hp automatic pointer dcl 28 i automatic fixed bin(17,0) dcl 28 ioa_$rsnnl 000000 constant entry external dcl 43 kk automatic fixed bin(17,0) dcl 28 pdtep automatic pointer dcl 28 pp automatic pointer dcl 28 satep automatic pointer dcl 28 satp automatic pointer dcl 28 user_abs_attributes based structure level 1 dcl 2-25 NAMES DECLARED BY EXPLICIT CONTEXT. error 000165 constant label dcl 72 ref 76 78 80 83 85 locked 001114 constant label dcl 200 ref 107 neg_delta 001131 constant label dcl 202 reset_proj 000131 constant entry external dcl 26 skip1 001174 constant label dcl 206 ref 101 113 199 201 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1354 1410 1221 1364 Length 1666 1221 34 241 133 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME reset_proj 270 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME reset_proj 000100 argp reset_proj 000102 sp reset_proj 000104 cp reset_proj 000106 cpdtp reset_proj 000110 pdtp reset_proj 000112 arglg reset_proj 000113 code reset_proj 000114 j reset_proj 000115 k reset_proj 000116 delta reset_proj 000120 doubledelta reset_proj 000122 doubletime reset_proj 000124 deltafloat reset_proj 000125 pdt_name reset_proj 000135 pdt_dir reset_proj 000207 cpdt_dir reset_proj THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return_mac ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. clock_ com_err_ cu_$arg_ptr expand_path_ hcs_$initiate hcs_$terminate_noname ioa_ set_lock_$lock set_lock_$unlock THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$lock_wait_time_exceeded LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 26 000130 68 000136 70 000144 71 000163 72 000165 73 000212 75 000213 76 000236 77 000240 78 000257 79 000261 80 000304 82 000306 83 000351 84 000355 85 000420 87 000424 88 000435 89 000440 90 000442 91 000445 92 000446 93 000451 94 000453 95 000454 97 000456 98 000462 101 000526 104 000527 105 000544 106 000550 107 000607 109 000610 110 000620 113 000666 116 000667 117 000673 120 000675 121 000700 123 000702 124 000705 128 000707 129 000713 130 000722 133 000725 134 000730 137 000732 138 000735 141 000737 142 000742 145 000744 146 000747 148 000751 150 000753 151 000761 152 000770 155 000773 156 000776 159 001000 160 001003 163 001005 164 001010 167 001012 169 001014 170 001021 171 001030 174 001033 175 001036 178 001040 179 001046 182 001050 183 001053 186 001055 188 001057 189 001065 190 001073 192 001075 194 001077 195 001102 199 001113 200 001114 201 001130 202 001131 203 001133 206 001174 207 001176 208 001207 210 001220 ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved