1 /* BEGIN INCLUDE FILE as_meter_table.incl.pl1 */ 2 3 /* This include file describes the segment as_meter_table, normally found in >sc1. 4 5 This segment contains meters of the resources used by various subsystems of the 6 answering service. Real time, virtual cpu time, and page faults are metered. 7 In addition, there are counters of various events of interest, such as logins. 8 Care is taken to avoid double counting in cases of recursive entry to a subsystem, 9 or cases where one subsystem calls another and both are being metered. 10 11 Updates to this segment are made primarily by as_meter_, whose enter and exit 12 entry points are called by the subsystems just after entry and just before exit. 13 In addition, some procedures keep a pointer to this segment and update it directly. 14 This segment is printed by the as_meters command; this can be done by any 15 process that has read access to this segment. 16 17 The segment is truncated and reinitialized at each startup. 18 Each entry in the table is permanently assigned to a particular subsystem. 19 The assignments are defined in as_meter_numbers.incl.pl1. 20 21 Several variables are declared fixed bin (34). The intention is to avoid the 22 generation of code that does double word arithmetic when adding to these variables. 23 24 The two switches (asmt.update_in_progress and asmte.x) are declared fixed bin so that the as_meters command can 25 implement the -reset option by means of a structure subtraction statement (rather than individual subtraction 26 statements for all variables in the structure except the two switches), and be able to be compiled 27 with no warnings. For that reason, any new switches should be declared fixed bin. 28 29 Written March 1980 by Tom Casey 30 Modified May 1981 by T. Casey to add cells to meter cost of doing this metering. 31 Modified June 1981 by T. Casey for MR9.0 to add 17th entry for TRYLOG_ABS_METER. 32 Modified August 1981 by T. Casey for MR9.0 to change the switches from bit to fixed bin. 33 */ 34 35 36 /****^ HISTORY COMMENTS: 37 1) change(86-11-13,Herbst), approve(87-07-21,MCR7694), 38 audit(87-07-21,GDixon), install(87-08-04,MR12.1-1056): 39 Changed to determine number of as_meter slots (entries) based upon the 40 variable hbound(AS_METER_NAMES,1) which is declared in 41 as_meter_numbers.incl.pl1. 42 END HISTORY COMMENTS */ 43 44 45 dcl ASMT_VERSION_1 fixed bin int static options (constant) init (1); 46 47 dcl 1 asmt aligned based (asmtp), 48 2 version fixed bin, 49 2 update_in_progress fixed bin, /* table is inconsistent when this word is ^=0 */ 50 2 startup_clock fixed bin (71), /* time at startup */ 51 2 latest_clock fixed bin (71), /* time at latest metering update */ 52 2 startup_vcpu fixed bin (71), /* vcpu used prior to startup */ 53 2 latest_vcpu fixed bin (71), /* current total vcpu usage of initializer process */ 54 2 startup_pf fixed bin (34), /* page faults taken prior to startup */ 55 2 latest_pf fixed bin (34), /* current total page faults taken by initializer process */ 56 2 global_entered fixed bin, /* count of subsystems entered but not yet exited */ 57 2 logins (3) fixed bin, /* count of interactive, absentee, and daemon logins */ 58 2 logouts (3) fixed bin, /* count of interactive, absentee, and daemon logouts */ 59 2 asmt_count fixed bin (34), /* count of calls to asmt entry points */ 60 2 asmt_real_time fixed bin (71), /* real time spent in those entry points */ 61 2 asmt_vcpu fixed bin (71), /* virtual cpu time spent in those entry points */ 62 2 asmt_pf fixed bin (34), /* page faults taken while in those entry points */ 63 2 asmt_pad (7) fixed bin, /* pad header to 32 words */ 64 2 entry (hbound(AS_METER_NAMES,1)) aligned like asmte; /* 32 word entries */ 65 66 dcl 1 asmte aligned based (asmtep), 67 2 entered fixed bin (34), /* if nonzero, subsystem has been entered but not yet exited */ 68 2 entry_count fixed bin (34), /* total entries to subsystem in this bootload */ 69 2 update_clock fixed bin (71), /* time of entry or exit (whichever has happened last) */ 70 2 tot_real_time fixed bin (71), /* total real time in subsystem, including called subsystems */ 71 2 real_time fixed bin (71), /* real time in subsystem, excluding called subsystems */ 72 2 x_real_time fixed bin (71), /* exclude this from tot_real to get real, at next exit */ 73 2 entry_vcpu fixed bin (71), /* vcpu usage at entry to subsystem */ 74 2 tot_vcpu fixed bin (71), /* total vcpu used in subsystem, including called subsystems */ 75 2 vcpu fixed bin (71), /* vcpu used in subsystem, excluding called subsystems */ 76 2 x_vcpu fixed bin (71), /* exclude this from tot_vcpu to get vcpu, at next exit */ 77 2 entry_pf fixed bin (34), /* page faults at entry to subsystem */ 78 2 tot_pf fixed bin (34), /* total page faults in subsystem, including called subsystems */ 79 2 pf fixed bin (34), /* page faults in subsystem, excluding called subsystems */ 80 2 x_pf fixed bin (34), /* exclude this from tot_pf to get pf, at next exit */ 81 2 x fixed bin, /* ^=0 if subsystem has nonzero x values at the moment */ 82 2 recursive_entry_count fixed bin (34), /* number of entries that were recursive */ 83 2 asmte_pad (8) fixed bin; /* pad entry to 32 words */ 84 85 /* END INCLUDE FILE as_meter_table.incl.pl1 */