unix.perrpt Verb: TCL2/Unix

unix.perrpt

Command unix.perrpt Verb: TCL2/Unix
Applicable release versions: AP/Unix
Category Unix (24)
Description displays, clears, restarts or suppresses the Pick error log maintained on Unix. The system automatically logs every boot, shutdown and incidents or abnormal procedures related to a Pick virtual machine.

Options are specified by the following flags:

-e {code}
Displays errors only. Boots and shutdowns are not displayed. If 'code' is specified, only the log entries with this error code are displayed.

-h
Displays only the header of the log entries (short form). The following information is displayed:
Unix date and time
Virtual machine key
Monitor version
Error code,
Error description,
Port number (PIB).

-f file.name
Uses 'file.name' as the log file, instead of the default.

-p pib
Displays all entries logged by the the Pick port 'pib', expressed in decimal.

-a
Displays logs for all virtual machines.

-k key
Displays error log for the virtual machine specified by 'key'. The virtual machine key is specified using standard C syntax: 0xNNNN for a hexadecimal number, NNNN for a decimal number and 0NNNN for an octal number.

-x key
Displays error log for all virtual machines except the one specified by 'key'. The virtual machine key is specified using standard C syntax: 0xNNNN for a hexadecimal number, NNNN for a decimal number and 0NNNN for an octal number.

-c
Clears the error log and restarts error logging. Requires 'root' privilege.

-s
Clears error log and stops the logging process. Requires 'root' privilege. After this command is issued, no error logging will take place. Error logging is restarted by using the '-c' flag. The trace is re-activated automatically every time Pick is (re)installed on the system.

The log is kept is the file '/usr/tmp/ap.log'. Each log entry has the Unix time and date of the incident, the key in hexadecimal of the Pick virtual machine, an error code, the process port (PIB) number of the process which LOGGED the error (not necessarily the process which had a problem) and optional information in form of a hexadecimal dump. The following explains briefly each error and the format of the additional data:

1 Boot

2 Shutdown

3 Line 0 or the flusher received a SIGTERM. When the flusher receives this signal, it shuts the virtual machine down. There should be two shut entries when the system is shut down properly (i.e., there is log entry for a shutdown). If not, the system was shut down abnormally ('ap -k' for example).

4 Process killed. When a Pick process does not respond, 'logoff' will escalate and send a signal SIGKILL to the Pick process. The additional information is (in hexadecimal):

<pib+1 of killed process> <pib+1 of killer>

5 Process abort. When a process receives a serious abort signal (SIGSEGV, SIGBUS, SIGTRAP, etc...) the machine registers are dumped in the additional data (in a format implementation dependent).

6 Security failure. Wrong activation code.

7 <reserved>

8 Tape error. The additional information contains:

<cmd> <devnum> <errno>
<cmd> 0 Read
1 Write
<devnum> Tape device number, in hex.
<errno> Unix error code, in hex.

9 Tape buffer allocation failed. The internal tape buffer is allocated dynamically. If this fails because Unix is temporary out of memory, the 'set-device' command may appear to hang.

10 Keyboard read error. A process attempted to read from 'stdin' (normally a keyboard), and got an error. The process will be disconnected. The additional information is (in hexadecimal):

<pib> <errno>

11 Terminal write error. A process attempted to write to 'stdout' (normally a terminal) and got an error. The additional information is (in hexadecimal):

<pib> <errno>
Syntax perrpt {-e {code}} {-h} {-f file.name} {-p pib} [-a|-k key|-x key|-c|-s]
Options
Example
perrpt -a | pg
Shows all errors log, stopping at each page.

perrpt -e -k 0x29733 | lp
Shows only the errors relative to the virtual machine with the key 0x29733 
(hexadecimal), and pipes the result to the Unix spooler.

perrpt -c
Clears error log, but leaves it active, or restarts it if it was stopped.

perrpt -s
Stops error logging.

perrpt -e 4 -h
Shows all entries with an error code=4, in a short form.

mv  /usr/tmp/ap.log  /usr/tmp/ap.log.monday
perrpt -a -f /usr/tmp/ap.log.monday

Save the current error log in the file 'usr/tmp/ap.log.monday' and 
list it.
Purpose
Related unix.ap.log
halt.codes