Shell – Linux for OpenVMS DCL Ctrl/T

openvmsshell

From OpenVMS DCL Dictionary:

The Ctrl/T function displays a single line of statistical information
about the current process. When you press Ctrl/T during an interactive
terminal session, it momentarily interrupts the current command,
command procedure, or image to display statistics. The statistical
information includes the node and user names, the current time, the
current process, CPU usage, number of page faults, level of I/O
activity, and memory usage. For example:

BOSTON::SMITH  16:21:04 EDT       CPU=00:00:03.33 PF=778 IO=296 MEM=277

What is Linux for OpenVMS DCL Ctrl/T?

Best Answer

I sincerely doubt there's an exact analog. The nature of a Linux process (and consequently of running a command) is so different than the nature of a VMS process and how it runs a command that nothing like this can really exist.

As I understand VMS, when you run a command like TYPE SOMEFILE.TXT, DCL reads the TYPE.EXE into the memory of the same process that DCL runs in, fixes up all the relocations that TYPE.EXE needs, and then jumps to the first instruction of TYPE.EXE. When TYPE.EXE has done its work, the OS returns control to the DCL code that still resides in the same process as TYPE.EXE.

That heavyweight process, which includes DCL, a table of lexicals, and a well-known jump table of addresses of various things, allows Ctrl-T to work. That key sequence is just a special form of keyboard interrupt, and the DCL code in any given process can do the work you describe.

A linux process doesn't always have a shell (DCL analog) in it. A linux process may not even have keyboard interrupt handler code registered with the kernel, which would mean that any keyboard interrupt (Ctrl-C or Ctrl-) gets the kernel to cause the process to exit.

Related Question