Thread View: alt.sys.pdp10
4 messages
4 total messages
Started by jayjwa
Sat, 21 Nov 2026 17:26
GETTAB vs GETAB in T10/T20 and getting sysinfo
Author: jayjwa
Date: Sat, 21 Nov 2026 17:26
Date: Sat, 21 Nov 2026 17:26
157 lines
7821 bytes
7821 bytes
I'm working on a project and I need to get some system info. The program
should run under TOPS-10 and TOPS-20 both and is in assembly. I wrote it
for TOPS-10, thinking that the UUOSYM package would handle the support
for T20. This has been mostly true, with exception for GETTAB/GETAB. T20
uses SYSGT/GETAB instead. This has resulted in my using conditional
assembly, depending on what system the program is being built for.
I need the following data points that are fetchable via GETTAB in T10,
but not in T20:
* last reload reason
* system memory size
* number of jobs logged in
According to the MCRM, that info seems like it should be in the SYSTAT
table. I've been looking in the MCRM book for days and I can't find the
place to get this info. Basically, the T10 part of the program works;
the T20 part is missing the above data points or returning incorrect
data in the case of the number of jobs logged in. The real number should
be around a dozen.
Since the program is long and messy, I'll only post the routine that
handles this part of the program (unless the full thing really is needed
to find an answer). Location DEBUG+3 is an example of the wrong data
being returned. I tried "51" and a whole bunch of other table
locations. Nothing in the manual specifically says "number of running
jobs" like it does in the T10 MCR manual.
subttl GETTAB Tables Routine
; Get various data points via GETTAB or GETAB monitor call.
; TOPS-10 and TOPS-20 do not share this info, even with UUOSYM.
; This means we have to fetch the same info in a different way
; depending on the system we're assembling for. Ouch.
getcnf: IFG TOPS10, <
move t1, [%CNWHY] ; Why monitor was reloaded
gettab t1, ; Fetch data point
jrst [ERROUT (%CNWHY)] ; Exit on error
movem t1, rereas ; Stash reload reason
OUTSIX (rereas)
outstr crlf
move t1, [%CNSIZ] ; System memory size in words
gettab t1,
jrst [ERROUT (%CNSIZ)]
movem t1, memsiz ; Stash memory size
outstr [asciz /System memory size (words): /]
move p1, memsiz ; Fetch memsiz
movei p2, 12 ; Decimal output I guess?
push p, p1 ; Push param on stack for itoa
push p, p2 ; Indicate base
pushj p, itoa ; Prints to TTY
outstr crlf
move t1, [%CNLNM] ; Number of jobs logged in
gettab t1,
jrst [ERROUT (%CNLNM)]
movem t1, numjob ; Stash num of jobs logged in
outstr [asciz /Number of jobs logged in: /]
move p1, numjob ; Fetch numjob
movei p2, 12 ; Num jobs output in decimal
push p, p1 ; Push param on stack for itoa
push p, p2 ; Indicate decimal base
pushj p, itoa ; Print to TTY
outstr crlf
move t1, [%CNVER] ; Monitor version number
gettab t1,
jrst [ERROUT (%CNVER)]
movem t1, monver ; Stash monitor version number
outstr [asciz /Monitor version: /]
move p1, monver ; Fetch monver integer
movei p2, 10 ; This is octal, believe it or not
push p, p1 ; Setup itoa
push p, p2 ; Ensure octal output
pushj p, itoa ; Print to TTY
outstr crlf
> ; End of T10-specific code
IFG TOPS20, <
; TOPS-20 uses GETAB%, not GETTAB. See section 2.3.2 MCRM. Table numbers
; are listed via MONSYM (Appendix B-31) or ask SYSGT% for them.
debug: move t1, [sixbit /SYSTAT/] ; Request SYSTAT table number
sysgt%
hrrz t1, t2 ; Load returned table number
hrli t1, 51 ; Number of jobs?
getab% ; Index,, table number
jrst [ERROUT (GETAB)]
movem t1, numjob ; Stash processes
outstr [asciz /Number of jobs logged in: /]
move p1, numjob ; Fetch numjob
movei p2, 12 ; Num jobs output in decimal
push p, p1 ; Push param on stack for itoa
push p, p2 ; Indicate decimal base
pushj p, itoa ; Print to TTY
outstr crlf
setz cx, ; Zero looper index
move t1, [sixbit /SYSVER/] ; Ask for this table number
sysgt% ; SIXBIT name in T1
get.1:! hrrz t1, t2 ; Load table number, zero rest
hrl t1, cx ; Index increments upward
getab% ; Index into table,, table num
jrst [ERROUT (GETAB)] ; If error
movem t1, monver(cx) ; Else stash mon ver ASCIZ
INC (cx)
caige cx, mversz ; Filled monitor name block?
jrst get.1 ; Loop for more otherwise
outstr monver ; Print
> ; End of T20-specific code
popj p, ; Return to caller
Basically, the T20 code block doesn't work correctly (aside from the
monitor version part - I did figure that out) on T20. T10 works.
.exec 10ftch
LINK: Loading
[LNKXCT 10FTCH execution]
""8"" 8"""88 8""""8 8""""8 88 eeeeee
8 8 8 8 8 8 8 8 8
8e 8 8 8eeee8 8eeeee 8 8 8
88 8 8 88 88 eeee 8 8 8
88 8 8 88 e 88 8888 8 8
88 8eeee8 88 8eee88 8888 8eeee8
Active PPN: 30,1
TTY Line: TTY4
POWER
System memory size (words): 105472
Number of jobs logged in: 15
Monitor version: 70400
@exec 10ftch
MACRO: 10ftch
LINK: Loading
[LNKXCT 10FTCH execution]
""8"" 8"""88 8""""8 8""""8 eeee eeeeee
8 8 8 8 8 8 8 8 8
8e 8 8 8eeee8 8eeeee 8 8 8
88 8 8 88 88 eeee eee8 8 8
88 8 8 88 e 88 8 8 8
88 8eeee8 88 8eee88 8eee 8eeee8
Active PPN: 30,1
TTY Line: TTY44
Number of jobs logged in: 284
AMATSU KLH, PANDA TOPS-20 Monitor 7.1(21733)-4
Yeah, that "jobs" data is not correct and I have no idea where to get
the 'last reload reason' nor system memory size from. How to get those 3
data points for last reload, system memory size, and number of jobs
running from within my program?
--
PGP Key ID: 781C A3E2 C6ED 70A6 B356 7AF5 B510 542E D460 5CAE
"The Internet should always be the Wild West!"
Re: GETTAB vs GETAB in T10/T20 and getting sysinfo
Author: Rich Alderson
Date: Sun, 22 Nov 2026 00:43
Date: Sun, 22 Nov 2026 00:43
360 lines
19064 bytes
19064 bytes
I'm not going to quote your program fragment.
The information you want is found in chapter 2 of the Monitor Calls Reference
Manual, section 2.3.2 System Tables (page 2-27 in the text version fo the
manual found in the DOC: directory).
Since you don't read manuals, I reproduce the entirety of the section here:
2.3.2 System Tables
The contents of several system tables are available to programs for such
purposes as generating status reports and collecting system performance
statistics. Each table is identified by a fixed name of up to six characters,
and consists of a variable number of entries. The -1 entry in each table is the
negative of the number of data entries in the table; the data entries are
identified by an index that increments from 0.
Two calls exist for accessing tables. The first, SYSGT, accepts a table name
and returns the table length, its first data entry, and a number identifying the
table. The second, GETAB, accepts the table number returned by SYSGT, or
obtained from the MONSYM file, and returns additional entries from the table.
The system tables are as follows. Numeric table indexes are given in octal.
Parallel tables, those for which a given index produces related information, are
indicated by "(Pn)" where n is a unique number for that set of parallel tables.
Table 2-2: System Tables
Name Index Contents
APRID Processor serial number
ACTJOB Range of active jobs on the system from lowest
job in use to highest job in use (not including
Job 0).
BLDTD Date and time system was generated
CSTAT CI statistics table
0 CI packets sent
1 CI packets received
2 SCA overhead messages sent
3 SCA overhead messages received
4 MSCP driver messages sent
5 MSCP driver messages received
6 MSCP server messages sent
7 MSCP server messages received
10 CFS messages sent
11 CFS messages received
12 SCS% messages sent
13 SCS% messages received
14 CI command queue 0
15 CI command queue 1
16 CI command queue 2
17 CI command queue 3
20 IP datagrams sent
21 IP datagrams received
22 DECnet datagrams sent
23 DECnet datagrams received
24 SCS% datagrams sent
25 SCS% datagrams received
26 MSCP driver datagrams received
27 HSCP error-log datagrams received (ppd byte 5)
DBUGSW Debugging information
0 state of system operation
0 = normal
1 = debugging
2 = standalone
3 = standalone fast startup
1 state of BUGCHK handling
0 = proceed
1 = breakpoint
DEVCHR (P1) Device characteristics word, as described under
the DVCHR JSYS in Chapter 3, except that B5
(DV%AV) is not meaningful.
DEVNAM (P1) SIXBIT device name including unit number,
e.g., MTA3
DEVUNT (P1) LH: Job number to which device is assigned (with
ASND), or -1 if device is not assigned, or -2 if
reserved for device allocator.
RH: unit number, or -1 if device has no units (for
example, DSK:)
DRMERR Information on drum errors
0 number of recoverable errors
1 to n varies depending on type of drum being used
DSKERR Information on disk errors
0 number of recoverable disk errors
1 to n varies depending on type of disk being used
DWNTIM Downtime information
0 date and time when system will be shut down next
1 date and time when system will subsequently be up
HQLAV High queue load averages
JBONT Job # Owning job for CRJOB-created jobs.
JOBNAM Job # LH: reserved for DEC
RH: index into the system program tables for the
system program being used by this job
(determined by the last SETSN call executed by
the job)
JOBPNM Job # SIXBIT name of program running in this job
JOBRT Job # CPU time used by the job (negative if no such job)
JOBTTY Job # LH: controlling terminal line number, or -1 if none
(job is detached)
RH: reserved for Digital
LOGDES Logging information
0 designator for logging information
1 designator for job 0 and error information
LQLAV Low queue load averages
MONVER Monitor version number (contents of location 137)
NCPGS One-word table containing number of pages of
real (physical) user core available in system.
Note that this value includes resident
variables, and thus not all of the pages can be
assigned to a user process.
NETRDY ARPANET operational status table
0 0 IMP down
.GT.0 IMP going down
-1 IMP up
1 0 = network off,
non-zero = network on
2 flags for NETSER (not for user)
3 time of last NCP cycle up
4 last IMP GOING DOWN message
B0-15 reserved
B16-17 0 panic
1 scheduled hardware PM
2 software reload
3 emergency restart
B18-21 number of 5-minute intervals before IMP
goes down
B22-31 number of 5-minute intervals IMP will be down
5 time of last IMP ready drop
6 time of last IMP ready up
7 time of IMP GOING DOWN message
NSWPGS Default swapping pages
PTYPAR Pseudo-TTY parameter information
0 LH: number of PTYs in system
RH: TTY number of first PTY
QTIMES 0 to n Accumulated runtime of jobs on the n scheduler queues
SCOUNT (P3) Count of SETSN JSYSs for each subsystem
SNAMES (P3) SIXBIT name of system program, or 0 if this
entry is unused in this and the corresponding
four tables.
SNBLKS (P3) Number of samples in working set size integral
SPFLTS (P3) Total number of page faults of system program
SSIZE (P3) Time integral of working set size
STIMES (P3) Total runtime of system program
SYMTAB SIXBIT table names of all GETAB tables
SYSTAT Monitor statistics. The entries in this table
are as follows:
0 time with no runnable jobs
1 waiting time with 1 or more runnable
jobs (waiting for page swapping)
2 time spent in scheduler
3 time spent processing pager traps
4 number of drum reads
5 number of drum writes
6 number of disk reads
7 number of disk writes
10 number of terminal wakeups
11 number of terminal interrupts
12 time integral of number of processes
in the balance set
13 time integral of number of runnable
processes
14 exponential 1-minute average of
number of runnable processes
15 exponential 5-minute average of
number of runnable processes
16 exponential 15-minute average of
number of runnable processes
17 time integral of number of processes
waiting for the disk
20 time integral of number of processes
waiting for the drum
21 number of terminal input characters
22 number of terminal output characters
23 number of system core management
cycles
24 time spent doing postpurging
25 number of forced balance set process
removals
26 time integral of number of processes
in swap wait
27 scheduler overhead time (same as
entry 2) in high precision units
30 idle time (same as entry 0) in high
precision units
31 lost time (same as entry 1) in high
precision units
32 user time
33 time integral of number of processes
on high queue. (High queue is high
priority, low numerical value.)
34 time integral of number of processes
on low queue. (Low queue is low
priority, high numerical value.)
35 sum of process disk-write waits
36 number of forced adjustments to
balance set
37 integral of number of reserve pages
of all processes in memory
40 integral of number of pages on
replaceable queue. The replaceable
queue contains pointers to all free
memory pages.
41 high precision pager trap time
42 number of context switches
43 high precision time spent on
background tasks. These tasks
include low-level data transfer in
communications layers, including
network and terminal service
routines.
44 total system page traps
45 total saves from replacement queue.
A "save" occurs when a desired page
is found on the replacement queue
and need not be paged in.
46 number of pages removed from memory
during system-wide garbage
collection
47 integral of number of working sets
in memory
50 wait time without swap waits in high
precision units
51 count of working set loads
52 count of runable processes removed
from balance set
53 number of pages removed from memory
during process-wide garbage
collection
54 count of terminal input wakeups
55 count of read-after-write disk
verifications
56 lowest,,highest active job on the
system (does not include job 0)
57 operator,,user jobs logged into this
system (does not include not logged
in jobs)
NOTE
This table is subject to
change (usually additions)
as measuring routines are
added to the system.
SYSVER An ASCIZ string identifying the system name,
version, and date. The string has the following
format:
string, TOPS-20 Monitor n.m(o)-p
where "string" is the text contained in the file
structure:<SYSTEM>MONNAM.TXT, "n" is the major
version number (1 to 3 digits), "m" is the minor
version number (0 to 2 digits), "o" is the edit
number (1 to 6 digits), and "p" is the number of
the group that last edited the version (0 or 1
digit).
If "m" is zero, it and its preceding period are
omitted. If "p" is zero, it and its preceding
hyphen is omitted. Otherwise, the period and
the hyphen are stored along with the other
information, including the spaces and
parentheses as shown, in the table.
TICKPS One-word table containing number of clock ticks
per second.
TTYJOB line # LH: positive job number for which this is the
controlling terminal, or -1 for unassigned line,
or -2 for line currently being assigned, or job
number to which this line is assigned.
RH: -1 if no process is waiting for input from this
terminal; other than -1 if some process is
waiting for input.
WHOJOB Number of operator jobs and user jobs logged in
(not including Job 0).
The system program being run by a specific job may be determined from SNAMES,
using an index obtained from table JOBNAM.
The following monitor calls are used for obtaining information. Calls marked
with an asterisk ("*") require privileges for specific functions.
CNFIG% Returns system configuration information
ERSTR Translates an error number to a string
ESOUT Returns an error string
GETAB Returns a word from a system table
GETER Returns the last error condition
GETJI Returns job information for specified job
GETNM Returns the program name being used by the job
GJINF Returns job information for current job
GTAD Returns the system's date
GTDAL Returns the disk allocation of a directory
GTDIR* Returns directory information
GTRPI Returns the paging trap information
GTRPW Returns the trap words
HPTIM Returns the high-precision clock values
LATOP%* Performs Local Area Transport (LAT) functions
MRECV* Retrieves IPCF message
MSEND* Sends IPCF message
MSTR* Performs structure-related functions
MUTIL* Performs IPCF functions
NTINF% Returns generic network information
SKED* Manipulates scheduler data base
SYSGT Returns values for a system table
RUNTM Returns the runtime of a job or process
TIME Returns the time since the system was restarted
--
Rich Alderson news@alderson.users.panix.com
Audendum est, et veritas investiganda; quam etiamsi non assequamur,
omnino tamen proprius, quam nunc sumus, ad eam perveniemus.
--Galen
Re: GETTAB vs GETAB in T10/T20 and getting sysinfo
Author: jayjwa
Date: Sun, 22 Nov 2026 21:52
Date: Sun, 22 Nov 2026 21:52
75 lines
3899 bytes
3899 bytes
Rich Alderson <news@alderson.users.panix.com> writes:
> Since you don't read manuals, I reproduce the entirety of the section here:
I do, just my manual is older than the in-system one. The in-system one
is harder to use because I have to use "more", rely on the terminal's
scroll back, or use TERMINAL PAUSE (ON) END-OF-PAGE . Usually I have a
PDF open in xpdf, because it has a search function and is more
readable. This is the version you quoted which is the text of the
in-system one:
http://bitsavers.informatik.uni-stuttgart.de/pdf/dec/pdp10/TOPS20/V7/JSYS_REFERENCE.MEM.txt
This is what I usually work off of:
http://bitsavers.informatik.uni-stuttgart.de/pdf/dec/pdp10/TOPS20/AA-4166E-TM_TOPS-20_Monitor_Calls_Reference_Ver_5_Dec82.pdf
The info I needed was actually in the newer manual. I've made this
mistake before but will now be more attentive to manual versions.
> CNFIG% Returns system configuration information
> ERSTR Translates an error number to a string
> ESOUT Returns an error string
> GETAB Returns a word from a system table
> GETER Returns the last error condition
> GETJI Returns job information for specified job
> GETNM Returns the program name being used by the job
> GJINF Returns job information for current job
> GTAD Returns the system's date
> GTDAL Returns the disk allocation of a directory
> GTDIR* Returns directory information
> GTRPI Returns the paging trap information
> GTRPW Returns the trap words
> HPTIM Returns the high-precision clock values
> LATOP%* Performs Local Area Transport (LAT) functions
> MRECV* Retrieves IPCF message
> MSEND* Sends IPCF message
> MSTR* Performs structure-related functions
> MUTIL* Performs IPCF functions
> NTINF% Returns generic network information
> SKED* Manipulates scheduler data base
> SYSGT Returns values for a system table
> RUNTM Returns the runtime of a job or process
> TIME Returns the time since the system was restarted
I still don't see the function "why the system was reloaded" for
TOPS-20, even in the above. I'm going to punt on that info and use
another data point instead because I want to move on with the project.
.exec 10ftch
LINK: Loading
[LNKXCT 10FTCH execution]
...
Active PPN: 30,1
TTY Line: TTY4
Processor serial num: 1025
System memory size (words): 105472
Number of jobs logged in: 15
Monitor version: 70400
@exec 10ftch
MACRO: 10ftch
LINK: Loading
[LNKXCT 10FTCH execution]
...
Active PPN: 30,1
TTY Line: TTY44
Processor serial num: 3600
System memory size (pages): 8092
Number of jobs logged in: 12
Monitor version: AMATSU KLH, PANDA TOPS-20 Monitor 7.1(21733)-4
That looks correct and I can add more stuff later.
--
PGP Key ID: 781C A3E2 C6ED 70A6 B356 7AF5 B510 542E D460 5CAE
"The Internet should always be the Wild West!"
Re: GETTAB vs GETAB in T10/T20 and getting sysinfo
Author: Rich Alderson
Date: Tue, 24 Nov 2026 03:43
Date: Tue, 24 Nov 2026 03:43
28 lines
2055 bytes
2055 bytes
jayjwa <jayjwa@atr2.ath.cx.invalid> writes:
[ snip ]
> I still don't see the function "why the system was reloaded" for
> TOPS-20, even in the above. I'm going to punt on that info and use
> another data point instead because I want to move on with the project.
https://bitsavers.org/pdf/dec/pdp10/TOPS10_softwareNotebooks/vol17/AA-4181B-TK_USAGE_File_Specification_Jul82.pdf
The USAGE file specifications are the only thing shared between Tops-10 and
TOPS-20 other than the similarity of names. These are the accounting files for
the system, and contain lots of use{ful,less} information on who used the
system and for what purpose, and includes the information entered by the
operator on "Why reload?".
There are example programs in FORTRAN and COBOL for parsing these files
included. I found the COBOL program to be easier to understand, although
FORTRAN was my first language.
(In fact, I used the COBOL source as a template for an accounting program on
CP-V on the museum's Sigma 7, but COBOL turned out not to be fully installed.)
--
Rich Alderson news@alderson.users.panix.com
Audendum est, et veritas investiganda; quam etiamsi non assequamur,
omnino tamen proprius, quam nunc sumus, ad eam perveniemus.
--Galen
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads