Skip to main content

Raymii.org Logo (IEC resistor symbol)logo

Quis custodiet ipsos custodes?
Home | About | All pages | RSS Feed | Gopher

Small OpenVMS titbits

Published: 22-04-2018 | Author: Remy van Elst | Text only version of this article


Table of Contents


openvms

(You can read all my OpenVMS articles by clicking the picture (above)

If you like this article, consider sponsoring me by trying out a Digital OceanVPS. With this link you'll get $100 credit for 60 days). (referral link)

Here are some small titbits I found out this week on the DECUServe OpenVMSsystem. Not enough to write a blogpost on their own, but collected together.

.bash_history

To show your shell history from the current session:

$ RECALL/ALL

Output:

  1 show proc  2 proc  3 htop  4 top  5 notes  6 t  7 hobbyist  8 hobbyi  9 show license 10 show terminal 11 set terminal /backspace=delete 12 show terminal 13 set terminal /backspace=backspace 14 show terminal 15 hello this is a test$

Uptime and /etc/redhat_release

To view system uptime and OpenVMS version:

$ SHOW SYSTEM /NOPROC

Output:

OpenVMS V8.4-2L2  on node EISNER    8-APR-2018 14:13:11.07   Uptime  17 03:22:55

w

Show all the logged in users and their process, like the w command on linux:

$ SHOW USERS /FULL      OpenVMS User Processes at  8-APR-2018 14:19:05.07    Total number of users = 6,  number of processes = 6 Username     Process Name      PID     Terminal <login>      _VTA4425:       00009B23  VTA4425: (disconnected) EXAMPLE         SSHD 0355A PTD  00008EE4  FTA550:  (ssh/$IP:57039) GOATLEY      Goat Busters    00009A55  FTA547:                                    (ssh/$HOSTNAME.com:17251) JACKSON      JACKSON         00005314  FTA269:                             (ssh/host-$IP.static.as$AS.net:59656) MALMBERG     >>>B ewa0:      00009664  FTA543:                                     (ssh/$IP:59826) SCHENKENBERG SCHENKENBERG    00007E83  FTA442:                                      (ssh/ool-$HOSTNAME:47078)

cd ~

Your home directory on OpenVMS is not known as ~ (as on UNIX) but asSYS$LOGIN. As we learned in an earlier article, OpenVMS uses the SET/SHOWDEFAULT commands to navigate directories. So the equivalent of cd ~ on linux,or even shorter, cd is SET DEF SYS$LOGIN:

$ SET DEFAULT SYS$LOGIN$ SHOW DEF  DISK_USER:[DECUSERVE_USER.EXAMPLE]$ DIR SYS$LOGINDirectory EISNER$DRA3:[DECUSERVE_USER.EXAMPLE]$MAIN.TPU$JOURNAL;1 .VIMINFO;1          A.;1                ICREATEDAFOLDERYAY.DIR;1LOGIN.COM;2         LOGIN.COM;1         LOGIN_COM.TPU$JOURNAL;1MAIL$AC8D2981000500B2.MAI;1             MAIL.MAI;1          NOTES$NOTEBOOK.NOTE;1RAYMII.DIR;1        REMY.DAT;3          REMY.DAT;2          REMY.DAT;1SSH.DIR;1           SSH2.DIR;1          SSH3.DIR;1          WWW.DIR;1Total of 18 files.

cd ..

The equivalent of the cd .., to go up one folder on linux, on OpenVMS is[-]. So if you are in EISNER$DRA3:[DECUSERVE_USER.EXAMPLE.WWW] and want togo up one level to EISNER$DRA3:[DECUSERVE_USER.EXAMPLE] then enter:

 $ SET DEFAULT [-]

%SYSTEM-F-ACCVIO, access violation,

I also hit my first bug. I was writing a note (in NOTES, a kind of forum) andI pasted a link. It crashed with the following error:

Fatal DECTPU internal error, please submit an SPR including:     1.  A description of the actions that revealed the bug     2.  The versions of DECTPU and the operating system you are running     3.  Machine-readable media containing:         - The source files of your DECTPU section and command files         - Copies of the data files used during the session         - The keystroke journal file if one exists     4.  Your terminal characteristics, if applicable     5.  A description of the command used to invoke DECTPUShareable base: 7BC54884  Ident: DECTPU V3.2  2017-05-22 22:49Updater base:   7C03E034  Ident: DECTPU V3.2  2017-05-22 22:49Updater file:   TPU$CCTSHR%SYSTEM-F-ACCVIO, access violation, reason mask=00, virtual address=0000000000000024, PC=00000000000B5A14, PS=0000001B$

So I retyped the note and pasted the error in, maybe someone knows more.

Edit: they know more on the DECUS system. This happens when you CRTL+C out ofthe NOTES application.

MAIL, folders and mail management

See this article as well.

List email

MAIL> dir                                                                            MAIL      # From                 Date         Subject      1 EISNER::CORNELIUS    29-MAR-2018  Hello again    2 (Deleted)      3 EISNER::CORNELIUS    31-MAR-2018  RE: Hello again      4 EISNER::PARRIS        2-APR-2018  RE: Test messageMAIL>

List folders

    MAIL> DIR /FOLDER    Listing of folders in EISNER$DRA3:[DECUSERVE_USER.EXAMPLE]MAIL.MAI         Press CTRL/C to cancel listing    MAIL                                    TEST    MAIL>

List mail in folder

MAIL> dir TEST                                                                            TEST      # From                 Date         Subject      1 IN%"example@example.nl"  31-MAR-2018  RE: Tesrt messageMAIL>

Regular DIR will list the MAIL folder.

Move message into a folder

To store a message in a folder, use the FILE command in the MAIL program:

MAIL> file testFolder TEST does not exist.Do you want to create it (Y/N, default is N)? y%MAIL-I-NEWFOLDER, folder TEST createdMAIL>

As you can see, if the folder does not exist, it will be created.

Delete a message

OpenVMS MAIL doesn't delete messages immediately but moves them from yourdefault folder to a folder called WASTEBASKET.

On most OpenVMS systems the WASTEBASKET is purged when the you use thecommand, EXIT to exit MAIL. If you use the command, QUIT, the old, deletedmail remains in the WASTEBASKET. If you're in a hurry to purge theWASTEBASKET, then you can do it manually with the PURGE command.

MAIL> dir TEST                                                                            TEST      # From                 Date         Subject      1 IN%"example@example.nl"  31-MAR-2018  RE: Tesrt messageMAIL> del 1MAIL> dir WASTEBASKET                                                                     WASTEBASKET      # From                 Date         Subject      1 IN%"example@example.nl"  31-MAR-2018  RE: Tesrt messageMAIL> purge%MAIL-I-DELMSGS, 1 message deleted

Mail filesystem folder

By default all mail related files are stored in your home directory. This canbecome quite a full listing, you can change it to another folder. In the MAILprogram, enter the following command:

MAIL> SET MAIL [.MAIL]%MAIL-I-CREATED, DISK_USER:[DECUSERVE_USER.EXAMPLE.MAIL] created

Now mail related files will be placed in [.MAIL] and your home directory willstay a bit cleaner.

ls -la (list files, owner and permissions)

With the DIR command, two flags can be given, /PROTECTION and /OWNER, toget a more comprehensive list including the file owner and permissions:

 $ DIR /OWNER /PROTECTIONDirectory DSA3:[DECUSERVE_USER.EXAMPLE]$MAIN.TPU$JOURNAL;1                     [EXAMPLE]                           (RWED,RWED,,).VIMINFO;1           [EXAMPLE]                           (RWED,RWED,,)A.;1                 [EXAMPLE]                           (RWED,RWED,,)ICREATEDAFOLDERYAY.DIR;1                     [EXAMPLE]                           (RWE,RWE,,)LOGIN.COM;2          [EXAMPLE]                           (RWED,RWED,,)LOGIN.COM;1          [EXAMPLE]                           (RWED,RWED,,)LOGIN_COM.TPU$JOURNAL;1                     [EXAMPLE]                           (RWED,RWED,,)MAIL.DIR;1           [EXAMPLE]                           (RWE,RWE,,)NOTES$NOTEBOOK.NOTE;1                     [DECUSERVE]                      (RWE,RWE,,)RAYMII.DIR;1         [EXAMPLE]                           (RWE,RWE,,)REMY.DAT;3           [EXAMPLE]                           (RWED,RWED,,)REMY.DAT;2           [EXAMPLE]                           (RWED,RWED,,)REMY.DAT;1           [EXAMPLE]                           (RWED,RWED,,)SSH.DIR;1            [EXAMPLE]                           (RWE,RWE,,)SSH2.DIR;1           [EXAMPLE]                           (RWE,RWE,,)SSH3.DIR;1           [EXAMPLE]                           (RWE,RWE,,)WWW.DIR;1            [EXAMPLE]                           (RWE,RWE,,RE)Total of 17 files.

The permission column includes in order:

Tags: alpha, blog, dec, decus, itanium, openvms, pdp, simh, vax, vms