IITS Logo IITS Home Page spacer FeedBack Site Map Search IITS Concordia University Home Page
IITS Welcome General Information Help & Documentation IITS Services

IITS HelplineVMS Beginner's FAQ


[top] [previous] [next]

2. Processes


How Do I...

1. How do I login?

First your local system adminstrator must issue you a username and (initial) password. The next step depends on how your system is set up.

Logging in on a terminal

Hit {RETURN} a couple of times, you should see a prompt:

   Username: assigned_username The username that was assigned.

   Password: assigned_password It will not be visible when typed.

The first time you use the computer it will likely force you to change your password.

Logging in via a terminal emulator, running on LAT, CTERM, or TELNET.

Configure the computer you are using to connect to the OpenVMS host. Then proceed as for a terminal.

Logging in via an XTerminal or on a workstation console.

There should be a login screen present, with blanks labeled Username and Password. Fill them in and then press {RETURN} or click with the mouse on an {OK} button, if present.

[up]

2. How do I logout?

From a terminal, or remote LAT, CTERM, SET HOST, or TELNET session:

   
   $ logout

From an Xterminal or workstation console

[up]

3. How do I configure a terminal?

This is often necessary for serial lines and sometimes necessary for connections over ethernet via LAT, CTERM, or TELNET.

First, determine the current configuration of your terminal or terminal emulator. You will need to know such things as the type of emulation it is doing (typically VT100 or VT200), the number of bits, parity, and so forth.

Then try to log in. If you succeed, do:

   
   $ SHOW TERMINAL

Generally the best thing to do is to adjust the terminal/terminal emulator to match what the line expects. If that isn't possible use:

   $ SET TERMINAL [options]

to make the connection match the terminal/terminal emulator.

If when you try to log in all that shows up on your screen is garbage, or you don't even get that, ask the system administrator to tell you how that line is configured.

[up]

4. How do I execute a bunch of commands at login?

Create a file called LOGIN.COM and place it in SYS$LOGIN, the directory you start out in when you log in. Here is a very simple LOGIN.COM file:

   $! First line of example login.com
   $ ds :== dir/size=all
   $ define sys$print my_groups_queue
   $! last line of login.com

Just to avoid some possible security problems, also do:

   $ set file/protection=(s:rwed,o:rwed,g:re,w) login.com

[up]

5. How do I create a subprocess?

Use the SPAWN command. Here is an example of interrupting a program, creating a subprocess, doing some stuff in it interactively, and then returning to the program running in the main process:

   $ run myprog
   $ spawn
   $ dir *.dat  Do a couple of commands, this is just an example
   $ logout
   $ continue  The program completes normally.

Note that giving a command other than spawn or attach would have killed the halted program "myprog".

You can also use Spawn to get a subprocess running at the same time as the main process. For instance, the following will start the program XV (an interactive graphics program for DECwindows) and then let you continue with the current session:

  $ spawn/nowait xv
  $

Note that a ^Y or ^C at the top session will kill the subprocess.

[up]

6. How do I stop a process?

If you know the name or process ID, and it belongs to you, or you have sufficient privileges:

   $ stop process_name

           or

   $ stop/id=process_number   a typical number: 20200242

You can get the process_name or _number from:

   $ show system

If the process you want to stop is your current session, or the program you are running, use:

  {^Y}   Control key and Y, stop the current program.
  $ logout

[up]

7. How do I start a program?

Method 1: The program has been installed or is part of OpenVMS:

   $ program_name [command line arguments]

Method 2: Use the RUN command:

   $ run program_name  No command line arguments allowed

Method 3: Define a foreign command for it, then run it. In the following example where is a logical name equivalent to the location of the program.

   $ new_command :== $where:program_name 
   $ new_command [command line arguments]

Method 4: If the "program" is a DCL procedure.

   $ @new_command [command line arguments]

Method 5: If the "program" is a DCL procedure, define a symbol to run it.

   $ new_command :== @where:program_name
   $ new_command [command line arguments]

[up]

8. How do I stop a program?

If by "stop" you mean, keep it from scrolling by too fast, use

If by "stop" you mean, kill the program, use

[up]

9. How do I tell what a program is doing?

If you are running it interactively from a terminal, do: {^T}

This will give you a status line showing the time, and also these process measurements: total CPU, total page faults, total IO, and current memory usage.

If it is running in batch, or as a subprocess, use:

   $ SHOW PROCESS /id=process_id

            or

   $ SHOW PROCESS process_name

You must either own the process, or have enough privileges to let you gather this information.

You can tell which processes are hogging which resources using variants of the MONITOR command:

   $ MONITOR process/topcpu   Who's using all the CPU?
   $ MONITOR process/topfault Who's page faulting so much?
   $ MONITOR disk             What's going on on the disks?

[up]

10. How do I redirect the input or output of a program?

This must be done *before* the program runs and involves temporarily redefining certain logical names. Examples are given in that section.

OpenVMS does not support "pipes" as do some other operating systems. However, pretty much the same effect can be obtained by explicitly chaining the output of one program as the input to the next - so long as what the program produces is text, and all input/output goes through the standard devices. In other words, the equivalent of the Unix command line:

   
   % prog1 | prog2 | prog3

is:

   $ DEFINE/user sys$output temp1.txt
   $ prog1
   $ DEFINE/user sys$input  temp1.txt
   $ DEFINE/user sys$output temp2.txt
   $ prog2
   $ DEFINE/user sys$input  temp2.txt
   $ prog3

If the intermediate files are not needed afterwards, just delete them.

[up]

11. How do I start a batch job?

First you need to put a series of DCL commands into a file, because batch jobs require DCL procedure files to tell them what to do. (They aren't interactive, so you can't do so from your terminal.) Here is a simple procedure file lthat sorts a couple of files and then merges them. Generally, you would use an editor to create this file.

   $! first line of "TEST.COM", note no error checking!!!
   $ sort file1.txt file1.txt_sorted
   $ sort file2.txt file2.txt_sorted
   $ sort file3.txt file3.txt_sorted
   $ merge file1.txt_sorted,file2,file3 file4.txt
   $ delete file%.txt.
   $ write sys$Output "All done"
   $!last line of file

This is one command you might use to start it on a batch queue:

   $ SUBMIT/NOTIFY/NOPRINT/LOG=SYS$LOGIN: [QUEUE=queue_name] test.com

This says:

It will tell you the entry number when it is placed on the queue.

[up]

12. How do I stop a batch job?

First, figure out the entry number, if you didn't write it down when you issued the SUBMIT command to place it on the QUEUE.

   $ SHOW ENTRY    Show all entries that you own in any queue.

Figure out which one is yours. Then do:

   $ DELETE/ENTRY=entry_number

[up]

13. How do I modify a process's attributes: priority, privileges, and so forth?

This is where SHOW and SET come in. SHOW tells you what they are, SET lets you modify them. There are a lot of possible combinations! Here, use a command that gets a whole bunch of information at once, use the /id switch if you are modifying a process other than the one attached to your terminal:

   $ HELP SET         Learn about SET.
   $ HELP SHOW        Learn about SHOW.

   $ SHOW PROCESS/ALL [/id=process_id]   Tells a lot about a process.

The following examples all apply to the process attached to your terminal.

   $ SET PROC/PRIO=3  Lower process priority to 3.
   $ SET PROC/PRIV=(OPER,NOBYPASS)
                           Turn on one privilege, turn off another.
   $ SET WORKING_SET/LIMIT=1000
                           Set the working set limit to 1000.

[up]


What is...

1. What is a UIC?

The computer needs to know who you are, and which group you belong to. This information is stored in the UIC (user identification code). It is written "[group,member]". The group and member values are each octal numbers between 0 and 37776. However, on most systems these have been mapped by the system administrator to case insenstive text names known as "identifiers" which may be used instead, and which will show up preferentially in any display commands. For instance, [10,20] and [AGROUP,AUSER] might be equivalent. Typically "AUSER" is the same as the user's USERNAME, and "AGROUP" has some fairly obvious meaning in a group context, like "SHIPPING" or "PERSONNL". Here are some instances where you will encounter UICs:

   $ DIR/OWNER    Who owns the files in this directory.
   EXAMPLE1.DAT;1    [AGROUP,AUSER]$ If identifiers defined
   EXAMPLE2.DAT;1    [10,20]$        If identifiers not defined

   $ DIR/BY_OWNER=[AGROUP,AUSER]
                       Find a file by who owns it.
   $ SET FILE/OWNER=[AGROUP,AUSER] filename.txt
                       Give a file to somebody, requires privileges.

[up]

2. What is a priority?

Each process has a number associated with it that determines how much CPU time it gets when in competition with all of the other processes on the system. A normal interactive priority is 4. Less gets less time, more gets more. Normal users cannot increase their priorities above 4. Nice users decrease their priorities when they run computationally intensive programs from their terminals. Hint, if at all possible, run these in batch instead.

[up]

3. What is a working set?

First some background. OpenVMS uses virtual memory. This means that the total amount of addressable memory is composed of the RAM, or physical memory, of the machine plus a large area reserved on disk (swap). When processes on the system require more memory than is present in RAM, the operating system adapts by copying memory in pages to/from the swap area on disk. While this is transparent to the user, users should be aware of it, since processes that request too much memory will spend a lot of time moving data to and from the disks, which is much, much slower than moving data around only in RAM. Secondly, if a lot of this disk access is going on it can slow down the system for other users as well.

OpenVMS controls how much of what kind of memory a process can get via the "working set". The working set has four parts: default, extent, quota, and limit, with all values given in units of 512 byte pagelets. These are:

 Default:    The initial working set size limit for a user's process.
 Extent:     The maximum size to which a user's RAM usage can grow.
 Quota:      Has several meanings:
               1.  The maximum amount of RAM a user can lock in.
               2.  The maximum amount of swap space reserved for this 
                   process.
               3.  The maximum amount of RAM the system will let the 
                   process have if other processes also want more RAM.
 Limit:      When a program stops, the process will reduce it's working
             set to this size.

Users can adjust these up to the maximum allowed by the system for any process they create with SET WORKING_SET. Note that the working set can be higher on batch queues than for interactive use (another incentive to use batch queues) and can be set on a user by user basis by the system manager.

[up]

4. What is a privilege?

In order for a process to do certain operations on OpenVMS it must have the appropriate privileges. This is a security feature. On most systems "average" users will have these two privileges only:

       NETMBX    Create a network device.
       TMPMBX    Create temporary mailbox devices.

It is not uncommon for a small number of users to have these additional privileges:

      GROUP     Control execution of other processes in the same group.
      OPER      Perform system operator functions.

Privileges beyond those are usually reserved for the system manager.

Note that access to other users' files is controlled primarily by file protections and (occassionally) access control lists.

[up]

5. What are symbols?

DCL can store information such as strings or integers in "symbols". DCL can also manipulate these symbols to create other symbols. Symbols are primarily used to define short strings that replace long commands, perform certain calculations and replacements within DCL procedures, hold status information.

Examples:

   $ three :== print/copies=3 Short hand for longer command.

   $ x == 3         Hold a value.
   $ copy filename out.txt;'x' 
                           Use it. New file is out.txt;3
   $ x == x + 1     Modify the value.
   $ copy filename out.txt;'x'
                           Use it. New file is out.txt;4

   $ search *.* fred          Do an operation.
   $ write sys$output $STATUS Check the completion status.

   $ delete/symbol/global three 
                           Delete a symbol.

[up]

6. What are logical names?

Logical names are strings that are primarily used to replace some or all of a file specification, especially the DEVICE and DIRECTORY portions. For instance, if the logical name THERE was defined to be DISK:[DIRECTORY]FILENAME.EXTENSION then the file system would know how to access the desired file when THERE was encountered in any location where the full file name would have been appropriate, either on the command line or within a program. In comparison, a symbol THERE containing the string DISK:[DIRECTORY]FILENAME.EXTENSION could only be interpreted by the command line interpreter - within a program "THERE" would have no special meaning.

There are several special logical names, these are:

  SYS$OUTPUT:    the place where normal output is sent
  SYS$ERROR:     the place where error messages are sent
  SYS$INPUT:     the place where data is read from
  SYS$COMMAND:   the place where DCL commands are read from
  TT:            another name for the terminal
  NLA0:          the null device, data directed here disappears

By redefining logical names it is possible to redirect the input and output for programs that do not allow this to be done explicitly. (See the examples below.)

Logical names can also be used to hold an arbitrary string. Logical name tables are sets of logical names. Each logical name table restricts access to processes belonging to a particular group of users (sometimes including all users). So one way that processes share information is by defining logical names in logical name tables that they have common access to.

Examples:

   $ DEFINE there DISK1:[USERS.FRED]
            Define a logical value specifying a location.
   $ COPY there:file.txt []
            Copy a file from that location to the current directory.

   $ DEFINE avalue "This is a string that some program needs"
   $ SHOW LOG avalue
     "AVALUE" = "This is a string that some program needs" (LNM$PROCESS_TABLE)
   $ DEASSIGN avalue      Get rid of the logical name.

 This is how to redirect the input/output for a program that expects
 to read/write to the terminal.  DEFINE/USER is in effect until the 
 completion of the the next program or procedure that is run.

   $ DEFINE/USER sys$output    someprogram.output
   $ DEFINE/USER sys$error     someprogram.errors
   $ DEFINE/USER sys$input     someprogram.data
   $ RUN SOMEPROGRAM

 This is how to redirect the input/output for a program that expects
 to read/write from particular files with names that DO NOT have extensions,
 that is "DATAIN", but not "DATAIN.TXT"

   $ DEFINE/USER DATAOUT   someprogram.output
   $ DEFINE/USER DATAIN    someprogram.data
   $ RUN SOMEPROGRAM

[up]

7. What are foreign commands?

A foreign command is a way of running a program so that it can take command line arguments, but without modifying the primary command table (which is done with SET COMMAND, and can be slow). Note that a single * in the foreign command indicates how much of the command must be typed for it to be recognized.

Example:

   $ DEFINE there DISK1:[USERS.FRED]
   $ mycom*mand :== $THERE:a_program
   $ mycom "a parameter"

[up]

8. What are usernames and passwords?

The computer needs to know who you are so that it can determine which operations you may perform.

The way it finds out who you are is at login, when it asks you for a username, which is a unique name that has been assigned to you by your system administrator. For instance, if your name is "Mary Brown", your username might be "MBROWN". Usernames are not case sensitive, so "mBrown" or "MBrown" would be equivalent.

The way it verifies that you are who you say you are is by asking you for a password. This is a string of characters which you should keep secret - letting others know what it is gives them full access to your account. Passwords, like usernames, are not case sensitive. In most instances, when the computer asks for your password it will not echo the characters back to the screen, so that somebody reading over your shoulder will not be able to steal your password. On some OpenVMS systems you may also need a secondary password. Your initial password(s) will be chosen for you by your system administrator.

On many OpenVMS systems you will be allowed to change your password. On others you will be forced to change your password at regular intervals - these latter systems will show you at login, in the days before your password expires, a message similar to this one:

   WARNING - Your password expires on Thursday,  9-NOV-1995 10:48:47.98

After it has expired you will instead see this message:

   Your password has expired; you must set a new password to log in

This is how you change a password on OpenVMS, in each instance where you type a password it will not show up on the screen:

   $ SET PASSWORD
   $ Old password:     Type in your current password.
   $ New password:     Type in the new password.
   $ Verification:     Type in the new password again.

Another method, which some sites require is to use instead:

   $ SET PASSWORD/GENERATE

In this variant after you supply the Old password you will be asked to select your new password from a list of randomly generated, and so unguessable, passwords.

[up]

9. What are text editors?

Text editors are programs that modify text files. Their editing functions are analogous to those in the word processing programs that you may be familiar with, but they may or may not use a graphics user interface, and none of them can be used to affect a text file's format (fonts, bold, italic, and so forth) - because text files don't have any of these attributes. For a description of the available text editors, see How do I edit files?

[up]

[top] [previous] [next]


  [Back to Helpline Home Page]


Author: David Mathog
Credits: Rich Lafferty
Maintained by: helpline@alcor.concordia.ca
Last update: $Date: 1999/05/18 16:16:23 $ -- Rich Lafferty