Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Status key

From Wikipedia, the free encyclopedia
Computer command

Incomputing, astatus key is akeyboard key that causes anoperating system and/or aprogram to output status information on aterminal when it is pressed. In the event that a program on a terminal produces no indications that it is running, typing the status key will reveal the program's state and activity.[1] Older implementations produced only a quick one-line status report for the current job when the status key was pressed.[2] Newer implementations support sending asignal to the current process to allow the application to report on status as well.[3]

Operating system-level implementations

[edit]

Several different operating systems have a status key feature implemented in the kernel or other low-level component.

TENEX

[edit]

TENEX has the feature since at least 1971: "Another terminal Interrupt character, control-T is serviced by the EXEC. It interrupts a user's EXEC process to type out total CPU and console time used, and status of the fork being run under the EXEC."[4]

DEC RSTS/E

[edit]

RSTS/E is documented as having CTRL/T (control-T) as a status key at least as far back as 1977 and it continued to have one into at least the 1980s. Typing the status key results in output that is represented by the following example:[5][6][2]

18   GARP::KB32   SYSTAT+BAS4F     ^C(0R)   11(16)K+ 16K  3.3(+5)
FieldValue
Job number18
Node nameGARP
Keyboard numberKB32
Program or OperationSYSTAT
Run-time system nameBAS4
Job state^C(0R)
Program size in words11
Maximum size in words(16)K
Run-time system size in words+16K
Amount of CPU time used3.3
CPU time since the last CTRL/T(+.5)

DEC TOPS-10

[edit]

OnTOPS-10 when the CTRL/T (control-T) key is pressed, themonitor prints status information pertaining to the job on the terminal. Typing CTRL/T displays a job's progress without interrupting its execution. No representation of a control-T character is displayed on the terminal, just the status information.[7]

DAY: :05:43 RUN:0.48 RD:75 WR:8 SOS 12+19p ^C Ctx:1 PC:400275

Incremental values in the table below indicate that the value is the accumulation since login or last CTRL/T whichever was shortest.[7]

FieldValue
Incremental day timeDAY: :05:43
Incremental run timeRUN:0.48
Incremental disk readsRD:75
Incremental disk writesWR:8
Program nameSOS
Amount of memory program is using12+19p
Context numberCtx:1
Job state code^C
Program CounterPC:400275
Job state, INPUT WAIT or OUTPUT WAIT(only when CTRL/T is used at USER level)

DEC TOPS-20

[edit]

TOPS-20 reports a shorter list of information than its predecessors:[9]

09:36:35 TEST Running at 404157 Used 0:00:35.8 in 0:30:39, Load 4.04
FieldValue
Time09:36:35
NameTEST
StatusRunning at 404157
Used CPU-timeUsed 0:00:35.8
Logged-in-timein 0:30:39
Load averageLoad 4.04

MIT ITS

[edit]

ITS copied the idea fromTOPS-20,[10] but used the key sequenceControl+_J.[11]

19:29:10 3 RMS    HACTRN EMACS1 130566
FieldValue
Time19:29:10
Job index3
User nameRMS
Job nameHACTRN
System nameEMACS1
User program counter130566

VSI OpenVMS

[edit]

OpenVMS has a status key which can be customized and works with remote processes.[12] The default output includes these items:[1]

NODE22::SMITH  16:21:04 (DCL) CPU=00:03:29.39 PF=14802 IO=18652 MEM=68
FieldValue
Node and process nameNODE22::SMITH
Time of day16:21:04
Active image name(DCL)
Processor time usedCPU=00:03:29.39
Accumulated page faultsPF=14802
I/O operationsIO=18652
Frames in useMEM=68

BSD UNIX

[edit]

4.3BSD-Reno,[13][14][15]BSD systems derived from that version, andOSF/1 have a status key which defaults to Ctrl-T and can be assigned to any key.[3][16] It sendsSIGINFO to the current process which is ignored by default but can be configured to call a function which can display status information from the program.[17][18]

load: 0.10  cmd: sleep 1594 [nanslp] 1.33r 0.00u 0.00s 0% 1864k
FieldValue
Five minute load averageload: 0.10
Command namecmd: sleep
Process ID1594
Wait channel name or lock name[nanslp]
Elapsed real time1.33r
Elapsed user CPU time0.00u
Elapsed system CPU time0.00s
Percentage of CPU0%
Program memory resident set size1864k

macOS

[edit]

BecausemacOS has a kernel,XNU, with code fromMach andFreeBSD,[19] the terminal driver supports the BSD status key.[20][21][22]

load: 3.04 cmd: sleep 719 waiting 0.00u 0.00s
FieldValue
Five minute load averageload: 3.04
Command namecmd: sleep
Process ID719
Wait channel name or lock namewaiting
Elapsed user CPU time0.00u
Elapsed system CPU time0.00s

Application-level implementations

[edit]

It addition to implementing a status key in the kernel or related OS component, some applications have features that allow you to press a key to view the application's status.

SDS-940 running BBN Lisp in 1969

[edit]

BBN Lisp which runs on anSDS 940 had a status key which was implemented in theLisp which ran on an OS, rather than in the OS kernel itself.[23]

Control-TPrint Time. Causes an immediateprintout of the total execution time(in clock ticks) for the job, (evenduring garbage collections), i.e.clock[2], (p. 14.22). A series ofsuch printouts should show increasingnumbers if the program is using anyCPU time. Of course, the program isnot using CPU time if it is waitingfor input. This information mayserve to help the user determine ifhis LISP and/or the time sharing sys-tem has crashed.

References

[edit]
  1. ^abMiller, David Donald (1997).Open VMS Operating System Concepts. Elsevier. p. 151.ISBN 978-1-55558-157-2.
  2. ^abRSTS/E System User's Guide(PDF). Maynard, MA: Digital Equipment Corporation. 1985. pp. 4–10.Archived(PDF) from the original on 2007-08-16.
  3. ^abKerrisk, Michael (2010).The Linux Programming Interface: A Linux and UNIX System Programming Handbook. No Starch Press. p. 1299.ISBN 978-1-59327-291-3.
  4. ^Daniel G. Bobrow; Jerry D. Burchfiel; Daniel L. Murphy; Raymond S. Tomlinson (1971-08-15). "4.4 Interrupt Characters".TENEX, a Paged Time Sharing System for the PDP-10(PDF) (Report).
  5. ^BASIC-PLUS-2 RSTS/E User's Guide(PDF). Maynard, MA: Digital Equipment Corporation. 1977. pp. 4–10.Archived(PDF) from the original on 2006-10-09.
  6. ^RSTS/E System User's Guide(PDF). Maynard, MA: Digital Equipment Corporation. 1979. pp. 4–13.Archived(PDF) from the original on 2005-03-29.
  7. ^abTOPS-10 Operation System Commands Manual. Maynard, MA: Digital Equipment Corporation. 1988. pp. 1–7. Archived fromthe original on 2017-12-04.
  8. ^TOPS-20 User's Guide. Maynard, MA: Digital Equipment Corporation. 1982. pp. 8–5. Archived fromthe original on 2017-12-04.
  9. ^TOPS-20 User's Guide. Maynard, MA: Digital Equipment Corporation. 1982. pp. 8–5.Archived from the original on 2017-12-04.
  10. ^"Re: ooh, a *real* flamewar :)".GitHub. 2000-03-24.
  11. ^"ITSTTY".GitHub.
  12. ^Peleg, Guy (2006-10-01)."OpenVMS Utilties Update"(PDF).OpenVMS News. Bruden On Shore Systems Group.Archived(PDF) from the original on 2017-12-06. Retrieved2017-11-06.
  13. ^Karels, Michael J. (1989-08-26)."Computer Systems Research Group BSD Distribution signal.h 7.5".SCCS to fossil conversion of the original University of California, Berkeley Computer Systems Research Group BSD repository. Regents of the University of California. Retrieved2017-12-05.#define SIGINFO 29 /* information request */
  14. ^Teitelbaum, Marc (1989-10-26)."Computer Systems Research Group BSD Distribution tty.c 7.18".SCCS to fossil conversion of the original University of California, Berkeley Computer Systems Research Group BSD repository. Regents of the University of California. Retrieved2017-12-05.add ^T prototype
  15. ^Teitelbaum, Marc (1990-05-01)."Computer Systems Research Group BSD Distribution tty.c 7.22".SCCS to fossil conversion of the original University of California, Berkeley Computer Systems Research Group BSD repository. Regents of the University of California. Retrieved2017-12-05.^T
  16. ^stty(1) – BSD General CommandsManual
  17. ^Lucas, Michael W (2015).Tarsnap Mastery. Tilted Windmill Press. p. 71.
  18. ^Lavigne, Dru (2004).BSD Hacks 100 Industrial Tip & Tools. O'Reilly Media.ISBN 978-0-596-55256-5.
  19. ^"BSD Overview". Apple, Inc. 2013-08-08. Retrieved2022-03-13.The BSD portion of the OS X kernel is derived primarily from FreeBSD
  20. ^"darwin-xnu/bsd/sys/ttydefaults.h".Github. Apple Computer, Inc. 2007-10-29. Retrieved2017-12-05.#define CSTATUS CTRL('t')
  21. ^"darwin-xnu/bsd/sys/signal.h".Github. Apple Computer, Inc. 2017-09-26. Retrieved2017-12-05.#define SIGINFO 29 /* information request */
  22. ^"darwin-xnu/bsd/kern/tty.c".Github. Apple Computer, Inc. 2017-09-26. Retrieved2017-12-05.Report on state of foreground process group.
  23. ^Bobrow, Daniel;Murphy, Daniel; Teitelman, W (April 1969). "Section 23.10".THE BBN - LISP SYSTEM REFERENCE MANUAL(PDF).
Retrieved from "https://en.wikipedia.org/w/index.php?title=Status_key&oldid=1308061125"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp