| shp-kill | Index Level | shpstat |
| Syntax | shp-status {(options} |
| Category | TCL |
| Type | Verb |
| Description |
displays status information about printers shared with Unix, started by the TCL command "startshp".
The following information is displayed: 'VMname' Name of the Pick virtual machine which uses the shared printer. 'Prt' Pick printer number, as specified in the startshp copmmand. 'Port' Pick port number the printer process was started on. 'PID' PID of the 'lppick' process associated to the Pick printer process. This process acts as a filter between the Pick printer output, which is a continuous data stream, separated by 'end of job' sequences, and the Unix spooler which accepts separate jobs. 'Spooler command' Unix command used to spool data. Only the first 32 characters of the command are displayed. 'Status' This field report the activity or the Pick printer process and the existence of the lppick filter. The possible values are: 'OK' Both processes are alive. 'prt OK' The Pick printer is alive and seems in a normal state. 'prt ERR' The Pick printer is alive but appears in a wrong state. 'prt DEAD' The Pick printer process has been killed. 'lp OK' The lppick process is alive. 'lp DEAD' The lppick process has been killed. For normal operations, the status should be 'OK'. However, if the filter process gets killed, the output of the Pick printer process will not be able to be sent to Unix. Issuing the 'startshp' command again should clear the situation and restart the necessary processes. If the (T) option is used, the trace information recorded is displayed, starting with the newest trace entry. The following information is displayed: tr# Date Time Description where: tr# : Trace number in decimal. Date : Date. Time : Time (Note: The Pick time is displayed) Description: "Start job" Beginning of a job "End job, size=N (-1,10)" End of a job. 'N' is the size in decimal. The values between parentheses are internal return codes. "Write data, size=N" Write 'N' bytes of data to the 'lp' command. "Read error, errno=X" Encountered a read error on stdin. 'X' is the decimal value or 'errno' "Write error, errno=X, expsz=N, sz=M" Encountered a write error on stdout (to the lp command). 'X' is the decimal value of errno, 'N' is the number of bytes we attempted to write, and 'M' the actual number of bytes written. "Raw read, size=N,'<texte>'" Raw data read from stdin (coming from the Pick printer). Non printable characters are replaced by a '.' 'N' is the total size. This trace is available only when the trace level 3 is used. "Raw write, size=N,'<texte>'" Raw data written on stdout (to the lp command). Non printable characters are replaced by a '.' 'N' is the total size. This trace is available only when the trace level 3 is used. |
| Options | t{n} Display trace information. If 'n' is nort specified, all traces are shown, starting by the most recent. If 'n' is specified, only that number is shown for each printer. |
| See Also | startshp lppick shp-kill listptr |
| Example |
shp-status
VMname Prt Port PID Spooler command Status ------ --- ---- ---- -------------------- --------------- pick0 0 126 1763 'exec lp -onobanner' OK dev 0 32 1765 'exec cat >> xx' prt OK lp DEAD prod 0 44 345 'exec lp -s' prt ERR lp OK The first line indicates that the first shared printer is the printer 0 of the virtual machine 'pick0', started on the port 126, sending its data to the normal 'lp' command, suppressing the banner. It appears to be ok. The second line indicates that the second shared printer is the printer 0 of the virtual machine 'dev', started on the port 32, sending its output to the Unix file 'xx' (on whatever directory the command 'startshp' was issued on). The Pick printer process is still up, but the 'lppick' filter is dead, possibly because the file 'xx' was write protected, or may be because the Unix file system is full. The third line indicates that the second shared printer is the printer 0 of the virtual machine 'prod', started on the port 44, sending its data to the normal 'lp' command, suppressing lp messages. The Pick printer process is still up, but in an incorrect state, probably because a 'sp-kill' command was issued, which sent the process back to logon, without terminating the UNix process. The 'lppick' process appears OK. To terminate a shared printer properly, use the TCL command 'shp-kill'. shp-status (t VMname Prt Port PID Spooler command Status ------ --- ---- ---- --------------------- --------------- pick0 0 126 1763 'exec lp -onobanner' OK tr# Date. Time.... Description 3 03/03 13:14:00 End job, size=1223 2 03/03 13:13:55 Start job 1 03/03 13:14:00 Start lppick Display trace information. |
| Warnings |
The fact that all the processes involved in sharing the printer are 'OK' does not mean everything is well. There could be some problem in the Pick spooler (are the form queues assigned properly?; is the device associated to the form queue of the appropriate type, like lp.unix?; is the Pick job queue full?; is the Pick printer active?) or in the Unix spooler (is the Unix command used in the 'startshp' command correct?; is the Unix spooler daemon active?; for remote printers, is the network active?
When used with a level 3 trace, the size of the trace file will increase very rapidly. The trace is disabled by stopping the printer with a 'shp-kill'. |
| Compatibility | D3/Unix |
| shp-kill | Index Level | shpstat |