Using Multics

From Multics Wiki
Jump to: navigation, search

This page contains a collection of topics on using Multics.

Logging In

Once you connect to a Multics system, you will see a prompt like this:

Multics MR12.8: Installation and location (Channel d.h000)
Load = 5.0 out of 90.0 units: users = 5, 08/18/23  1126.6 pst Fri

You can type "help" here, in which you'll get a list of the most common commands available here:

help
Examples of correct login:
   login  Person_name projectid
   enterp Special_name projectid
   enter  Special_name projectid
Upper and lower case letters are different.
Check any typing conventions for your terminal.
Contact your administrator for more help.

Please try to login again or type "help" for instructions.

If you have an account on the system, you should use the "login" command to log in. For anonymous access, you can use either the "enter" or "enterp" commands. There are other options available at this prompt, including the "ttp" command, which will display your current "terminal type" or set your terminal type.

Logging into an Existing Account

To login, enter a command such as:

login Repair

You will be prompted for a the password for the "personid" Repair. If the password is correct, you will be logged in as "Repair" in whatever project is the default project for "Repair".

You can use "l" as a shortcut for "login".

For the first login to a cold-booted (or QuickStart) Multics system, the only interactive login accounts available are Repair.SysAdmin and Repair.SysDaemon. The password for the "Repair" personid is "repair". The first time you login as "Repair" you will be required to change the password.

l Repair
Password:
You must use the -change_password option to change your password.
Please try to login again or type "help" for instructions.

To change your password during login, use either the -change_password or -cpw control argument to the login command. You will be prompted for the old password, and (twice) for the new password.

l Repair -cpw
Password:
New Password:
New Password Again:
Password changed.
You are protected from preemption.
Repair.SysAdmin logged in 03/22/16  1648.8 pst Tue from ASCII terminal "none".

New messages in message_of_the_day:

Welcome to the Multics System.

print_motd:  Created >user_dir_dir>SysAdmin>Repair>Repair.value.
r 16:48 1.056 31

Note that the default project for Repair is SysAdmin. Repair is also registered on the SysDaemon project. You should refrain from logging in as Repair.SysDaemon, as users on the SysDaemon project have read/write access to virtually everything and can very easily damage the file system in ways that make it unbootable. Of course, there may be times when you need to login to this project.

If you don't want to login with the default project, you can specify another project during login:

Multics MR12.7: Installation and location (Channel d.h000)
Load = 5.0 out of 90.0 units: users = 5, 07/28/21  1551.4 pst Wed
l Repair SysDaemon
Password:
You are protected from preemption.
Repair.SysDaemon logged in 07/28/21  1552.6 pst Wed from ASCII terminal "none".

New messages in message_of_the_day:

Welcome to the Multics System.

print_motd:  Created >user_dir_dir>SysDaemon>Repair>Repair.value.
r 15:52 0.362 21


Note that upon login, Multics will display a "ready message", indicating that it is ready for you to enter commands:

r 16:52 1.253 21

Logging in as an Anonymous User

if you don't have an account on a Multics system, the administrator may have enabled Guest logins. There are two kinds of Guest logins: those that require a password and those that don't. We will explore those without passwords here.

To login to Multics on the Guest project as an anonymous user, use the "enter" or "e" login command:

Multics MR12.7: Installation and location (Channel d.h001)
Load = 6.0 out of 90.0 units: users = 6, 07/28/21  1618.9 pst Wed
enter Swenson Guest
You are protected from preemption until 16:19.
Anonymous user Swenson.Guest logged in 07/28/21  1619.0 pst Wed from ASCII terminal "none".

r 16:19 0.319 19

You may use any Personid you like. I used my real Personid, above, but I really am logged in anonymously. You can verify this with the "who" command:

Multics MR12.7, load 7.0/90.0; 7 users, 2 interactive, 5 daemons.
Absentee users 0/3
Repair.SysAdmin
anonymous.Guest

r 16:19 0.041 2

In this case, you may or may not have access to write to your home directory. If your project has been setup such that your home directory is your project directory (e.g. >udd>Guest), you will likely not have access to write to this directory. If, however, the administrator has set up your project directory to be somewhere else (e.g. >udd>Guest>anonymous), then you will likely be able to write to this directory.

To find out your home directory use the "home_dir" or "hd" command:

hd
>udd>Guest>anonymous
r 16:22 0.017 0
 

In the above example, your home directory is ">udd>Guest>anonymous", and you probably have write access. If, however, you see this:

hd
>udd>Guest
r 16:22 0.017 0
 

you will not most likely not have write access to your home directory. If you wish to create files, you will have to use your process directory. Your process directory will have a pathname like:

>process_dir_dir>!BLLDlXdBBBBBBB

You can use the command/active function "process_dir" or "pd" to determine your process directory. To change directories to your process directory, for example, use this command:

cwd [pd]
r 17:43 0.113 2

pwd
>process_dir_dir>!BLLDlXdBBBBBBB
r 17:43 0.069 0

You will have write access to your process directory, where you can create, edit, etc. files. Note, however, that your process directory will be deleted upon logout. If you wish to have permanent file storage, either use a non-Guest account or ask your system administrator (which may be you!) to create a writeable home directory for Guest anonymous logins. See Giving Guest Users a Writeable Home Directory.

Getting Around

If you are like most of us, you haven't used Multics in decades.  :-) Or you might never have used Multics before. Probably the most important few things to learn immediately are these:

  1. To change working directories, use the "change_wdir" or "cwd" command. Do NOT use "cd", which, on Multics, is "create_directory".
  2. The pathname separator is ">" rather than "/" or "\".
  3. "ls -l", which on Linux gives you a "long" listing, will list only "links". You probably want "ls -a" which shows you segments, directories, multi-segment files (MSFs), and links.

When you first login, you will find yourself in your home directory. Your home directory is located under your project directory. And the project directory is located under the directory >user_dir_dir (or >udd). Your home directory will therefore generally have this form:

>udd>Project>Personid

If user Personid is Swenson and your Project is SysAdmin, your home directory will (by default) be:

>udd>SysAdmin>Swenson

If you want to change directories to your project directory, you can use relative or absolute pathnames. Using absolute pathnames, you would type:

cwd >udd>SysAdmin

If your working directory is currently >udd>SysAdmin>Swenson, and you wish to change to the parent (Project) directory, you can use relative paths:

cwd <

Creating Directories

To create a directory, use the "create_dir" or "cd" command. For example:

cd exciting_project

Listing the Contents of a Directory

To list the contents of a directory, use the "ls" command. Note, however, that Multics, unlike most systems these days, will "ls" exactly what you ask it to. If you just type:

ls >udd>SysAdmin

it will dutifully show you:

ls >udd>SysAdmin

Directories = 1.

sma  SysAdmin
       sa

r 18:57 0.110 0

To list the contents of the >udd>SysAdmin directory, type:

ls >udd>SysAdmin>**

However, this is probably still not quite what you want, since typing that command will result in:

ls >udd>SysAdmin>**
Segs=0;Msfs=0;Dmfs=0;Dirs=15;Links=0.

r 18:58 0.225 1

This is because you didn't tell the "ls" command what you wanted to list, and it, by default, only shows you segments, and if there are none, gives you the totals of all the various "entry" types.

To see everything under the >udd>SysAdmin directory, use this:

ls >udd>SysAdmin>** -a

Directories = 4.

sma  admin
       a
sma  library
       lib
       l
sma  Repair
sma  SA1
       sa1

r 18:01 0.215 0

This shows you that under this directory, there only exist directories.

Entry Names

Each directory entry name (e.g. segments, directories, MSFs, and links) can have 1 or more names. The first name is typically called the "primary name" and the other names are called "addnames". In the example, above, you can see that the "admin" directory has an "addname" or "a" and the "library" directory has two addnames: "lib" and "l".

To add a new name to an entry, use the "add_name" or "an" command. For example:

cd foo
r 18:03 0.041 1

an foo bar
r 18:03 0.077 3

ls foo

Directories = 1.

sma  foo
       bar

r 18:03 0.065 0

Your start_up.ec

When get a new process, either by logging in or executing the "new_proc" command, by default, Multics will look for and execute your start up script, called start_up.ec. The "ec" stands for "exec_com", which is the scripting language available on Multics. Process initialization looks for this script in your home directory. If it doesn't find one there, it looks in your project directory, and if it doesn't find one there looks in >system_control_1>start_up.ec.

If it finds a start_up.ec, it executes it, passing it two parameters. The first parameter is either "login" or "new_proc". While many start_up.ec scripts ignore their parameters, these can be used to differentiate between the two ways you can get a new process. The second parameter is either "interactive" or "absentee". Interactive processes are those attached to a terminal and initially created through a login. Absentee processes are background processes that you can schedule. You do not need to be logged in interactively in order to have absentee processes running on your behalf.

Unless you or someone else has created a start_up.ec for you in your home or project directory, the system will execute the start_up.ec found in >system_control_1>start_up.ec. The contents of this segment are shown below:

pr >sc1>start_up.ec

                    start_up.ec         03/22/16  1812.0 pst Tue


&  ******************************************************
&  *                                                    *
&  * Copyright, (C) Honeywell Bull Inc., 1987           *
&  *                                                    *
&  * Copyright (c) 1972 by Massachusetts Institute of   *
&  * Technology and Honeywell Information Systems, Inc. *
&  *                                                    *
&  ******************************************************

&
&
&  HISTORY COMMENTS:
&   1) change(87-08-12,GDixon), approve(88-08-15,MCR7969),
&      audit(88-08-03,Lippard), install(88-08-29,MR12.2-1093):
&      Change to call print_motd instead of using the print command to print
&      the message of the day. (phx15921)
&                                                       END HISTORY COMMENTS
&
&
& start_up.ec -- default start_up for >sc1
& this exec com just prints the motd to duplicate the old behavior of
& process_overseer_.
&
& It is executed by all users (with standard process overseers) who
& lack start_up.ec in their homedir and project dir.
&
&command_line off
&goto &ec_name

&label start_up
&if [equal &1 login] &then print_motd
&quit


r 18:12 0.449 0

You will notice that this start_up.ec uses "&1" to access the first parameter ("login" or "new_proc"). In this case, it only prints the message of the day ("print_motd" or "pmotd") upon login, and not for new_proc.

The second thing you may notice is the contruction:

&goto &ec_name

Any exec_com can have multiple "addnames" on it. This &goto command will transfer control to the "&label" whose name is equal to the name used to invoke the exec_com. This allows you to group multiple exec_com scripts into one segment and branch to the correct one depending on which name was used to invoke it. Of course, to make this work, you must add names to the segment for each of these "entrypoints".

For info on exec_com syntax and functionality, type "help exec_com" or see the documentation on "exec_com" in the "Commands and Active Functions" manual, AG92.

A More Useful Start_up.ec

Below, you will find another example of a start_up.ec.

&version 2
&trace &command off
&-
&- Enable abbreviations in commands
&-
abbrev
&-
&- Add >doc>privileged to your info search paths
&-
asp info >doc>privileged
&-
&- Make C compiler accessible/usable
&-
asr >sl3p>c_compiler>e
asp info >sl3p>c_compiler>info
&-
&- For interactive logins:
&-
&if [equal &2 interactive] &then &do
&-
&-    Set terminal type;
&-
stty -ttp VT102_132C_50L
&-
&-    invoke video system;
&-
wdc invoke
&-
&-   and Turn on command line history editing and recall.
&-
ih attach
&-
&-    On systems with several users registered:
&-      - Accept interactive messages
&-
accept_messages
&-
&-      - Check for mail/messages
&-
have_mail
&-
    &end
&-
&quit

The comments in the above start_up.ec explain what the corresponding commands do. Note that this exec_com starts with "&version 2". This enables the "new" (version 2) functionality of exec_com. As you can guess, there was a more limited "version 1" before the "new" version. (Yes, I mean "new" in the 1980s). See the documentation on "exec_com" for details.

Abbrevs

When you login, the command processor (command_processor_$command_processor_) evaluates command as you type them on your terminal. You can enable an alternate command processor, abbrev$abbrev_processor that expands abbreviations in your command lines before passing them to command_processor_$command_processor_. You enable "abbrevs" by typing the "abbrev" command, or, more practically, by putting the "abbrev" command in your start_up.ec.

To add an abbrev, you use a command like the following:

.ab cd format_line "You really don't want to type 'cd' do you?"

This defines an abbrev called "cd" that, when typed at the beginning of the line (".ab" rather than ".a") will expand to the command:

format_line "You really don't want to type 'cd' do you?"

format_line is a command and active function that will format a string (with substitutions) and display it on the terminal (or return it as a string when invoked as an active function).

To list your abbrevs, use the ".l" command:

To execute a command without expanding abbrevs, preface the command with ". " (that is, a "." followed by a SPACE).

For more information on abbrev, type "help abbrev"

Editing Files

You have multiple editors available to choose from on Multics. Here is a list of a few:

  • Emacs
  • qedx
  • edm
  • Teco

Emacs

Emacs is, well, Emacs. If you don't know what Emacs is, or how to use it, you are one very sad individual. Of course, the Emacs that you probably know and love is a lot more feature rich than the one on Multics. But yes, Multics Emacs is written in MacLisp and runs quite well.

You invoke emacs with the "emacs" command, and exit it with the Control-x Control-c key binding. For help with emacs, type "help emacs" (outside of emacs). You can type Escape-x help <CR> inside emacs for some brief help and pointers to more documentation. Of course, you can also learn lots more about Emacs by reading the various Multics Emacs manuals.

Emacs works best when you have enabled the "video system". You do that with the "wdc invoke" command. You can only use the video system if your terminal type supports it. One that does is "VT102_132C_50L". As an example of setting your teminal type, enabling the video system, and enabling command line editing and recall, use these commands (or put them in your start_up.ec so that they are executed automatically when you login):

stty -ttp VT102_132C_50L
wdc invoke
ih attach
 

If for some reason you don't want to use the video system, and haven't set your terminal type to one that Emacs will support ("help stty"), then emacs will prompt you for a terminal type upon startup. Assuming you are connected to Multics via telnet, answer "vt102" if you haven't set up any better terminal types.

In this case, you may wish to have an abbrev to invoke emacs:

.ab emacs emacs -ttp vt102 -ll 132 -pl 50 

This tells emacs to use the "vt102" terminal type and to set the line length to 132 characters and the page length to 50 characters.

The preferred method of invoking emacs, however, is with the video system enabled ("wdc invoke").

qedx

QEDX is a simple non-WYSIWYG editor. Do a "help qedx" for help or see the documentation on QEDX in the "Commands and Active Functions" manual, AG92.

As a simple example, to create a new file with the contents:

&version 2
&trace &command off
&print hello there
&quit

You could do the following:

qedx
a
&version 2
&trace &command off
&print hello there
&quit
\f
w foo.ec
q

The "a" command puts you in append mode. The following lines up to the "\f" are the desired contents of the segment. The "\f" command ends input. The "w" command saves the contents of the edit buffer to a segment whose name is specified as the argument to the "w" command. And the "q" command quits qedx.

Other useful commands are:

  • i - insert mode (inserts above the current position in the edit buffer)
  • a - append mode (inserts below the current position in the edit buffer)
  • s/XXX/YYY/ - substitutes YYY for XXX in the current line
  • r - reads in a segment

edm

This editor is like qedx. Do a "help edm" for details.

Teco

I'm not going to touch this with a 10-foot pole. Only crazy hackers use Teco. (By the way, the first Emacs i ever used was written in Teco. And you wrote customizations to Emacs in Teco. I learned Teco so that I could customize Emacs. Thank goodness Emacs was rewritten in MacLisp.

If you really want to use Teco, do a "help teco" or see the documentation on this editor in the manuals.

Getting Help

All the commands and active functions, as well as many (most/) of the subroutines are documented online in what are called "info segments". These are text files so you can read them into Emacs or display their contents with the "pr" command. However, a much more useful command is "help", which will look for an info segment of the specified name (e.g. "help abbrev") and prompt you to display the various parts of the documentation. Try it.

If you are trying to locate an info segment, but don't know its name, try the "list_help" or "lh" command. This will display the names of all the info segments whose names include the substring you provide as a parameter to "lh".

Command Levels and Errors

When you first login, the system responds with a "ready" message. This "ready" message looks like this, by default:

r 18:54 2.000 90

To find out how to customize it, type "help general_ready" or "help gr". You can also find more info with "lh ready".

When you get an error, a "condition" is signaled and a recursive command level is entered. The ready message shows this in the following way:

r 18:56 0.097 0 level 2

The number after "level" is the depth of the command levels. You can also get to a new command level, interrupting the executing program, by pressing the Control-c command. Doing so causes Multics to display:

 
QUIT
r 18:57 0.068 0 level 3

To throw away the current program execution (stack frames), you can use the "release" or "rl" command. To release all recursive command levels and return to level 1, you can type "rl -all".

If you have interrupted a program (with Control-C) and wish to resume it, use the "start" or "sr" command.

As an example of a signaled condition causing a recursive command level, consider the following PL/1 program:

pr foo.pl1

                    foo.pl1   03/22/16  1900.7 pst Tue


foo: procedure options(variable);

   dcl a fixed bin;
   dcl b fixed bin;

     a = 10;
     b = a/0;
end foo;


r 19:00 0.148 0

If you compile this program:

pl1 foo.pl1
PL/1 33e
r 19:01 0.272 13

and run it:

foo

Error:  Attempt to divide by zero at >user_dir_dir>SysAdmin>Repair>foo|11 (line 7)
(while in operator divide_fx1)
system handler for error returns to command level
r 19:01 0.168 0 level 2

you will get a recursive command level.

If you try to "start" this command,

sr

Error:  Attempt to divide by zero at >user_dir_dir>SysAdmin>Repair>foo|11 (line
\c 7)
(while in operator divide_fx1)
system handler for error returns to command level
r 19:02 0.204 0 level 2

You will not be able to and will be returned to the current command level. To release this command level, do:

rl
r 19:02 0.022 0

What To Do If You Get an Unexpected Error

If you do get a recursive command level due to an error that you don't think is your own fault and can't otherwise explain -- especially if you think it is due to an simulator error -- you can invoke the "probe" command, and within "probe", the "stack" ("sk") command to get a bit more info as to the cause of the error. See below:

foo

Error:  Attempt to divide by zero at >user_dir_dir>SysAdmin>Repair>foo|11 (line
\c 7)
(while in operator divide_fx1)
system handler for error returns to command level
r 14:57 0.250 0 level 2

probe
Condition zerodivide raised at line 7 of foo (level 4).
sk
 11          command_processor_
 10          release_stack
  9          unclaimed_signal
  8          wall
  7          any_other.2
  6          wall                                          error
  5          any_other.2
  4          foo (line 7)                                  zerodivide
  3          command_processor_
  2          listen_
  1          initialize_process_

As you can see, the zerodivide condition was raised as a result of the code at line 7 in the "foo" executable, which was invoked from the command_processor_. You can exit out of "probe" with the "q" command or hunt around for more info.

You can also use the "trace_stack" ("ts") command to trace the stack after an exception. See below for example output:

ts
system handler for error returns to command level
Machine conditions not available.

234|5160    default_error_handler_$wall|2671 (bound_error_handlers_|2671)
  Cannot get line number in default_error_handler_
  2671   000622700100     tsx0    pr0|622 call_ext_out_desc
  Argument list pointer: 234|5136
          No arguments.

234|5060    initialize_process_$any_other.2|426 (bound_process_init_|426)
  Cannot get line number in initialize_process_
   426   000617700100     tsx0    pr0|617 call_ent_var
  Argument list pointer: 234|5006
          ARG  1: 234|4160 stack_4|4160
          ARG  2: "zerodivide"
          ARG  3: 77777|1 null pointer|1
          ARG  4: 77777|1 null pointer|1
          ARG  5: "0"b

234|4520    signal_$signal_|1467 (bound_library_1_|11205)
  Cannot get line number in signal_
 11205   000616700100     tsx0    pr0|616 call_ent_var_desc
  Argument list pointer: 234|4246
          Warning: arg 1 packed mismatch: 0 supplied, 1 expected.
          ARG  1: "zerodivide"
          ARG  2: 234|4160 stack_4|4160
          ARG  3: 77777|1 null pointer|1
          ARG  4: 77777|1 null pointer|1

234|4100    return_to_ring_0_|0
          Bad argument pointer.
          on "cleanup"  call restart_fault|1

Attempt to divide by zero at >user_dir_dir>SysAdmin>Repair>foo|11 (line 7)
(while in operator divide_fx1)  (zerodivide condition)
  foo.pl1 (line 7): b = a/0;
    11   001262700100     tsx0    pr0|1262 divide_fx1

Machine registers at time of fault

pr0 (ap)  234|3760            stack_4|3760
pr1 (ab)  234|3734            stack_4|3734
pr2 (bp)  374|17              foo|17
pr3 (bb)  234|3640            stack_4|3640
pr4 (lp)  247|54376           !BBBKKPFblfpMpH.area.linker|54376  (linkage|0 for
\c foo)
pr5 (lb)  247|4052            !BBBKKPFblfpMpH.area.linker|4052  (internal stati
\cc|0 for init_vol_header_)
pr6 (sp)  234|3640            stack_4|3640
pr7 (sb)  234|0               stack_4|0

x0     12   x1      0   x2     66   x3  26724
x4     21   x5      2   x6      0   x7  26362
a 000000000000  q 000050000000  e 0
Timer reg - 41477, Ring alarm reg - 0

SCU Data:

  4210    400257050040 000000000035 400234000000 000000000000
          026731400200 003776000000 000016507100 200000371502

Divide Check Fault (35)
By: 257|26731 pl1_operators_|6421  (bound_library_wired_|26731)
Referencing: 234|3776 stack_4|3776
On: cpu a (#0)
Indicators:  zero, ^bar
APU Status:  sd-on, pt-on, fap
Instructions:
  4216   0 00016 5071 00      dvf       pr0|16
  4217   2 00000 3715 02      epp5      pr2|0,qu

Time stored: 03/23/16  1457.1 pst Wed (147262037442100574)
Ring:          4

234|3640    foo$foo|11  (line 7) in operator divide_fx1
  foo.pl1 (line 7): b = a/0;
    11   001262700100     tsx0    pr0|1262 divide_fx1
  Argument list pointer: 234|3206
          Command name: foo
          No arguments.

234|2700    command_processor_$command_processor_|2101 (bound_multics_bce_|2101
\c)
  Cannot get line number in command_processor_
  2101   000623700100     tsx0    pr0|623 call_ext_out
  Argument list pointer: 234|2564
          ARG  1: 234|2640 stack_4|2640
          ARG  2: 4
          ARG  3: 0
          on "command_abort_"  call command_processor_|1140 (bound_multics_bce_
\c|1140)

234|2400    listen_$listen_|554 (bound_command_loop_|34522)
  Cannot get line number in listen_
 34522   000623700100     tsx0    pr0|623 call_ext_out
  Argument list pointer: 234|2242
          ARG  1: "exec_com >user_dir_dir>SysAdmin>Repair>start_up.ec new_proc 
\cinteractive"
          on "cleanup"  call listen_|271 (bound_command_loop_|34237)

234|2000    initialize_process_$initialize_process_|704 (bound_process_init_|70
\c4)
  Cannot get line number in initialize_process_
   704   000616700100     tsx0    pr0|616 call_ent_var_desc
  Argument list pointer: 234|0
          No arguments.
          on "any_other"  call initialize_process_|411 (bound_process_init_|411
\c)

End of trace.

r 14:58 2.000 4 level 2

Any information that you're willing to post to the relevant mailing list to help us find and fix simulator bugs would be greatly appreciated. Use the dps8m-users@lists.sourceforge.net mailing list to report such errors.

Printing Files

In order to queue a segment for printing, use the "enter_output_request" ("eor") command. For help on this command, type "help eor". Segments queued for printing will be printed when the printer becomes idle, as long as the printer daemon is running. After a cold boot of Multics, or when running the QuickStart, there is one printer daemon configured for the device "prta". However, unless you specifically start the daemon, no printer requests will be served. To start the printer daemon, you can use the Initializer command:

x io

This will send the appropriate commands to the IO.SysDaemon (prta) daemon to begin processing requests from the queue.

Note: the "old" way to queue a segment for printing was to use the "dprint" ("dp") command. While this command still works, it has been functionally replaced with the preferred "enter_output_request" command.

DPS8M Specific Info

The DPS8M simulator supports the printer devices (e.g. prta) creating files on the host system, in the directory where you started the simulator (e.g. in the QuickStart_MR12.6f directory). The file will have a filename following the pattern: <device-name>.spool.<request-id>.<personid>.<projectid>.<tag>.<random-string>. For example:

prta.spool.10001.Repair.SysAdmin.a.TP02yP

The simulator doesn't actually print the file for you, it just creates it. You are free to "print" it any way you'd like. One option is to use the "enscript" program to convert the "lineprinter" output to a PDF, and then use your operating system facilities for printing the PDF.

Shutting Down Multics

You shut down Multics by entering commands on the operator console. First, get the attention of the Initializer process by typing the Esc key. The operator console should respond with:

M->

Then, log out all the daemons:

M-> logout * * *

Ready
M->
 

Press the Esc key to "give up the console" so that the Initializer process can logout all the daemons. If you don't press Esc, you'll have to wait a bit before the console times out.

You should see output similar to this:

CONSOLE: RELEASED

 1603  as   LOGOUT             IO.SysDaemon.z dmn cord   0: 0 $0.02 (looc)
 1603  as   LOGOUT             Backup.SysDaemon.z dmn bk   0: 0 $0.03 (looc)
 1603  as   LOGOUT             IO.SysDaemon.z dmn prta   0: 0 $0.02 (looc)
 1603  as   LOGOUT             Utility.SysDaemon.z dmn ut   0: 2 $1.82 (looc)
 1603  as   LOGOUT             Volume_Dumper.Daemon.z dmn vinc   0: 0 $0.03 (looc)
 

Give the system a few seconds to log out all the daemons, and then shut it down (remember to type Esc to get the attention of the operator console):

M-> shut

 1605  as   act_ctl_: shutdown, 5 0.02 0.02 0.00 1.22 0:0:3 $1.91
1605.9  shutdown complete
bce (boot) 1605.9:
 

Multics is now shut done, however, you have not yet exited from the Bootload Command Environment (BCE) to the simulator. Press Esc again to get the operator console's attention and issue the "die" command, confirming with "y":

M-> die

Do you really wish bce to die? M-> y

BCE DIS causes CPU halt

simCycles = 6122989885622

cpuCycles = 491386437
Timer runout faults = 2332
Derail faults = 1
Lockup faults = 65
Connect faults = 1656
Illegal procedure faults = 5
Directed fault 0 faults = 584
Directed fault 1 faults = 6576
Access violation faults = 267
Fault tag 2 faults = 2301

Halt, IC: 000012 (000000000000)
sim> 
 

You have been returned to the simulator's prompt. You may exit the simulator with:

sim> quit
Goodbye
$
 

You are now back at your terminal (shell) prompt.

Command Line History and Editing in Video System

One of the most useful features of MR12.6f, courtesy of Gary Dixon, is the new input_history (ih) command. This command, intended to be used with the video system, allows you to recall previously entered commands and input, search for previous input, and edit input using Emacs-like keybindings. For detailed documentation, while logged in, use the "help input_history" command.

To help you get started, perform the following steps:

  • make sure you set your terminal type to an entry that supports the video system (see below)
  • start the video system with "wdc invoke"
  • start input_history with "ih attach"

Now, type a few commands at the command processor. Then, use Control-P to recall your previous input, and Control-N to move toward more recent input. Use Control-R to search backward in your input history for a string (to find a previous command).

Use Control-A to go to the beginning of a line, and Control-E to go the end of the line. Control-F moves forward a character and Control-B moves backward. Control-D deletes forward a character, and Escape-D deletes forward a word. Escape-F moves forward a word, and Escape-B moves backward a word. There are lots of other key bindings for editing lines -- see the input_history (ih) help file as well as the video system help ("help video_editing.gi").

Terminal Types and the Video System

In order to use the video system, you need to set your terminal type to one of the terminal types that supports the video system. If you are simulator user, any of the VT102 terminal types will work, but if you want a larger screen than 24 lines by 80 columns (the default), you should choose a terminal type such as VT102_132C_50L, which gives you a 50 line by 132 column, VT102-compatible terminal type. Many terminal simulators today support VT102 (or VT100) compatibility and, therefore, will work fine with this terminal type.

The Terminal Type Table (TTT) and the source file for this binary table, the TTF (>udd>SysAdmin>a>TTF.ttf) define the terminal types available to you on your system. If your system is a newly-installed MR12.6f system, you will have the VT102_132C_50L terminal type defined. If your system is running an older release, or was upgraded from an older release, you may have to merge the new VT102_132C_50L terminal type into your TTF, rebuild the TTF (cv_ttf TTF) and install the new TTT (install TTF.ttt) in order to use it.

If you look through the TTF, any entries that define a "video_info" section are compatible with the video system. Choose one of these terminal types (or VT102_132C_50L if you have it). Set your terminal type thus:

stty -ttp vt102_132c_50l

Now that your terminal type is set, you can invoke the video system with:

wdc invoke

Search Rules and Search Paths

There are two mechanism Multics uses to find executables or other segments based on rules you can defined (and system defaults): Search Rules and Search Paths

Search Rules

Search rules are a list of directories that are searched to find a command, subroutine, or data item referenced symbolically. Each directory is examined, in order, to find the given external name. Search rules are not used when a segment is addressed by its pathname, which explicitly specifies the directory containing the segment.

Default search rules are defined by the system administrator and these can be overridden by users with the add_search_rules (asr), delete_search_rules (dsr), and set_search_rules (ssr) commands. You can display your search rules with the print_search_rules (psr) command.

See the help files for these commands for more details and consult the documentation for greater depth. Special search rules names include initiated_segments, referencing_dir, working_dir, process_dir, and home_dir. Read about these in the help segment for add_search_rules.

Search Paths

While search rules are used to find executable segments, search paths are used to find other types of segments, including info segments, include files, compose macros, exec_coms, forums, etc. In fact the set of search paths is extensible to new kinds of segment.

Search paths are manipulated with the following commands: add_search_paths (asp), delete_search_paths (dsp), print_search_paths (psp), set_search_paths (ssp), and where_search_paths (wsp). See the help files for these commands for more info or consult the Multics documentation set.

As an example, when you invoke an exec_com with a command such as "ec foo", Multics uses the exec_com search paths to locate your exec_com. To determine your current exec_com search path, you could use this command:

psp exec_com
exec_com
          -working_dir
          >user_dir_dir>SysAdmin>Swenson>exec_com

r 08:45 0.068 0
 

This means that Multics will first look in your working directory and then in >udd>SysAdmin>Swenson>exec_com.

More Processing

Whether you are using the video system (do "help video_editing.gi" for more help on the video system) or not, Multics, if it knows about your terminal type and believes that it is a video terminal, will perform "more processing'. When output reaches the bottom of the screen, it presents a prompt (EOP iwhen not in the video system, and "More? (RETURN for more; DEL to discard output.)", when in the video system), and waits for you to hit Return or Enter to display the next page.

More processing is controlled by a TTY mode called "more". You can disable more processing temporarily with "stty -modes ^more" and turn it back on with "stty -modes more". The terminal type you have chosen will define the number of rows and columns, and the number of rows determines when more processing occurs. If you don't like where Multics is paginating, change your TTY type. To find out your current TTY type, do this:

stty -pr
Type: VT102_132C_50L
Modes: more_mode=scroll,more,ll=131,pl=49,^vertsp,can,erkl,esc,^rawo,^red,^ctl_char,^edited
r 08:52 0.057 0
 

You can see from the above example, that the page length (number of rows) is represented as "pl=49", meaning there are 49 rows (1 row is reserved for the more prompt, so this is a 50-line display). You can set your terminal type with the "stty -ttp xxx" command. For more help, see the info segment on the set_tty (stty) and print_terminal_types (ptt) commands, and or get general info on TTY modes by typing "help tty_modes.gi".

Per Process Time Zone Setting

If you would like to change the time zone for just your own process (as opposed to the whole Multics system), the set_time_default (std) command will let you do this. To set your local time zone to "est" do the following:

set_time_default zone est
 

Reading a Card Deck

In order to read a card deck, you need to have a card reader daemon logged in. By default, the rdra card daemon has been setup, but is not running. In order to get it running, issue the following command on the operator console:

x read_cards
 

You can also use:

x rc
 

You should get output similar to this:

clean_card_pool -age 7
All entries older than 7 days have been removed.
sc_command login IO SysDaemon rdra
pause 10
 1225  as   LOGIN              IO.SysDaemon dmn rdra (create)
 1225  rdra Enter command:  coordinator, driver, or logout:
-->  rdra
sc_command r rdra driver
sc_command r rdra rdra
sc_command r rdra read_cards
Ready
M->
CONSOLE: RELEASED

1225.1  RCP: Attached rdra for IO.SysDaemon.z
 1225  rdra
 1225  rdra IO Daemon Driver Version: 5.7
 1225  rdra
 1225  rdra Enter command or device/request_type:
 1225  cord New driver for device rdra, request type dummy (series = 50000)
 1225  rdra
 1225  rdra rdra driver ready for station reader at 07/11/24  1225.2 pdt Thu
 

Now, prepare a card deck and put it in the "rdra" subdirectory dps8 simulator directory, or, if you have defined a different directory for your cards, place it in the "rdra" subdirectory of that configured directory.

To specify a directory for your cards, you can put something like this in your dps8 ini directory:

set rdr path=/home/eswenson/GoldHillMultics/cards
set rdr debug
set rdr0 watch
 

None of those is required, except, perhaps the "set rdr0 watch" command.

In any case, once dps8 notices that you have a card deck in your "rdra" subdirectory, you will see something like this on the console:

1225  rdra
 1225  rdra Card input started.
 1225  rdra rdra:   ***** Device Attention.
 1225  rdra         ***** Hopper empty or Stacker full.
 1225  rdra
 1226  rdra *Begin deck*
 1226  rdra Reading test.txt.0 (mcc) for Swenson.SysAdmin.
 1226  rdra *Successful read*
 1226  rdra rdra:   ***** Device Attention.
 1226  rdra         ***** Hopper empty or Stacker full.
 1226  rdra
 

This shows that cards were read and made available to Swenson.SysAdmin. Your user process should have received a message such as this:

42) IO.SysDaemon (reader) 07/11/24  1226.4 pdt Thu:
Successful read of card deck: test.txt
 

In order to actually "get" the read cards, you have to issue the copy_cards command (in your normal user session):

copy_cards test.txt
1 card decks copied.

GHM 12:28 0.146 0 level 2 Swenson
 

Now you should see your card deck (test.txt, in this case) in your home directory.

ls test.txt

Segments = 1, Lengths = 1.

rew    1  test.txt


GHM 12:38 0.056 0 level 2 Swenson
 

In my case, the contents of this segment is:

pr test.txt

                    test.txt  07/11/24  1228.9 pdt Thu


This is a test of card reading.
This is a test of card reading.
This is a test of card reading.



GHM 12:28 0.046 0 level 2 Swenson
 

Now, the card deck file (in my case, "sdeck.test.txt"), that I created on the host and placed in the "rdra" subdirectory of the appropriate directory looked like this:

++data test.txt \Swenson \Sys\Admin
++password <redacted>
++format mcc noaddnl notrim
++control overwrite
++input
This is a test of card reading.
This is a test of card reading.
This is a test of card reading.
 

Note that is a "data" card. It is intended to simply be read into a segment on Multics. The actual contents begins below the ++input card.

There are other kinds of card decks that can be read too. For example, an RJE deck. One of these might look like this and be called "sdeck.rje.1":

++RJE foo \Swenson \Sys\Admin
++PASSWORD <redacted>
++INPUT
who
 

This deck, if read in, will cause an absentee job to be create with the contents after the ++input as the body. Placing this card in your "rdra" directory should provoke this response on the console:

 1243  rdra *Begin deck*
 1243  rdra Reading foo.0.absin (mcc) for Swenson.SysAdmin.
 1243  rdra *Successful read*
 1243  rdra rdra:   ***** Device Attention.
 1243  rdra         ***** Hopper empty or Stacker full.
 1243  rdra
 1243  as   LOGIN              Swenson.SysAdmin Q 3 abs1 [foo.0] (create)
 1243  as   LOGOUT             Swenson.SysAdmin.p Q 3 abs1   0: 1 $0.06 (logo)
 1243  prta Request 10492 printer q3:  >user_dir_dir>SysAdmin>Swenson>foo.0.absout
 1243  prta   from Swenson.SysAdmin.p
 1243  prta   Charge for request 10492: $0.03  (16 lines,  1 pages)
 1243  prta prta driver: No requests, driver is idle.
 

It shows that the card deck was read in and that an absentee job was logged in, run, and logged out. It shows that the output from the absentee job was sent to the printer (prta).

You would have received a message such as this in your user process:

From IO.SysDaemon (reader) 07/11/24  1243.0 pdt Thu:
RJE job: "foo", queued for absentee.
 


The .absin segment created in your home directory will have been deleted, but there should be an .absout segment. In the case of the RJE job referenced above, it should look something like this:

ls **.absout

Segments = 1, Lengths = 1.

r w    1  foo.0.absout


GHM 12:46 0.046 0 level 2 Swenson

pr foo.0.absout

                    foo.0.absout        07/11/24  1246.2 pdt Thu



Absentee user Swenson SysAdmin logged in: 07/11/24  1243.0 pdt Thu, request_id: 240711194301.771460

GHM 12:43 0.780 0 Swenson

set_epilogue_command "dp -dl -rqt [rje_args prt_rqt] [user absout]";rdn

GHM 12:43 0.069 0 Swenson

who

Multics MR12.9a, load 14.0/90.0; 14 users, 2 interactive, 11 daemons.
Absentee users 1/3
Swenson.SysAdmin
Green.Multics
Swenson.SysAdmin*


GHM 12:43 0.026 0 Swenson


logout

Absentee user Swenson SysAdmin logged out 07/11/24  1243.0 pdt Thu
CPU usage 1 sec, memory usage 0.0 units
1 request signalled, 0 already in printer queue 3



GHM 12:46 0.085 0 level 2 Swenson

 <nowki>

As you can see, the "who" command was executed and the output written to the .absout segment.  Further, you can see, from the absentee epilog command that was created:

 <nowiki>
set_epilogue_command "dp -dl -rqt [rje_args prt_rqt] [user absout]";rdn
 

that the .absout segment was sent to to the printer.

More Info on Card Decks

Submitting decks to the card reader

Decks are submitted by copying the deck file into the queue directory (see Card Reader configuration to determine where the reader directory is located).

There are three card formats recognized by the simulator: 'card', 'stream' and '7 punch'.

In 'card' format, each line of text is treated as a 80 column card image. Newlines in the file are treated as card separators. Lines longer the 80 characters are silently extended to the next card image.

In 'stream' format, each byte of input is read and translated to MCC punch codes grouped into collections of 80 columns. No newline processing is done by the simulator.

In '7 punch' format, after the '++INPUT' card the input is treated as a bit stream and is intended to pass binary files (in 7 punch format) to '++DATA' decks for copying the file to a Multics segment.

The deck format is determined by the prefix of the filename being submitted:

    Card Format: cdeck.*
    Stream Format: sdeck.*
    7 Punch Format: 7deck.*
 

Any file in the card reader directory that doesn't start with one of these prefixes will be ignored (other than a file named 'discard', see restarting the card reader below).

Note that the simulator "peeks" at the cards as it needs to know when to start using a specific encoding. The simulator always starts by translating the cards into MCC punch codes for the job control cards (those that start with a "++"). When it detects a "++input" card, it will switch to processing the rest of the input based on the deck format as specified by the filename prefixes given above.

If the card reader gets stuck due to an error in a deck, use the following process to clear and reset it:

1) On the host system, create an empty file in the card reader directory named "discard". On Linux the simplest way is just "touch discard". 2) On the Multics console:

    r rdra reinit
    r rdra read_cards
 

(replaced rdra with the correct card reader name if you have more than one card reader configured)

The above should close out the card reader file in the simulator and restart the card reader in Multics.

Working with card decks

When working with card decks, it is important to understand how Multics is going to process them. The "Multics Programmer's Reference Manual" (AG91-04A) describes what you need to know in pages 5-50 to 5-60 on "Bulk Input and Output" as well as Appendix C: "Punched-Card Input Output and Returned Output Control".

Some simple examples follow but reference AG91-04A for complete details. Other than the deck format prefix above, the rest of this information does not involve the simulator, only Multics.

It's important to note that, when dealing with card decks, you are using a simulated media that is limited to a maximum of 80 characters per line. Having lines longer than this can cause unexpected behavior and will likely not result in what you want to happen.


Using card format "cdeck.*"

The '++FORMAT' card should read '++format mcc addnl trim'. This tells the card reader processor to trim trailing blanks and add newlines to each card image.

This example loads a data file into Multics:

    ++data bootload_1.alm \Anthony \Sys\Eng
    ++password XXX
    ++format mcc addnl trim
    ++control overwrite
    ++input
    [contents of file]
 

Things to note:

- Since card input gets translated into lower case, there needs to be a method of designating upper case letters because Multics is case-sensitive and Person IDs and Project IDs will typically have mixed-case names. Therefore, prefixing a letter with a backslash (\) will cause that character to be translated as upper case.

- The ++format card above will tell Multics to trim trailing blanks and add newlines to each card image. The "mcc" tells it that the cards are punched with MCC codes (this is done by the simulator when using cdeck or sdeck formats). You always want to include a ++format card so you know how Multics will process your deck (even though it is optional).

This example executes an absentee job:

    ++rje test.absin \Anthony \Sys\Eng
    ++password XXX
    ++format mcc addnl trim
    ++input
    ccd bootload_1.alm
    alm -list bootload_1
 

Things to note:

This deck will log in as Anthony.SysEng and execute the two commands after the ++input card. When done, a print job containing the results of executing these commands will be queued.

Using stream format "sdeck.*"

This example is the same as the first cdeck example except formatted to use stream format:

    ++data bootload_1.alm \Anthony \Sys\Eng
    ++password XXX
    ++format mcc noaddnl notrim
    ++control overwrite
    ++input
    [contents of file]
 

Things to note:

- The ++format card specifics not to add newlines for each card and not to trim trailing spaces.

- The ++control card specifies overwrite which will truncate an existing file with the same name if it already exists.

- With this example and the one for cdeck format, there is no significant reason to choose cdeck or sdeck format. Just pick one and use the correct ++format card.

Using 7 punch format "7deck.*"

7 punch format is used when you need to transfer a binary file. The simulator will just read raw bytes after the ++input card and transfer them to Multics. Using Multics, you can create a 7 punch output deck on the card punch and use the punutil utility to extract just the binary cards from the punched deck. The resulting file can be loaded by prefixing it with:

    ++data bound_segment_ \Anthony \Sys\Eng
    ++password XXX
    ++format viipunch noaddnl notrim
    ++control overwrite
    ++input
    [7 punch contents]
 

Things to note:

- The ++format card must have "viipunch" and specify not to add newlines and not to trim.