[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference noted::hackers_v1

Title:-={ H A C K E R S }=-
Notice:Write locked - see NOTED::HACKERS
Moderator:DIEHRD::MORRIS
Created:Thu Feb 20 1986
Last Modified:Mon Aug 03 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:680
Total number of notes:5456

420.0. "LinePrinter = NL:" by FROST::HARRIMAN (brouhaha..balderdash..ballyhoo) Thu Mar 05 1987 17:29

    Maybe one of you can help figure this one out.
    
    One of my current projects is to perform "realistic" testing of
    a new system using the same applications software our manufacturing
    cluster is using. The outcome of the test will determine whether
    or not we can upgrade our cluster from 4.2 to 4.5 (so we can put
    the new machine in the cluster)... Anyway, part of the test is to
    test the application software's calls to the queue manager. Since
    we are essentially mimicing a live system, I am going to generate
    a lot of data ("interactively" via UETP) and the perform a
    manufacturing close on it ("batch"). Problem is, this generates
    reams and reams of paper.... I don't need the output, I just want
    to exercise the machine and queue to output (via the blackbox function
    calls in the application software) to SYS$PRINT.
    
    Here's the caveat: I don't have a line printer, nor do I want one.
    But I DO want the system to think that a) it has a working print
    queue, and b) that print queue is operating. Basically I want to
    INIT/QUEUE/DEV=NLA0: SYS$PRINT (which of course doesn't work)...
    
    Any easy ideas short of hacking up a black hole printer driver?
    I have this machine to myself and I can do anything I want to get
    the test done, as long as the tests themselves are accurate exercises.
    
    /pjh
    
T.RTitleUserPersonal
Name
DateLines
420.1terminal queue ??STAR::DICKINSONThu Mar 05 1987 18:136
    
    How about setting up a terminal queue ?
    
    peter
    
    
420.2Can't.FROST::HARRIMANIt's only talk - Back talk?Fri Mar 06 1987 10:0914
    no serial cards in this machine.
    
    Also tried to set up a "null" LAT port but LATplus wants more than
    that. For instance, I set it to a real port with nothing attached
    to it and got "data set hang-up" which stopped the queue. I also
    tried to set up a false server name and port but LATplus got annoyed
    and printed "unexpected symbiont process termination" and stopped
    the queue, again.
    
    I reiterate, NO serial cards, this machine will eventually be placed
    in a cluster and the other members have the devices. Also we use
    LATs so the only serial device is OPA0:... 
    
    /pjh
420.3Generic queueJON::MORONEYLight the fuse and RUN!Fri Mar 06 1987 10:4713
You could always do something like this:

$ INIT/QUEUE/ON=NLA0: FOO
$ INIT/QUEUE/GENERIC=FOO BAR
$ START/QUEUE BAR

and dump all jobs to queue BAR.  They will hang around, waiting for someone
to start queue FOO.

When you get tired of all those jobs hanging around, kill them all, or stop the
queue and delete it.

-Mike
420.4can't get past the first statement.FROST::HARRIMANIt's only talk - Back talk?Fri Mar 06 1987 12:1815
    well,
    
    INIT/QUEUE/ON=NLA0: FOO
    
    gives "Device already allocated to another user"...
    
    We just tried making a mailbox queue and a FAKE_LP program that
    just read records from the mailbox, it hung the queue and made me
    reboot the machine. NLA0 appears to be a special case to VMS, you
    can't allocate it or assign it to anything (it's also record-oriented,
    which *is* what I want, but I can't seem to get a queue to take
    it.)
    
    .../pjh
    
420.5Slight change to .3MPGS::HARLEYWhen the going gets weird, the weird turn proFri Mar 06 1987 13:0210
I just did thr following on my VAXstation-I running V4.5:

$ Init/Que/On=Nl: Foo
$ Init/Que/Generic=Foo Bar
$ Start Bar
$ Pri/Que=Bar *.*

And I have a 580 block request pending in que Bar..

Harley
420.6almost but not quite.FROST::HARRIMANIt's only talk - Back talk?Fri Mar 06 1987 14:0212
    yeah but the queue isn't started, the job is pending. I need the
    output to appear to be printing and actually complete...
    
    We're investigating a rumored problem where the application causes
    the queue to hang when you send it mongo print requests - but the
    queue must be running for it to hang...
    
    I'm going to try a hack on NLDRIVER to make another null device,
    failing that I'll kick someone off a LAT port and connect a loopback
    or something so LAT thinks there's a device there.
    
    /pjh
420.7try this...YALI::LASTOVICANorm LastovicaFri Mar 06 1987 19:192
    There is/was a driver that I think was for DQS that made a null
    line printer.  Look in the  DQS notes file (on JUNIPR??).
420.8Pseudo Device?MONSTR::DUTKONestor Dutko, VMS/VAXclusters CSSESat Mar 07 1987 02:396
    If you have no serial lines, how about an old hack, but a good one.
    What I am implying is for you to fake out the system.  Within SYSGEN,
    try CONNECT TTA0 /NOADAPTER /DRIVER=TTDRIVER and see if you can
    use the TTA0 device for your testing...
    
    -- Nestor
420.9Interesting...thanks.FROST::HARRIMANComments,Cliches,CommentaryMon Mar 09 1987 08:5015
    re: .7
    
    	thanks Norm, I'll check it out if I can find it.
    
    re: .8 
    
    	Hmm. Interesting.... now I'll have to twiddle the status bits,
    	TTA0 is "offline"... 
    
    Thank you everybody for your help - this has been interesting -
    If none of this works it's LATSYM to the rescue, I guess I'll have
    to allocate a port for awhile...at least 8800's are quick to reboot,
    device drivers that don't work don't do much for a system's uptime.
    
    /pjh
420.10Here's one...BOEHM::GUENTHERTue Mar 10 1987 15:3981
Here's a user modified symbiont which does lineprint to "nl:".
    
To use it, extract it, BLISS it, LINK it, copy it to sys$system:,
and INIT/QUEUE/PROCESS=nullprinter null_queue.
    
    
MODULE Nullprinter (	%TITLE 'Print Symbiont'
	IDENT = 'V01-000',
	MAIN = nullprinter,
	ADDRESSING_MODE (EXTERNAL = GENERAL, NONEXTERNAL = GENERAL)
	) =
BEGIN

!
!****************************************************************************
!*									    *
!*  COPYRIGHT (c) 1984                                                      *
!*  BY DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.			    *
!* 									    *
!*  THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND  COPIED  *
!*  ONLY  IN  ACCORDANCE  WITH  THE  TERMS  OF  SUCH  LICENSE AND WITH THE  *
!*  INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR  ANY  OTHER  *
!*  COPIES  THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY  *
!*  OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF  THE  SOFTWARE  IS  HEREBY  *
!*  TRANSFERRED.							    *
!* 									    *
!*  THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT  NOTICE  *
!*  AND  SHOULD  NOT  BE  CONSTRUED  AS  A COMMITMENT BY DIGITAL EQUIPMENT  *
!*  CORPORATION.							    *
!* 									    *
!*  DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR  RELIABILITY  OF  ITS  *
!*  SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.		    *
!*									    *
!****************************************************************************
!

library 'sys$library:lib';


FORWARD ROUTINE
	nullprinter,
	output_routine;

EXTERNAL ROUTINE
	PSM$PRINT,
	psm$replace;



own
	PRIVILEGE_MASK:	$BBLOCK[8] PRESET (
	    [PRV$V_oper]	= 1,
	    [PRV$V_tmpmbx]	= 1,
	    [PRV$V_netmbx]	= 1,
	    [PRV$V_READALL]	= 1,
	    [PRV$V_SHARE]	= 1
	    );

ROUTINE nullprinter =
begin
local
    status;

status = $SETPRV (ENBFLG=1, PRVADR=PRIVILEGE_MASK);
if not .status
    then $exit(code=.status);

status = psm$replace(%ref(psm$K_output), output_routine );
if not .status
    then $exit(code=.status);

psm$PRINT(%ref(8))

end;

routine output_routine =ss$_normal;


END
ELUDOM
                                              
420.11to slow .10 down, do this...BOEHM::GUENTHERWed Mar 11 1987 09:2722
    For a slower null printer, replace the output routine in .10 with
    the following:
    
routine output_routine( req_id, work_area, func, funcdesc, funarg ) =
begin
own time_efn;
own sleep_time[2] : initial( -1*10000000,-1);  ! wait one second on each write
EXTERNAL ROUTINE
	lib$get_ef;

if ..func eql psm$k_write or ..func eql psm$k_write_noformat
    then begin
	if .time_efn eql 0
	    then lib$get_ef( time_efn );
	$setimr( efn = .time_efn, daytim=sleep_time);
	$waitfr( efn = .time_efn );
    end;

ss$_normal

end;