COMPILATION LISTING OF SEGMENT meter_rcp Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 03/25/86 1119.8 mst Tue 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 meter_rcp: procedure; 12 13 /* This program is a command that meters device data copied from RCP. 14* * It also meters the locks used for rcp_data and rcp_com_seg. 15* * Created on 01/02/75 by Bill Silver. 16* * Modified on 01/31/79 by Michael R. Jordan 17* * 18* * To use this command one must have access to the gate rcp_priv_. 19* * If this command is called with no arguments it will type out the meters 20* * obtained from RCP for all devices of all types. This command does 21* * not work correctly if called recursively. Valid arguments are: 22* * 23* * (-all) (-a) Type all available meters. 24* * (-lock) Type meters for both RCPD and RCS locks. 25* * (-long) (-lg) Type all meters available for device or device type. 26* * (-reset) (-rs) Reset, save current meters. 27* * (-report_reset) (-rr) Reset but first output meters. 28* * (-type) (-tp) Type info about all devices of this one type. 29* * (-device) (-dv) Type info about this one mdevice. 30**/ 31 32 /* AUTOMATIC DATA */ 33 34 dcl arg_len fixed bin; /* Length of argument. */ 35 dcl arg_ptr ptr; /* Pointer to current argument. */ 36 dcl argx fixed bin; /* Number of current argument. */ 37 dcl dtypex fixed bin; /* Device type index. */ 38 dcl device_flag bit (1); /* ON => user wants device meters. */ 39 dcl device_name char (32); /* Device name. */ 40 dcl device_type char (32); /* Device type name. */ 41 dcl ecode fixed bin (35); /* error_table_ code. */ 42 dcl hours fixed bin; 43 dcl (i, j) fixed bin; /* Work variables. */ 44 dcl histox fixed bin; /* Index of current histogram slot. */ 45 dcl lock_flag bit (1); /* ON => user wants lock meters. */ 46 dcl long_flag bit (1); /* ON => type everything we can. */ 47 dcl meter_index fixed bin; /* Used to determine which meters to process. */ 48 dcl meter_time fixed bin (71); /* The metering time interval. */ 49 dcl minutes fixed bin; 50 dcl num_args fixed bin; /* Number of command arguments. */ 51 dcl omdevice_ptr ptr; /* Pointer to old device entry. */ 52 dcl olock_info_ptr ptr; /* Pointer to old lock_info data. */ 53 dcl option char (16); /* Command option name. */ 54 dcl option_code fixed bin; /* Used to describe option's value argument. */ 55 dcl ormi_ptr ptr; /* Pointer to old meter info. */ 56 dcl reset_flag bit (1); /* ON => user wants meters saved. */ 57 dcl time_assigned fixed bin (71); /* Time assigned device assigned. */ 58 dcl seconds fixed bin; 59 dcl work fixed bin (35); /* Work variable. */ 60 dcl (x, y, z) fixed bin; /* Used to output histogram. */ 61 62 63 /* BASED DATA */ 64 65 dcl argument char (arg_len) based (arg_ptr); /* Used to reference command argument. */ 66 67 dcl 1 mrs based (mrs_ptr) aligned, /* Structure of meter_rcp_seg. */ 68 2 reset_flag bit (1), /* ON => reset has been done. */ 69 2 rmi_size fixed bin (19), /* Size of current one meter area. */ 70 2 rmi_bound fixed bin, /* Num of double words in an RMI area. */ 71 2 tot_mdevices fixed bin, /* Total number of device being metered. */ 72 2 rmi_ptr ptr, /* Points to mrs.new_rmi. */ 73 2 ormi_ptr ptr, /* Points to mrs.old_rmi. */ 74 2 starting_time fixed bin (71), /* Meters calculated from this time. */ 75 2 new_rmi (0 refer (mrs.rmi_bound)) fixed bin (71), /* Where we copy meter info each time. */ 76 2 old_rmi (0 refer (mrs.rmi_bound)) fixed bin (71), /* Where we save reset meter data. */ 77 2 histox (0 refer (mrs.tot_mdevices)); /* Index of adjusted histogram index. */ 78 79 dcl 1 olock_info based (olock_info_ptr) aligned like lock_info; 80 81 dcl 1 omdevice based (omdevice_ptr) aligned like mdevice; 82 83 84 /* INTERNAL STATIC DATA */ 85 86 dcl mrs_ptr ptr /* Pointer to meter_rcp_seg. */ 87 internal static init (null ()); 88 89 dcl brief_options (7) char (8) /* Brief form of command options. */ 90 internal static init ("-a", "-lock", "-lg", "-rs", 91 "-rr", "-tp", "-dv"); 92 93 dcl long_options (7) char (16) /* Long form of command options. */ 94 internal static init ("-all", "-lock", "-long", "-reset", 95 "-report_reset", "-type", "-device"); 96 97 dcl option_codes (7) fixed bin /* 0 => no value arg, 1 => value_arg. */ 98 internal static init (0, 0, 0, 0, 0, 1, 1); 99 100 /* EXTERNAL ENTRIES CALLED */ 101 102 dcl (addr, divide, fixed, hbound, null, rel, clock, substr) builtin; 103 104 dcl (error_table_$bad_arg, 105 error_table_$badopt, 106 error_table_$name_not_found, 107 error_table_$odd_no_of_args, 108 error_table_$wrong_no_of_args) fixed bin (35) external; 109 110 dcl com_err_ entry options (variable); 111 dcl cu_$arg_count entry (fixed bin); 112 dcl cu_$arg_ptr entry (fixed bin, ptr, fixed bin, fixed bin (35)); 113 dcl hcs_$make_seg entry (char (*), char (*), char (*), fixed bin (5), ptr, fixed bin (35)); 114 dcl ioa_ entry options (variable); 115 dcl rcp_priv_$copy_meters entry (ptr, fixed bin (19), fixed bin (35)); 116 /* */ 1 1 /* Begin include file ... rcp_device_types.incl.pl1 1 2* * 1 3* * Created on 01/17/75 by Bill Silver. 1 4* * Modified on 11/01/78 by C. D. Tavares to change disk and tape to =_drive. 1 5* * Modified on 12/09/78 by Michael R. Jordan to add speed qualifier for tapes. 1 6* * Modified on 12/13/84 by Paul Farley to add MCA device type. 1 7* * This include file defines the official RCP device types. 1 8* * The official device type indexes and device type names are: 1 9* * 1. tape_drive 1 10* * 2. disk_drive 1 11* * 3. console 1 12* * 4. printer 1 13* * 5. punch 1 14* * 6. reader 1 15* * 7. special 1 16* * 8. mca 1 17**/ 1 18 1 19 /****^ HISTORY COMMENTS: 1 20* 1) change(85-09-09,Farley), approve(85-09-09,MCR6979), 1 21* audit(85-12-09,CLJones), install(86-03-21,MR12.0-1033): 1 22* Support MCA. 1 23* END HISTORY COMMENTS */ 1 24 1 25 dcl device_types (8) char (12) /* Official RCP device type names. */ 1 26 internal static init ("tape_drive", "disk_drive", "console", "printer", 1 27 "punch", "reader", "special", "mca"); 1 28 1 29 dcl dtype_num_qualifiers (8) fixed bin /* Number of qualifiers for each device type. */ 1 30 internal static init (3, 0, 0, 2, 0, 0, 0, 0); 1 31 1 32 /* End of include file ... rcp_device_types.incl.pl1 */ 117 118 /* */ 2 1 /* Begin include file ... rcp_meter_info.incl.pl1 2 2* * 2 3* * Created on 01/13/74 by Bill Silver. 2 4* * This include file defines the metering information needed by RCP. 2 5* * Note, this include file references rcp_com_seg.incl.pl1. 2 6**/ 2 7 dcl rmi_ptr ptr; /* Pointer to RCP meter info structure. */ 2 8 dcl mdtype_ptr ptr; /* Pointer to a device type entry. */ 2 9 dcl mdevice_ptr ptr; /* Pointer to a device entry. */ 2 10 2 11 dcl 1 rmi based (rmi_ptr) aligned, /* RCP Meter Information structure. */ 2 12 2 head like rmi_header, /* Header for this structure. */ 2 13 2 rcs_lock_info like lock_info, /* Lock meters for RCS. */ 2 14 2 rcpd_lock_info like lock_info, /* Lock meters for RCPD. */ 2 15 2 mdtypes (0 refer (rmi.tot_mdtypes)) /* An array of device type entries. */ 2 16 like mdtype, 2 17 2 mdevices (0 refer (rmi.tot_mdevices)) /* An array of device entries. */ 2 18 like mdevice, 2 19 2 end bit (36); /* Dummy used to find end of RMI. */ 2 20 2 21 dcl 1 rmi_header based aligned, /* Header for RCP Meter Info structure. */ 2 22 2 version_num fixed bin, /* The version number of this structure. */ 2 23 2 tot_mdtypes fixed bin, /* Number of device type entries. */ 2 24 2 tot_mdevices fixed bin; /* Number of device entries. */ 2 25 2 26 dcl 1 mdtype based (mdtype_ptr) aligned, /* Entry for one device type. */ 2 27 2 device_type char (32), /* Name of this device type. */ 2 28 2 num_devices fixed bin, /* Number of devices of this type. */ 2 29 2 histo_times (3) fixed bin; /* Used to compute histograms for this device type. */ 2 30 2 31 dcl 1 mdevice based (mdevice_ptr) aligned, /* Entry for one device. */ 2 32 2 device_name char (32), /* Name of device associated with this entry. */ 2 33 2 dtypex fixed bin, /* Device type index. */ 2 34 2 error_count fixed bin (35), /* Total error count, defined by user ring. */ 2 35 2 num_assigns fixed bin (35), /* Total # of times device assigned & unassigned. */ 2 36 2 tot_assign_time fixed bin (71), /* Total time that device was assigned. */ 2 37 2 time_assigned fixed bin (71), /* Time device assigned during current assignment. */ 2 38 2 histogram (4) fixed bin; /* Assignment time histogram. */ 2 39 2 40 /* End of include file ... rcp_meter_info.incl.pl1 */ 119 120 /* */ 3 1 /* Begin include file ... rcp_com_seg.incl.pl1 3 2* * 3 3* * Created on 11/20/74 by Bill Silver. 3 4* * Modified on 09/19/77 by R.J.C. Kissel to add label authentication bits. 3 5* * Modified on 12/09/78 by Michael R. Jordan to add removable media bit and label_type. 3 6* * Modified 1/79 by R.J.C. Kissel to add disk label authentication bits. 3 7* * Modified 2/79 by Michael R. Jordan to add volume_density. 3 8* * Modified 11/84 by Paul Farley to add fips flag. 3 9* * Modified 1/3/85 by Fawcett to allow room for mca device type 3 10* * Modified 02/85 by Paul Farley to add no_protect and opr_int_available flags. 3 11* * This include file defines the Resource Control Package communication segment. 3 12* * This segment is used to communicate requests between the various internal 3 13* * parts of RCP. 3 14**/ 3 15 3 16 /****^ HISTORY COMMENTS: 3 17* 1) change(85-09-09,Farley), approve(85-09-09,MCR6979), 3 18* audit(85-12-09,CLJones), install(86-03-21,MR12.0-1033): 3 19* Support MCA and FIPS. 3 20* END HISTORY COMMENTS */ 3 21 3 22 dcl lock_info_ptr ptr; /* Pointer to lock info structure. */ 3 23 dcl rcs_ptr ptr; /* Pointer to base of RCS. */ 3 24 dcl rcse_ptr ptr; /* Pointer to an RCS entry. */ 3 25 3 26 dcl 1 based_rcp_id based aligned, /* Overlay of an rcp_id. */ 3 27 (2 id_count fixed bin (17), /* Unique count index. */ 3 28 2 rcse_off bit (18)) unaligned; /* Offset of rcp_com_seg entry. */ 3 29 3 30 dcl 1 rcs based (rcs_ptr) aligned, /* Begin at word zero of rcp_com_seg. */ 3 31 2 lock_info like lock_info, /* Data used to lock this segment. */ 3 32 2 ws_maxs (8) fixed bin (19), /* Max IOI workspace size in words. */ 3 33 2 ws_pmaxs (8) fixed bin (19), /* Max IOI workspace size for priv attachments. */ 3 34 2 to_maxs (8) fixed bin (71), /* Max IOI time-out intervals in microseconds. */ 3 35 2 sys_directory char (32), /* Directory used to define a system process. */ 3 36 2 sys_acs char (32), /* Entry name used to define a system process. */ 3 37 2 acs_directory char (32), /* Directory containing device ACSs. */ 3 38 2 id_count fixed bin (35), /* Counter used to form rcp_id. */ 3 39 2 max_entries fixed bin, /* Maximum number of entries allowed. */ 3 40 2 num_entries fixed bin, /* Total number of entries. */ 3 41 2 first_free_off bit (18), /* Offset of first free entry. */ 3 42 2 entry (0 refer (rcs.num_entries)) /* Array of request entries. */ 3 43 like rcse, /* See structure below. */ 3 44 2 end bit (36); /* End of rcp_com_seg. */ 3 45 3 46 dcl 1 lock_info based (lock_info_ptr) aligned, /* Used to meter locking. */ 3 47 2 lock bit (36), /* The lock itself. */ 3 48 2 num_locks fixed bin (35), /* Number of times locked. */ 3 49 2 num_lock_waits fixed bin (35), /* Number of lock waits. */ 3 50 2 time_of_lock fixed bin (71), /* Time of last lock. */ 3 51 2 tot_lock_time fixed bin (71), /* Total time locked. */ 3 52 2 tot_wait_time fixed bin (71), /* Total time waiting for lock. */ 3 53 2 starting_time fixed bin (71); /* Time metering started. */ 3 54 3 55 dcl 1 rcse based (rcse_ptr) aligned, /* Up to state must = rcpd.device. */ 3 56 2 device_name char (8), /* Name of device associated with this entry. */ 3 57 2 volume_name char (32), /* Volume name. Blank => no volume. */ 3 58 2 dtypex fixed bin, /* Device type index. */ 3 59 2 model fixed bin, /* Device model number. */ 3 60 2 num_qualifiers fixed bin, /* Number of device qualifiers. */ 3 61 2 qualifiers (4) fixed bin (35), /* Device qualifiers. */ 3 62 2 state_time fixed bin (71), /* Time device put into current state. */ 3 63 2 state fixed bin, /* 0 - free 1 - assigning 2 - assigned */ 3 64 /* 3 - attaching 4 - attached 5 - completed. */ 3 65 3 66 /* * * * * ** Following fields are unique to RCS entry. */ 3 67 2 kind fixed bin, /* 1 => attach, 2 => assign */ 3 68 2 free_off bit (18), /* Offset of next free entry. 0 => not free. */ 3 69 2 user_off bit (18), /* Offset of next entry in user list. */ 3 70 2 device_off bit (18), /* Offset of device entry in RCPD. */ 3 71 2 volume_off bit (18), /* Offset of volume entry in RCPD. */ 3 72 2 rcse_off bit (18), /* Offset of associated RCS entry. */ 3 73 2 caller_level fixed bin, /* Caller's validation level. */ 3 74 2 disposition bit (1), /* ON => retain, OFF => unassign. */ 3 75 2 flags, /* Special info flags. */ 3 76 (3 device bit (1), /* ON => assigning a specific device. */ 3 77 3 priv bit (1), /* ON => attached with IOI privilege. */ 3 78 3 system bit (1), /* ON => assigned to a system process. */ 3 79 3 t_and_d bit (1), /* ON => T&D attachment. */ 3 80 3 volume bit (1), /* ON => volume associated with this device. */ 3 81 3 writing bit (1), /* ON => writing on volume. */ 3 82 3 have_auth bit (1), /* ON => tape volume authenticated. */ 3 83 3 need_auth bit (1), /* ON => tape volume needs authentication. */ 3 84 3 auth_set bit (1), /* ON => "have_auth" has been set. */ 3 85 3 preload_allowed bit (1), /* ON => preloading of volumes is allowed. */ 3 86 3 preloaded bit (1), /* ON => volume may be loaded on device. */ 3 87 3 not_removable_media bit (1), /* ON => cannot remove volume from device. */ 3 88 3 disk_ss_pack bit (1), /* ON => disk is a storage system volume. */ 3 89 3 disk_copy_of_ss_pack bit (1), /* ON => disk is a copy of a storage system volume. */ 3 90 3 disk_io_pack bit (1), /* ON => disk has label but is not storage system. */ 3 91 3 disk_unregistered bit (1), /* ON => disk is unregistered storage system volume. */ 3 92 3 disk_unreadable bit (1), /* ON => io error reading disk label. */ 3 93 3 must_auto_register bit (1), /* ON => unregistered volume requested */ 3 94 3 fips bit (1), /* ON => FIPS device. */ 3 95 3 no_protect bit (1), /* ON => device has no protect sw. */ 3 96 3 opr_int_available bit (1), /* ON => device connected to MPC with OI button. */ 3 97 3 unused bit (6), 3 98 3 volume_density_index fixed bin (3) unsigned, /* Density of volume */ 3 99 3 label_type fixed bin (6) unsigned)unaligned, /* Type of label read by RCP. */ 3 100 2 rcp_id bit (36), /* ID of this entry. */ 3 101 2 event_id fixed bin (71), /* Caller's event channel ID. */ 3 102 2 process_id bit (36), /* ID of calling process. */ 3 103 2 group_id char (32), /* Group ID of calling process. */ 3 104 2 ecode fixed bin (35), /* Assignment error code. */ 3 105 2 version_num fixed bin, /* Device info version number. */ 3 106 2 workspace_max fixed bin (19), /* Max size of IOI workspace buffer. */ 3 107 2 timeout_max fixed bin (71), /* Max IOI time-out interval. */ 3 108 2 ioi_index fixed bin, /* IOI device index. */ 3 109 2 workspace_ptr ptr, /* Pointer to IOI workspace buffer. */ 3 110 2 caller_comment char (64); /* Caller's comment. */ 3 111 3 112 /* End of include file ... rcp_com_seg.incl.pl1 */ 121 122 /* */ 123 /* Beginning of meter_rcp command. 124**/ 125 ecode, /* Initialize. */ 126 meter_index = 0; 127 device_flag = "1"b; 128 lock_flag, 129 long_flag, 130 reset_flag = "0"b; 131 132 if mrs_ptr = null () /* Do we have a meter_rcp_seg yet? */ 133 then do; /* No. */ 134 call INIT_MRS; /* Initialize this temporary work segment. */ 135 if ecode ^= 0 136 then return; 137 end; 138 139 call cu_$arg_count (num_args); /* Get number of command arguments. */ 140 141 do argx = 1 to num_args; /* Look at each one of them. */ 142 call PROCESS_ARG; /* Go process this argument. */ 143 if ecode ^= 0 /* Was there an error with this argument? */ 144 then return; /* Yes, abort the command. */ 145 end; 146 147 call GET_METERS; /* Get the meter data from RCP. */ 148 if ecode ^= 0 /* Any errors? */ 149 then return; 150 151 if (device_flag) | (lock_flag) /* Are we reporting any meters? */ 152 then call OUTPUT_TIME (meter_time, "Total time metered"); 153 154 if device_flag /* Does user want device meters? */ 155 then call METER_DEVICES; /* Yes. */ 156 157 if lock_flag /* Does user want lock meters? */ 158 then do; /* Yes, give him meters from both locks. */ 159 call METER_LOCK (1); /* RCS lock. */ 160 call METER_LOCK (2); /* RCPD lock. */ 161 end; 162 163 if reset_flag /* Should we save these meters? */ 164 then call RESET; /* Yes, future calculations based on this data. */ 165 166 return; 167 /* */ 168 PROCESS_ARG: procedure; 169 170 /* This procedure is called to process one command option argument. 171* * If this option argument is followed by a value argument then we 172* * we process that argument also. 173**/ 174 call cu_$arg_ptr (argx, arg_ptr, arg_len, ecode); 175 if ecode ^= 0 /* Did we get a pointer to this argument? */ 176 then do; /* No. */ 177 call com_err_ (ecode, "meter_rcp", "Error getting argument ^d", argx); 178 return; 179 end; 180 181 option = argument; /* Save command option argument. */ 182 183 do i = 1 to hbound (long_options, 1); /* See if command option is valid. */ 184 if (option = brief_options (i)) | /* Is it this brief option name? */ 185 (option = long_options (i)) /* Or this long option name? */ 186 then do; /* Yes, one of them. */ 187 call GET_VALUE (i); /* Get any accompanying value argument. */ 188 if ecode ^= 0 /* Check for errors. */ 189 then return; 190 goto OPTION (i); /* Go process this option. */ 191 end; 192 end; 193 194 ecode = error_table_$badopt; /* Option is not known. */ 195 call com_err_ (ecode, "meter_rcp", "Control argument: ^a", option); 196 return; 197 198 OPTION (1): /* "-a" or "-all" */ 199 lock_flag = "1"b; /* User wants lock meters, devices metered by default. */ 200 return; 201 202 OPTION (2): /* "-lock" */ 203 lock_flag = "1"b; /* User wants only lock meters. */ 204 device_flag = "0"b; /* He doesn't want device meters. */ 205 return; 206 207 OPTION (3): /* "lg" or "-long" */ 208 long_flag = "1"b; /* User wants long output format. */ 209 return; 210 211 OPTION (4): /* "-rs" or "-reset" */ 212 lock_flag, /* No meters typed. */ 213 device_flag = "0"b; 214 215 OPTION (5): /* "-rr" */ 216 reset_flag = "1"b; /* Reset meter data. */ 217 return; 218 219 OPTION (6): /* "-tp" or "-type" */ 220 meter_index = 1; /* 1 => list one device type. */ 221 device_type = argument; /* Get specified device type. */ 222 do i = 1 to hbound (device_types, 1); /* See if this is a valid device type. */ 223 if device_type = device_types (i) /* Is it this one? */ 224 then return; /* Yes, it is valid. */ 225 end; 226 ecode = error_table_$bad_arg; /* Device type is invalid. */ 227 call com_err_ (ecode, "meter_rcp", "Unknown device type: ^a", device_type); 228 return; 229 230 OPTION (7): /* "-dv" or "-device" */ 231 meter_index = 2; /* 2 => list one mdevice. */ 232 device_name = argument; /* Get specified device name. */ 233 return; 234 235 end PROCESS_ARG; 236 /* */ 237 GET_VALUE: procedure (option_num); 238 239 /* This procedure is called to get any value argument associated with this option. 240* * Processing of the value argument depends upon the option code value associated 241* * with this option. The option code values are: 242* * 0. This option argument has no accompanying value argument. 243* * 1. This option argument has a string type value argument. 244**/ 245 dcl option_num fixed bin; /* Number that identifies this option. */ 246 247 option_code = option_codes (option_num); /* Get code value for this option. */ 248 249 if option_code = 0 /* Is there an accompanying argument value? */ 250 then return; /* No, nothing else to do. */ 251 252 /* Get accompanying argument value. */ 253 if argx = num_args /* Is this the last argument? */ 254 then do; /* Yes, value argument missing. */ 255 ecode = error_table_$odd_no_of_args; 256 call com_err_ (ecode, "meter_rcp", "No value argument for ^a", option); 257 return; 258 end; 259 260 argx = argx + 1; /* Get the next argument. */ 261 call cu_$arg_ptr (argx, arg_ptr, arg_len, ecode); 262 if ecode ^= 0 263 then do; 264 call com_err_ (ecode, "meter_rcp", "Error getting argument ^d", argx); 265 return; 266 end; 267 268 if substr (argument, 1, 1) = "-" /* Is next argument a control option? */ 269 then do; /* Yes, value argument is missing. */ 270 ecode = error_table_$wrong_no_of_args; 271 call com_err_ (ecode, "meter_rcp", "No value argument for ^a", option); 272 return; 273 end; 274 275 end GET_VALUE; 276 /* */ 277 GET_METERS: procedure; 278 279 /* This procedure is called to get the meter information from RCP. 280* * We will put it in the new meter info. If we have done a reset 281* * then we will adjust the new meters based on the meter data that we 282* * have previously saved in the old meters area. 283**/ 284 rmi_ptr = mrs.rmi_ptr; /* Get pointer to where new structure will go. */ 285 rmi.head.version_num = 1; 286 call rcp_priv_$copy_meters (rmi_ptr, mrs.rmi_size, ecode); 287 if ecode ^= 0 288 then do; 289 call com_err_ (ecode, "meter_rcp", "Error copying RCP meters."); 290 return; 291 end; 292 293 meter_time = clock () - mrs.starting_time; 294 295 do i = 1 to rmi.head.tot_mdevices; /* Adjust meters for assigned devices. */ 296 mdevice_ptr = addr (rmi.mdevices (i)); 297 if mdevice.time_assigned ^= 0 298 then call ADD_ASSIGNED_METERS; 299 else histox = 0; 300 mrs.histox (i) = histox; /* Save current histogram index. */ 301 end; 302 303 if ^mrs.reset_flag /* Have we done a reset? */ 304 then return; /* No, use data as is. */ 305 306 ormi_ptr = mrs.ormi_ptr; /* Get pointer to old meter info. */ 307 do i = 1 to rmi.head.tot_mdevices; /* Adjust meters for all devices. */ 308 mdevice_ptr = addr (rmi.mdevices (i)); 309 omdevice_ptr = addr (ormi_ptr -> rmi.mdevices (i)); 310 mdevice.error_count = mdevice.error_count - omdevice.error_count; 311 mdevice.num_assigns = mdevice.num_assigns - omdevice.num_assigns; 312 mdevice.tot_assign_time = mdevice.tot_assign_time - omdevice.tot_assign_time; 313 do j = 1 to 4; 314 mdevice.histogram (j) = mdevice.histogram (j) - omdevice.histogram (j); 315 end; 316 end; 317 318 lock_info_ptr = addr (rmi.rcs_lock_info); /* Adjust RCS lock meters. */ 319 olock_info_ptr = addr (ormi_ptr -> rmi.rcs_lock_info); 320 do i = 1 to 2; /* Adjust both lock meters. */ 321 lock_info.num_locks = lock_info.num_locks - olock_info.num_locks; 322 lock_info.num_lock_waits = lock_info.num_lock_waits - olock_info.num_lock_waits; 323 lock_info.tot_lock_time = lock_info.tot_lock_time - olock_info.tot_lock_time; 324 lock_info.tot_wait_time = lock_info.tot_wait_time - olock_info.tot_wait_time; 325 lock_info_ptr = addr (rmi.rcpd_lock_info); /* Now adjust RCPD lock meters. */ 326 olock_info_ptr = addr (ormi_ptr -> rmi.rcpd_lock_info); 327 end; 328 329 end GET_METERS; 330 /* */ 331 ADD_ASSIGNED_METERS: procedure; 332 333 /* This procedure is called to meter a device that is currently assigned. 334* * The real meters are updated only when a device is unassigned. 335* * Thus they will not reflect the status of a device that is assigned. 336* * This procedure will adjust the meter data returned about this device 337* * so that it will include information about the assigned device. 338**/ 339 340 mdevice.num_assigns = mdevice.num_assigns + 1; 341 mdevice.tot_assign_time = mdevice.tot_assign_time + mdevice.time_assigned; 342 if mdevice.time_assigned > meter_time /* If assigned before reset use reset time. */ 343 then time_assigned = meter_time; 344 else time_assigned = mdevice.time_assigned; 345 seconds = divide (time_assigned, 1000000, 71, 0); 346 mdtype_ptr = addr (rmi.mdtypes (mdevice.dtypex)); 347 do j = 1 to hbound (mdtype.histo_times, 1); 348 if seconds < mdtype.histo_times (j) 349 then do; 350 histox = j; /* Save histogram slot that matches. */ 351 goto ADD_HISTO; 352 end; 353 end; 354 histox = hbound (mdevice.histogram, 1); /* Save histogram slot that matches. */ 355 356 ADD_HISTO: 357 mdevice.histogram (histox) = mdevice.histogram (histox) + 1; 358 359 end ADD_ASSIGNED_METERS; 360 /* */ 361 METER_DEVICES: procedure; 362 363 /* This procedure is called to meter the devices controlled by RCP. 364* * The meter_index variable is used to determine which devices are 365* * to have their meters reported. 366**/ 367 rmi_ptr = mrs.rmi_ptr; /* Report RCPD device meters. */ 368 goto METER (meter_index); /* Go to routine that will process correct devices. */ 369 370 METER (0): /* Meter all devices. */ 371 call ioa_ ("^/Meters for all devices:"); 372 if long_flag 373 then call ioa_ ("Number of devices^-= ^d", rmi.head.tot_mdevices); 374 do dtypex = 1 to rmi.head.tot_mdtypes; /* Process all device types. */ 375 mdtype_ptr = addr (rmi.mdtypes (dtypex)); /* Get pointer to device type info. */ 376 call METER_DTYPE; /* Report meters for this device type. */ 377 end; 378 return; 379 380 METER (1): /* Meter all devices of this type. */ 381 do dtypex = 1 to rmi.head.tot_mdtypes; /* Look for specified device type. */ 382 mdtype_ptr = addr (rmi.mdtypes (dtypex)); 383 if mdtype.device_type = device_type /* Is this the specified device type? */ 384 then do; /* Yes. */ 385 call METER_DTYPE; /* Process all devices of this type. */ 386 return; 387 end; 388 end; 389 ecode = error_table_$name_not_found; 390 call com_err_ (ecode, "meter_rcp", "Device type = ^a", device_type); 391 return; 392 393 METER (2): /* Meter specified mdevice. */ 394 do i = 1 to rmi.head.tot_mdevices; /* Look for device name. */ 395 mdevice_ptr = addr (rmi.mdevices (i)); 396 if mdevice.device_name = device_name /* Is this the specified device? */ 397 then do; /* Yes. */ 398 call METER_DEVICE; 399 return; 400 end; 401 end; 402 ecode = error_table_$name_not_found; 403 call com_err_ (ecode, "meter_rcp", "Device name = ^a", device_name); 404 405 end METER_DEVICES; 406 /* */ 407 METER_DTYPE: procedure; 408 409 /* This procedure is called to process the meters of all of the 410* * devices of the specified type. Note, the offsets of the 411* * dtype and device entries are relative to the base of RCPD. 412* * We must change them to be relative to our RCPD structure 413* * in meter_rcp_seg. 414**/ 415 if mdtype.num_devices = 0 /* Are there any devices of this type? */ 416 then return; /* No. */ 417 418 call ioa_ ("^/Meters for device type ^a:", mdtype.device_type); 419 420 do i = 1 to rmi.head.tot_mdevices; /* Check each device entry. */ 421 mdevice_ptr = addr (rmi.mdevices (i)); /* Get pointer to device entry. */ 422 if mdevice.dtypex = dtypex /* Is device of this type? */ 423 then call METER_DEVICE; /* Yes, report its meters. */ 424 end; 425 426 end METER_DTYPE; 427 428 429 430 431 METER_DEVICE: procedure; 432 433 /* This procedure is called to calculate and output the meter data about 434* * a specific mdevice. 435**/ 436 call ioa_ ("^5xMeters for ^a", mdevice.device_name); 437 438 call ioa_ ("^-Total assignments^-= ^4d", mdevice.num_assigns); 439 call ioa_ ("^-Total errors^-= ^4d", mdevice.error_count); 440 call OUTPUT_TIME (mdevice.tot_assign_time, " Total time assigned"); 441 work = divide (mdevice.tot_assign_time*100, meter_time, 35, 0); 442 call ioa_ ("^-% time assigned^-= ^4d %", work); 443 444 if ^long_flag 445 then return; 446 447 mdtype_ptr = addr (rmi.mdtypes (mdevice.dtypex)); 448 x = mdtype.histo_times (1) / 60; /* Convert to minutes. */ 449 y = mdtype.histo_times (2) / 60; 450 z = mdtype.histo_times (3) / 60; 451 452 call ioa_ ("^-Assignment Histogram:"); 453 call ioa_ ("^-Minutes: 0 - ^3d^-=>^4d", x, mdevice.histogram (1)); 454 call ioa_ ("^-^8x^3d - ^3d^-=>^4d", x, y, mdevice.histogram (2)); 455 call ioa_ ("^-^8x^3d - ^3d^-=>^4d", y, z, mdevice.histogram (3)); 456 call ioa_ ("^-^8x^3d - ?^-=>^4d", z, mdevice.histogram (4)); 457 458 end METER_DEVICE; 459 /* */ 460 METER_LOCK: procedure (lock_number); 461 462 /* This procedure is called to calculate and output the meter data 463* * for a given RCP lock. The argument specifies which lock. 464**/ 465 dcl lock_number fixed bin; /* 1 => RCS, 2 => RCPD. */ 466 467 rmi_ptr = mrs.rmi_ptr; /* Get pointer to meter info. */ 468 469 if lock_number = 1 /* Which lock are we metering? */ 470 then do; /* RCPD's lock. */ 471 call ioa_ ("^/Lock meters for rcp_com_seg:"); 472 lock_info_ptr = addr (rmi.rcs_lock_info); 473 end; 474 else do; /* RCS's lock. */ 475 call ioa_ ("^/Lock meters for rcp_data:"); 476 lock_info_ptr = addr (rmi.rcpd_lock_info); 477 end; 478 479 work = divide ((lock_info.tot_lock_time*100), meter_time, 35, 0); 480 call ioa_ ("% time locked^-= ^4d %", work); 481 482 work = divide ((lock_info.tot_wait_time*100), meter_time, 35, 0); 483 call ioa_ ("% time waiting^-= ^4d %", work); 484 485 if lock_info.num_locks = 0 486 then work = 0; 487 else work = divide ((lock_info.num_lock_waits)*100, lock_info.num_locks, 35, 0); 488 call ioa_ ("% number of waits^-= ^4d %", work); 489 490 if ^long_flag /* Does user want all lock info? */ 491 then return; /* No. */ 492 493 call ioa_ ("Total num of locks^-= ^4d", lock_info.num_locks); 494 call ioa_ ("Total num of waits^-= ^4d", lock_info.num_lock_waits); 495 496 call OUTPUT_TIME (lock_info.tot_lock_time, "Total time locked"); 497 call OUTPUT_TIME (lock_info.tot_wait_time, "Total time waiting"); 498 499 end METER_LOCK; 500 /* */ 501 OUTPUT_TIME: procedure (work_time, comment); 502 503 /* This procedure is called to convert a fixed bin time value into 504* * hours, minutes, and seconds. These values will be typed along 505* * with a specified comment. 506**/ 507 dcl comment char (*); /* Comment describing time. */ 508 dcl work_time fixed bin (71); /* Time value to be converted. */ 509 510 seconds = divide (work_time, 1000000, 35, 0); /* Convert to total seconds. */ 511 minutes = divide (seconds, 60, 35, 0); /* Now to total minutes. */ 512 hours = divide (minutes, 60, 35, 0); /* Now to total hours. */ 513 514 seconds = seconds - minutes * 60; /* Number of seconds in last minute. */ 515 minutes = minutes - hours * 60; /* Number of minutes in last minute. */ 516 517 call ioa_ ("^a^-= ^3d hours, ^2d minutes, ^2d seconds", 518 comment, hours, minutes, seconds); 519 520 end OUTPUT_TIME; 521 /* */ 522 RESET: procedure; 523 524 /* This procedure is called to save the current meter values. 525* * They will be saved in mrs.ormi_ptr->rmi. Since the data in 526* * mrs.rmi has been changed and made relative to the old data we 527* * must add the two together to get the original data. 528**/ 529 rmi_ptr = mrs.rmi_ptr; /* Get pointers to device meters. */ 530 ormi_ptr = mrs.ormi_ptr; 531 do i = 1 to rmi.head.tot_mdevices; /* Save data for each mdevice. */ 532 mdevice_ptr = addr (rmi.mdevices (i)); /* Get pointer to new device entry. */ 533 if mrs.histox (i) ^= 0 /* Did we adjust for an assigned device? */ 534 then do; /* Yes, subtract meters for assigned device. */ 535 histox = mrs.histox (i); 536 mrs.histox (i) = 0; 537 mdevice.num_assigns = mdevice.num_assigns - 1; 538 mdevice.histogram (histox) = mdevice.histogram (histox) - 1; 539 end; 540 omdevice_ptr = addr (ormi_ptr -> rmi.mdevices (i)); /* Get pointer to old device entry. */ 541 omdevice.error_count = omdevice.error_count + mdevice.error_count; 542 omdevice.num_assigns = omdevice.num_assigns + mdevice.num_assigns; 543 omdevice.tot_assign_time = omdevice.tot_assign_time + mdevice.tot_assign_time; 544 do j = 1 to 4; 545 omdevice.histogram (j) = omdevice.histogram (j) + mdevice.histogram (j); 546 end; 547 end; 548 549 lock_info_ptr = addr (rmi.rcs_lock_info); /* Now save lock meters. */ 550 olock_info_ptr = addr (ormi_ptr -> rmi.rcs_lock_info); /* RCS lock first. */ 551 do i = 1 to 2; /* Save calculations for both locks. */ 552 olock_info.num_locks = olock_info.num_locks + lock_info.num_locks; 553 olock_info.num_lock_waits = olock_info.num_lock_waits + lock_info.num_lock_waits; 554 olock_info.tot_lock_time = olock_info.tot_lock_time + lock_info.tot_lock_time; 555 olock_info.tot_wait_time = olock_info.tot_wait_time + lock_info.tot_wait_time; 556 lock_info_ptr = addr (rmi.rcpd_lock_info); /* Next do RCPD lock meters. */ 557 olock_info_ptr = addr (ormi_ptr -> rmi.rcpd_lock_info); 558 end; 559 560 mrs.reset_flag = "1"b; /* Make sure we know we have reset. */ 561 mrs.starting_time = mrs.starting_time + meter_time; 562 563 end RESET; 564 /* */ 565 INIT_MRS: procedure; 566 567 /* This procedure is called to initialize the meter_rcp_seg work segment. 568* * We will create a work segment in the user's process directory. 569* * In order to find the size of the meter data (since the number of 570* * device entries is not known) we must call RCP to copy out the meters. 571**/ 572 call hcs_$make_seg ("", "meter_rcp_seg", "", 01010b, mrs_ptr, ecode); 573 if ecode ^= 0 /* There should be no problems. */ 574 then do; /* But there is. */ 575 call com_err_ (ecode, "meter_rcp", "Error making meter_rcp_seg."); 576 return; 577 end; 578 579 rmi_ptr = addr (mrs.new_rmi); /* Initially use some very large size. */ 580 rmi.head.version_num = 1; /* Must set version number. */ 581 call rcp_priv_$copy_meters (rmi_ptr, 63*1024, ecode); 582 if ecode ^= 0 /* Can't go on if any trouble. */ 583 then do; 584 call com_err_ (ecode, "meter_rcp", "Error copying RCP meters."); 585 return; 586 end; 587 588 mrs.reset_flag = "0"b; /* Set up MRS header data. */ 589 mrs.rmi_size = fixed (rel (addr (rmi.end)), 18) - fixed (rel (rmi_ptr), 18); 590 mrs.rmi_bound = ((mrs.rmi_size + 1) / 2) * 2; 591 mrs.rmi_ptr = rmi_ptr; /* Save pointers to new and old areas. */ 592 mrs.ormi_ptr = addr (mrs.old_rmi); 593 mrs.tot_mdevices = rmi.head.tot_mdevices; 594 do i = 1 to rmi.head.tot_mdevices; 595 mrs.histox (i) = 0; 596 end; 597 mrs.starting_time = rmi.rcpd_lock_info.starting_time; 598 599 end INIT_MRS; 600 601 end meter_rcp; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 03/25/86 1119.8 meter_rcp.pl1 >spec>install>1033>meter_rcp.pl1 117 1 03/21/86 1306.7 rcp_device_types.incl.pl1 >spec>install>1033>rcp_device_types.incl.pl1 119 2 03/19/82 1647.0 rcp_meter_info.incl.pl1 >ldd>include>rcp_meter_info.incl.pl1 121 3 03/21/86 1306.7 rcp_com_seg.incl.pl1 >spec>install>1033>rcp_com_seg.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. addr builtin function dcl 102 ref 296 308 309 318 319 325 326 346 375 382 395 421 447 472 476 532 540 549 550 556 557 579 589 592 arg_len 000100 automatic fixed bin(17,0) dcl 34 set ref 174* 181 221 232 261* 268 arg_ptr 000102 automatic pointer dcl 35 set ref 174* 181 221 232 261* 268 argument based char unaligned dcl 65 ref 181 221 232 268 argx 000104 automatic fixed bin(17,0) dcl 36 set ref 141* 174* 177* 253 260* 260 261* 264* brief_options 000105 constant char(8) initial array unaligned dcl 89 ref 184 clock builtin function dcl 102 ref 293 com_err_ 000024 constant entry external dcl 110 ref 177 195 227 256 264 271 289 390 403 575 584 comment parameter char unaligned dcl 507 set ref 501 517* cu_$arg_count 000026 constant entry external dcl 111 ref 139 cu_$arg_ptr 000030 constant entry external dcl 112 ref 174 261 device_flag 000106 automatic bit(1) unaligned dcl 38 set ref 127* 151 154 204* 211* device_name based char(32) level 2 in structure "mdevice" dcl 2-31 in procedure "meter_rcp" set ref 396 436* device_name 000107 automatic char(32) unaligned dcl 39 in procedure "meter_rcp" set ref 232* 396 403* device_type 000117 automatic char(32) unaligned dcl 40 in procedure "meter_rcp" set ref 221* 223 227* 383 390* device_type based char(32) level 2 in structure "mdtype" dcl 2-26 in procedure "meter_rcp" set ref 383 418* device_types 000012 constant char(12) initial array unaligned dcl 1-25 ref 222 223 divide builtin function dcl 102 ref 345 441 479 482 487 510 511 512 dtypex 000105 automatic fixed bin(17,0) dcl 37 in procedure "meter_rcp" set ref 374* 375* 380* 382* 422 dtypex 10 based fixed bin(17,0) level 2 in structure "mdevice" dcl 2-31 in procedure "meter_rcp" ref 346 422 447 ecode 000127 automatic fixed bin(35,0) dcl 41 set ref 125* 135 143 148 174* 175 177* 188 194* 195* 226* 227* 255* 256* 261* 262 264* 270* 271* 286* 287 289* 389* 390* 402* 403* 572* 573 575* 581* 582 584* end based bit(36) level 2 dcl 2-11 set ref 589 error_count 11 based fixed bin(35,0) level 2 in structure "omdevice" dcl 81 in procedure "meter_rcp" set ref 310 541* 541 error_count 11 based fixed bin(35,0) level 2 in structure "mdevice" dcl 2-31 in procedure "meter_rcp" set ref 310* 310 439* 541 error_table_$bad_arg 000012 external static fixed bin(35,0) dcl 104 ref 226 error_table_$badopt 000014 external static fixed bin(35,0) dcl 104 ref 194 error_table_$name_not_found 000016 external static fixed bin(35,0) dcl 104 ref 389 402 error_table_$odd_no_of_args 000020 external static fixed bin(35,0) dcl 104 ref 255 error_table_$wrong_no_of_args 000022 external static fixed bin(35,0) dcl 104 ref 270 fixed builtin function dcl 102 ref 589 589 hbound builtin function dcl 102 ref 183 222 347 354 hcs_$make_seg 000032 constant entry external dcl 113 ref 572 head based structure level 2 dcl 2-11 histo_times 11 based fixed bin(17,0) array level 2 dcl 2-26 ref 347 348 448 449 450 histogram 20 based fixed bin(17,0) array level 2 in structure "omdevice" dcl 81 in procedure "meter_rcp" set ref 314 545* 545 histogram 20 based fixed bin(17,0) array level 2 in structure "mdevice" dcl 2-31 in procedure "meter_rcp" set ref 314* 314 354 356* 356 453* 454* 455* 456* 538* 538 545 histox based fixed bin(17,0) array level 2 in structure "mrs" dcl 67 in procedure "meter_rcp" set ref 300* 533 535 536* 595* histox 000133 automatic fixed bin(17,0) dcl 44 in procedure "meter_rcp" set ref 299* 300 350* 354* 356 356 535* 538 538 hours 000130 automatic fixed bin(17,0) dcl 42 set ref 512* 515 517* i 000131 automatic fixed bin(17,0) dcl 43 set ref 183* 184 184 187* 190* 222* 223* 295* 296 300* 307* 308 309* 320* 393* 395* 420* 421* 531* 532 533 535 536 540* 551* 594* 595* ioa_ 000034 constant entry external dcl 114 ref 370 372 418 436 438 439 442 452 453 454 455 456 471 475 480 483 488 493 494 517 j 000132 automatic fixed bin(17,0) dcl 43 set ref 313* 314 314 314* 347* 348 350* 544* 545 545 545* lock_flag 000134 automatic bit(1) unaligned dcl 45 set ref 128* 151 157 198* 202* 211* lock_info based structure level 1 dcl 3-46 lock_info_ptr 000200 automatic pointer dcl 3-22 set ref 318* 321 321 322 322 323 323 324 324 325* 472* 476* 479 482 485 487 487 493 494 496 497 549* 552 553 554 555 556* lock_number parameter fixed bin(17,0) dcl 465 ref 460 469 long_flag 000135 automatic bit(1) unaligned dcl 46 set ref 128* 207* 372 444 490 long_options 000051 constant char(16) initial array unaligned dcl 93 ref 183 184 mdevice based structure level 1 dcl 2-31 mdevice_ptr 000176 automatic pointer dcl 2-9 set ref 296* 297 308* 310 310 311 311 312 312 314 314 340 340 341 341 341 342 344 346 354 356 356 395* 396 421* 422 436 438 439 440 441 447 453 454 455 456 532* 537 537 538 538 541 542 543 545 mdevices based structure array level 2 dcl 2-11 set ref 296 308 309 395 421 532 540 mdtype based structure level 1 dcl 2-26 mdtype_ptr 000174 automatic pointer dcl 2-8 set ref 346* 347 348 375* 382* 383 415 418 447* 448 449 450 mdtypes 34 based structure array level 2 dcl 2-11 set ref 346 375 382 447 meter_index 000136 automatic fixed bin(17,0) dcl 47 set ref 125* 219* 230* 368 meter_time 000140 automatic fixed bin(71,0) dcl 48 set ref 151* 293* 342 342 441 479 482 561 minutes 000142 automatic fixed bin(17,0) dcl 49 set ref 511* 512 514 515* 515 517* mrs based structure level 1 dcl 67 mrs_ptr 000010 internal static pointer initial dcl 86 set ref 132 284 286 293 300 303 306 367 467 529 530 533 535 536 560 561 561 572* 579 588 589 590 590 591 592 592 593 595 597 new_rmi 12 based fixed bin(71,0) array level 2 dcl 67 set ref 579 null builtin function dcl 102 ref 132 num_args 000143 automatic fixed bin(17,0) dcl 50 set ref 139* 141 253 num_assigns 12 based fixed bin(35,0) level 2 in structure "omdevice" dcl 81 in procedure "meter_rcp" set ref 311 542* 542 num_assigns 12 based fixed bin(35,0) level 2 in structure "mdevice" dcl 2-31 in procedure "meter_rcp" set ref 311* 311 340* 340 438* 537* 537 542 num_devices 10 based fixed bin(17,0) level 2 dcl 2-26 ref 415 num_lock_waits 2 based fixed bin(35,0) level 2 in structure "olock_info" dcl 79 in procedure "meter_rcp" set ref 322 553* 553 num_lock_waits 2 based fixed bin(35,0) level 2 in structure "lock_info" dcl 3-46 in procedure "meter_rcp" set ref 322* 322 487 494* 553 num_locks 1 based fixed bin(35,0) level 2 in structure "lock_info" dcl 3-46 in procedure "meter_rcp" set ref 321* 321 485 487 493* 552 num_locks 1 based fixed bin(35,0) level 2 in structure "olock_info" dcl 79 in procedure "meter_rcp" set ref 321 552* 552 old_rmi based fixed bin(71,0) array level 2 dcl 67 set ref 592 olock_info based structure level 1 dcl 79 olock_info_ptr 000146 automatic pointer dcl 52 set ref 319* 321 322 323 324 326* 550* 552 552 553 553 554 554 555 555 557* omdevice based structure level 1 dcl 81 omdevice_ptr 000144 automatic pointer dcl 51 set ref 309* 310 311 312 314 540* 541 541 542 542 543 543 545 545 option 000150 automatic char(16) unaligned dcl 53 set ref 181* 184 184 195* 256* 271* option_code 000154 automatic fixed bin(17,0) dcl 54 set ref 247* 249 option_codes 000042 constant fixed bin(17,0) initial array dcl 97 ref 247 option_num parameter fixed bin(17,0) dcl 245 ref 237 247 ormi_ptr 000156 automatic pointer dcl 55 in procedure "meter_rcp" set ref 306* 309 319 326 530* 540 550 557 ormi_ptr 6 based pointer level 2 in structure "mrs" dcl 67 in procedure "meter_rcp" set ref 306 530 592* rcp_priv_$copy_meters 000036 constant entry external dcl 115 ref 286 581 rcpd_lock_info 20 based structure level 2 dcl 2-11 set ref 325 326 476 556 557 rcs_lock_info 4 based structure level 2 dcl 2-11 set ref 318 319 472 549 550 rcse based structure level 1 dcl 3-55 rel builtin function dcl 102 ref 589 589 reset_flag 000160 automatic bit(1) unaligned dcl 56 in procedure "meter_rcp" set ref 128* 163 215* reset_flag based bit(1) level 2 in structure "mrs" dcl 67 in procedure "meter_rcp" set ref 303 560* 588* rmi based structure level 1 dcl 2-11 rmi_bound 2 based fixed bin(17,0) level 2 dcl 67 set ref 300 300 533 533 535 535 536 536 590* 592 595 595 rmi_header based structure level 1 dcl 2-21 rmi_ptr 4 based pointer level 2 in structure "mrs" dcl 67 in procedure "meter_rcp" set ref 284 367 467 529 591* rmi_ptr 000172 automatic pointer dcl 2-7 in procedure "meter_rcp" set ref 284* 285 286* 295 296 307 308 318 325 346 367* 372 374 375 380 382 393 395 420 421 447 467* 472 476 529* 531 532 549 556 579* 580 581* 589 589 591 593 594 597 rmi_size 1 based fixed bin(19,0) level 2 dcl 67 set ref 286* 589* 590 seconds 000164 automatic fixed bin(17,0) dcl 58 set ref 345* 348 510* 511 514* 514 517* starting_time 10 based fixed bin(71,0) level 2 in structure "mrs" dcl 67 in procedure "meter_rcp" set ref 293 561* 561 597* starting_time 32 based fixed bin(71,0) level 3 in structure "rmi" dcl 2-11 in procedure "meter_rcp" set ref 597 substr builtin function dcl 102 ref 268 time_assigned 000162 automatic fixed bin(71,0) dcl 57 in procedure "meter_rcp" set ref 342* 344* 345 time_assigned 16 based fixed bin(71,0) level 2 in structure "mdevice" dcl 2-31 in procedure "meter_rcp" ref 297 341 342 344 tot_assign_time 14 based fixed bin(71,0) level 2 in structure "mdevice" dcl 2-31 in procedure "meter_rcp" set ref 312* 312 341* 341 440* 441 543 tot_assign_time 14 based fixed bin(71,0) level 2 in structure "omdevice" dcl 81 in procedure "meter_rcp" set ref 312 543* 543 tot_lock_time 6 based fixed bin(71,0) level 2 in structure "lock_info" dcl 3-46 in procedure "meter_rcp" set ref 323* 323 479 496* 554 tot_lock_time 6 based fixed bin(71,0) level 2 in structure "olock_info" dcl 79 in procedure "meter_rcp" set ref 323 554* 554 tot_mdevices 2 based fixed bin(17,0) level 3 in structure "rmi" dcl 2-11 in procedure "meter_rcp" set ref 295 307 372* 393 420 531 589 593 594 tot_mdevices 3 based fixed bin(17,0) level 2 in structure "mrs" dcl 67 in procedure "meter_rcp" set ref 593* tot_mdtypes 1 based fixed bin(17,0) level 3 dcl 2-11 ref 296 308 309 374 380 395 421 532 540 589 tot_wait_time 10 based fixed bin(71,0) level 2 in structure "olock_info" dcl 79 in procedure "meter_rcp" set ref 324 555* 555 tot_wait_time 10 based fixed bin(71,0) level 2 in structure "lock_info" dcl 3-46 in procedure "meter_rcp" set ref 324* 324 482 497* 555 version_num based fixed bin(17,0) level 3 dcl 2-11 set ref 285* 580* work 000165 automatic fixed bin(35,0) dcl 59 set ref 441* 442* 479* 480* 482* 483* 485* 487* 488* work_time parameter fixed bin(71,0) dcl 508 ref 501 510 x 000166 automatic fixed bin(17,0) dcl 60 set ref 448* 453* 454* y 000167 automatic fixed bin(17,0) dcl 60 set ref 449* 454* 455* z 000170 automatic fixed bin(17,0) dcl 60 set ref 450* 455* 456* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. based_rcp_id based structure level 1 dcl 3-26 dtype_num_qualifiers internal static fixed bin(17,0) initial array dcl 1-29 rcs based structure level 1 dcl 3-30 rcs_ptr automatic pointer dcl 3-23 rcse_ptr automatic pointer dcl 3-24 NAMES DECLARED BY EXPLICIT CONTEXT. ADD_ASSIGNED_METERS 001572 constant entry internal dcl 331 ref 297 ADD_HISTO 001645 constant label dcl 356 ref 351 GET_METERS 001273 constant entry internal dcl 277 ref 147 GET_VALUE 001072 constant entry internal dcl 237 ref 187 INIT_MRS 003347 constant entry internal dcl 565 ref 134 METER 000007 constant label array(0:2) dcl 370 ref 368 METER_DEVICE 002203 constant entry internal dcl 431 ref 398 422 METER_DEVICES 001650 constant entry internal dcl 361 ref 154 METER_DTYPE 002124 constant entry internal dcl 407 ref 376 385 METER_LOCK 002555 constant entry internal dcl 460 ref 159 160 OPTION 000000 constant label array(7) dcl 198 ref 190 OUTPUT_TIME 003054 constant entry internal dcl 501 ref 151 440 496 497 PROCESS_ARG 000576 constant entry internal dcl 168 ref 142 RESET 003145 constant entry internal dcl 522 ref 163 meter_rcp 000472 constant entry external dcl 11 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 4016 4056 3655 4026 Length 4350 3655 40 255 140 2 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME meter_rcp 582 external procedure is an external procedure. PROCESS_ARG internal procedure shares stack frame of external procedure meter_rcp. GET_VALUE internal procedure shares stack frame of external procedure meter_rcp. GET_METERS internal procedure shares stack frame of external procedure meter_rcp. ADD_ASSIGNED_METERS internal procedure shares stack frame of external procedure meter_rcp. METER_DEVICES internal procedure shares stack frame of external procedure meter_rcp. METER_DTYPE internal procedure shares stack frame of external procedure meter_rcp. METER_DEVICE internal procedure shares stack frame of external procedure meter_rcp. METER_LOCK internal procedure shares stack frame of external procedure meter_rcp. OUTPUT_TIME internal procedure shares stack frame of external procedure meter_rcp. RESET internal procedure shares stack frame of external procedure meter_rcp. INIT_MRS internal procedure shares stack frame of external procedure meter_rcp. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 mrs_ptr meter_rcp STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME meter_rcp 000100 arg_len meter_rcp 000102 arg_ptr meter_rcp 000104 argx meter_rcp 000105 dtypex meter_rcp 000106 device_flag meter_rcp 000107 device_name meter_rcp 000117 device_type meter_rcp 000127 ecode meter_rcp 000130 hours meter_rcp 000131 i meter_rcp 000132 j meter_rcp 000133 histox meter_rcp 000134 lock_flag meter_rcp 000135 long_flag meter_rcp 000136 meter_index meter_rcp 000140 meter_time meter_rcp 000142 minutes meter_rcp 000143 num_args meter_rcp 000144 omdevice_ptr meter_rcp 000146 olock_info_ptr meter_rcp 000150 option meter_rcp 000154 option_code meter_rcp 000156 ormi_ptr meter_rcp 000160 reset_flag meter_rcp 000162 time_assigned meter_rcp 000164 seconds meter_rcp 000165 work meter_rcp 000166 x meter_rcp 000167 y meter_rcp 000170 z meter_rcp 000172 rmi_ptr meter_rcp 000174 mdtype_ptr meter_rcp 000176 mdevice_ptr meter_rcp 000200 lock_info_ptr meter_rcp THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return mpfx2 ext_entry trunc_fx2 divide_fx1 divide_fx3 divide_fx4 clock THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ cu_$arg_count cu_$arg_ptr hcs_$make_seg ioa_ rcp_priv_$copy_meters THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$bad_arg error_table_$badopt error_table_$name_not_found error_table_$odd_no_of_args error_table_$wrong_no_of_args LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000471 125 000477 127 000501 128 000503 132 000506 134 000512 135 000513 139 000515 141 000524 142 000533 143 000534 145 000536 147 000540 148 000541 151 000543 154 000555 157 000560 159 000562 160 000566 163 000572 166 000575 168 000576 174 000577 175 000614 177 000616 178 000652 181 000653 183 000660 184 000665 187 000702 188 000704 190 000707 192 000711 194 000713 195 000716 196 000754 198 000755 200 000757 202 000760 204 000762 205 000763 207 000764 209 000766 211 000767 215 000771 217 000773 219 000774 221 000776 222 001003 223 001007 225 001016 226 001020 227 001023 228 001061 230 001062 232 001064 233 001071 237 001072 247 001074 249 001077 253 001101 255 001104 256 001107 257 001145 260 001146 261 001147 262 001164 264 001166 265 001222 268 001223 270 001230 271 001233 272 001271 275 001272 277 001273 284 001274 285 001300 286 001302 287 001315 289 001317 290 001347 293 001350 295 001355 296 001365 297 001400 299 001404 300 001405 301 001420 303 001422 306 001426 307 001431 308 001441 309 001454 310 001465 311 001473 312 001501 313 001504 314 001511 315 001516 316 001520 318 001522 319 001525 320 001530 321 001535 322 001545 323 001553 324 001556 325 001561 326 001564 327 001567 329 001571 331 001572 340 001573 341 001600 342 001603 344 001611 345 001612 346 001616 347 001623 348 001631 350 001636 351 001640 353 001641 354 001643 356 001645 359 001647 361 001650 367 001651 368 001655 370 001657 372 001672 374 001720 375 001731 376 001735 377 001736 378 001740 380 001741 382 001751 383 001755 385 001761 386 001762 388 001763 389 001765 390 001770 391 002026 393 002027 395 002037 396 002052 398 002056 399 002057 401 002060 402 002062 403 002065 405 002123 407 002124 415 002125 418 002131 420 002151 421 002161 422 002174 424 002200 426 002202 431 002203 436 002204 438 002227 439 002250 440 002274 441 002314 442 002324 444 002344 447 002347 448 002355 449 002364 450 002371 452 002376 453 002415 454 002441 455 002473 456 002525 458 002554 460 002555 467 002557 469 002563 471 002566 472 002601 473 002604 475 002605 476 002620 479 002623 480 002632 482 002655 483 002665 485 002710 487 002715 488 002723 490 002743 493 002746 494 002767 496 003010 497 003033 499 003053 501 003054 510 003065 511 003073 512 003075 514 003077 515 003104 517 003111 520 003144 522 003145 529 003146 530 003152 531 003155 532 003165 533 003200 535 003213 536 003214 537 003216 538 003224 540 003227 541 003243 542 003247 543 003253 544 003256 545 003263 546 003270 547 003272 549 003274 550 003277 551 003302 552 003307 553 003315 554 003321 555 003324 556 003327 557 003332 558 003335 560 003337 561 003342 563 003346 565 003347 572 003350 573 003414 575 003416 576 003446 579 003447 580 003453 581 003455 582 003471 584 003473 585 003523 588 003524 589 003526 590 003551 591 003564 592 003565 593 003572 594 003576 595 003606 596 003617 597 003621 599 003626 ----------------------------------------------------------- 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