[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

429.0. "Phone dir "cluster"?" by NAC::CHALMERS (Ferrari Kid) Tue Mar 17 1987 17:24

    
    
    OK I'll try it again. If I'm in Phone, how do I find if a friend
    is logged in, if he/she is on a Cluster of many nodes? 
     I don't want to have to try each and every node name. I may not
    even know all the node names in the cluster.
    
     phone dir "cluster"?????
    
    DC
    
T.RTitleUserPersonal
Name
DateLines
429.1[ZARLENGA] It DependsVAXUUM::DYERAdventures in SuccessWed Mar 18 1987 12:0019
================================================================================
37934::ZARLENGA "Bigger they are, Harder they hit"   15 lines  17-MAR-1987 17:14
--------------------------------------------------------------------------------

    	You have 2 choices
    
    	1. USERS and either a command procedure to look
    	    for	the username (the way I used to do it, and
    	    as far as I know, the only easy way to do it if
    	    you're not on the same cluster)
    
    	2. CU if it's available on your cluster.  It's a
    	    cluster-wide SHOW USERS.  Really neat and much
    	    faster than USERS (which uses DECnet and the PHONE
    	    protocol).
    
    -mike

    p.s. If you like CU, take a look at CM and CS too.  Good stuff!
429.2also CE & SHOWLOGIN via CUDRIVERFROST::HARRIMANChit,Chat,Chit,Chat,Chit,ChatWed Mar 18 1987 12:021
    
429.3CU and USERS for a *different* cluster??VIDEO::OSMANEric, dtn 223-6664, weight 146Wed Mar 18 1987 15:428
What is CM and CS ?

I'm not clear how USERS or CU will help the person.

They want to find someone on a different cluster.  I thought CU and
USERS only give info about the current cluster.

/Eric
429.4not quite37934::ZARLENGABigger they are, Harder they hitWed Mar 18 1987 16:598
    CU only works on your current "cluster".
    
    USERS works on any node. As long as you know all the node names
    in a cluster,  USERS node-1,node-2, ... ,node-n will work. Of
    course the command procedure to scan the file for a username
    helps your eyes out quite a bit.
    
    -mike
429.5NAC::CHALMERSFerrari KidThu Mar 19 1987 12:142
    
    So in other words I can't use Phone?
429.6Well it all depends...FROST::HARRIMANConversation---Contradiction...Thu Mar 19 1987 13:0512
    Well if you're trying to get all members of a particular cluster,
    no. If you know all the nodes in the cluster and you don't mind
    typing them all in, go ahead. You could just write something like
    USERS and hack the PHONE protocol but it's been done. 
    
    Here's another hack: If, perchance, TASK is running on one of your
    target cluster's systems you can do a NETDCL/TELL/NEWTELL and ask
    it to SHOW CLUSTER, then parse the nodenames back. Even better,
    if the cluster has CUDRIVER installed you could do a CU via TASK
    :-)
    
    /pjh
429.7CU via TASK is a great idea!!37934::ZARLENGABigger they are, Harder they hitThu Mar 19 1987 15:150
429.8is USERS the same as SHOW USERS ?VIDEO::OSMANEric, dtn 223-6664, weight 146Thu Mar 19 1987 15:1814
Re:	"USERS can show users on any node"

	I tried

		$ show users abc

	and it said

		No such user - abc

	I was guessing that that's how you tell USERS to show users on
	node "abc".  How do I do it then ?

/Eric
429.9USERS.KIT PointerZENSNI::DCHAVEZDale C. - CXO3 Colo SpgsThu Mar 19 1987 19:2329
Eric,

Here is a pointer to the USERS kit I think they're referring to:
I used to use it, but it's painfully slow (something to do with the CLD 
file I'm told).

Dale

              <<< VNX::DISK$STC:[TOOLS]SW_TOOLS_CATALOG.NOTE;28 >>>
                   -< Software Tools Clearinghouse Catalog >-
================================================================================
Note 472.1* USERS      Show users on a VAXcluster (or elsewhere) VMS 4    1 of 1
METOO::LAMIA                                         12 lines  29-MAY-1986 21:38
                                 -< USERS.KIT >-
--------------------------------------------------------------------------------

$!	VMS Installation kit for USERS
$ USERS_VER= F$VERIFY(0)
$ COPY/LOG METOO::TOOLS$DIRECTORY:[USERS]USERS.EXE *.* ! (executable image)
$ COPY/LOG METOO::TOOLS$DIRECTORY:[USERS]USERS.COM *.* ! (command procedure)
$ DEFINE STC_USERS_SOURCE TURTLE::GILBERT
$ ASSIGN /USER NL: SYS$OUTPUT:
$ MAIL /SUBJ="USERS installed ''f$log("SYS$DISK")'''f$dir()'" -
	NL: METOO::STC,TURTLE::GILBERT
$! ASSIGN /USER NL: SYS$OUTPUT:
$! MAIL /SUBJ="Has the tool USERS been installed on this system before?"  -
!	NL: SYSTEM
$ USERS_VER=F$VER(USERS_VER)

429.10must use USERS.KIT first38002::ZARLENGABigger they are, Harder they hitThu Mar 19 1987 22:31112
    Eric,
    
    	When you type SHOW USERS, you're activating the SHOW image,
    not USERS.  Get USERS.EXE from .9.  You'll need to do a SET COMMAND
    USERS.CLD (or whatever it is, maybe an @USERS.COM which has the
    SET COMMAND in it) upon LOGIN.
    
    	Then you type USERS abc to see who's on node abc.  Note that
    you lose all verbs (is USERS since it uses .CLD file) in a subprocess.
    If you want to use USERS in a subprocess, you will have to do the
    same thing as in your LOGIN.COM that allows you to use USERS from
    the parent process.
    
    	Here's a copy of the DCL procedure I use to tell me is someone
    specific is logged in.
    
    -----------< cut here >----------------
$!			FIND_USER.COM
$!
$!	U := @U.COM
$!	U ZARLENGA                   (find ZARLENGA on the current cluster)
$!	U kaiser ZARLENGA            (find ZARLENGA on KAISER)
$!	U kaiser,pldvax ZARLENGA     (find ZARLENGA on KAISER or PLDVAX)
$!
$	vfy_set	   = f$verify(0)
$	file_open  = 0
$	sysout_def = 0
$	error_msg  = 0
$	node       = ""
$	colon      = 0
$	found      = 0
$	w := write sys$output
$	esc[0,8] = %x1B
$!
$	on control then goto ctrl_Y
$	on error   then goto general_error
$!
$	if (p2 .eqs. "") then p2 = p1
$	if (p2 .eqs. p1) then p1 = ""
$	if (p2 .eqs. "") then read/prompt="Find : " sys$command p2
$	p2 = f$edit(p2,"trim,upcase,uncomment")
$	define sys$output "SYS$LOGIN:USERS.OUT"
$	define sys$error  "SYS$LOGIN:USERS.OUT"
$	sysout_def = 1
$	users 'p1'
$	deassign sys$output
$	deassign sys$error
$	sysout_def = 0
$!
$! Must open then close to reposition file pointer at start of file!
$!
$	open/read                    in_file   SYS$LOGIN:USERS.OUT
$	close in_file
$	open/read/error=open_error   in_file   SYS$LOGIN:USERS.OUT
$ read_a_record:
$	read/error=read_error/end_of_file=the_end  in_file  record
$	if (f$extract(0,1,record) .nes.         "%") then goto not_error_msg
$	w record
$	error_msg = 1
$	goto read_a_record
$ not_error_msg:
$	if (f$extract(0,1,record) .eqs.         "$") then goto read_a_record
$	if (f$extract(2,9,record) .nes. "Directory") then goto not_new_node
$! Save the new nodename
$	colon	= f$locate(":",record)
$	node	= f$extract(24,colon-24,record)
$	node	= node - "_"		! might be a "_" before the nodename
$	goto read_a_record
$ not_new_node:
$	if (p2        .eqs.    "*") then goto found_person
$	if (record-p2 .eqs. record) then goto read_a_record
$ found_person:
$ 	if (found .eq. 0) then w esc,-
"[7m Node      Process Name    Username        Terminal        Status       ",-
esc,"[m
$! Format the output the stupid way
$	if (f$length(node) .eq. 2) then w "    ",node,":: ",record
$	if (f$length(node) .eq. 3) then w "   " ,node,":: ",record
$	if (f$length(node) .eq. 4) then w "  "  ,node,":: ",record
$	if (f$length(node) .eq. 5) then w " "   ,node,":: ",record
$	if (f$length(node) .eq. 6) then w        node,":: ",record
$	found	= found + 1
$	goto read_a_record
$!
$ ctrl_Y:
$ the_end:
$	if (sysout_def .eq. 1) then deassign sys$output
$	if (file_open  .eq. 1) then close/error=close_error in_file
$	if (error_msg  .eq. 1) then goto no_not_logged_in_msg
$	if (found      .eq. 0) .and. (p2 .eqs. "*") then -
		w "    No one is logged in"
$	if (found      .eq. 0) .and. (p2 .nes. "*") then -
		w "   ",p2," is not logged in"
$ no_not_logged_in_msg:
$	delete/nolog/noconfirm SYS$LOGIN:USERS.OUT;
$	if (vfy_set) then set verify
$	exit
$!
$ general_error:
$	w "An error has occurred"
$	goto the_end
$ open_error:
$	w "Error occurred while opening file USERS.OUT"
$	goto the_end
$ read_error:
$	w "Error occurred while reading file USERS.OUT"
$	goto the_end
$ close_error:
$	w "Error occurred while closing file USERS.OUT"
$	file_open = 0
$	goto the_end
    
429.11Are multiple PHONE connections FAST?FROST::HARRIMANConversation---Contradiction...Thu Mar 19 1987 23:2414
    
    Re: .9
    
    I never saw the source to it, but I picked at the image with PATCH
    once just out of curiosity. Wasn't that Gilbert's name on that?
    It seems to be a pretty simple hack on the PHONE protocol which
    explains it's speed (or lack thereof) on a reasonably loaded system
    (all of our could be described that way :-)
    
    I saw another tool today which gives cluster member information
    via GETSYI or something like that...I spaced and forgot where I
    saw it, though. 
    
    ?no_clue_in_vt
429.12SummaryKRAKAR::WARWICKVillage tours start hereFri Mar 20 1987 05:2715
    
    SHOW USERS	- What VMS gives you. Shows users on the current node
    		  only.
    
    USERS	- Available from Toolshed, uses Phone protocol so can
    		  be used to show the users on any node which has Phone
    		  enabled.
    
    CU		- Utility that uses the facilities provided by CUDRIVER
    		  to do the same thing as SHOW USERS, but cluster-wide,
    		  rather than just for the current node. This is not
    		  part of standard VMS.

    
    Trev
429.13more info37934::ZARLENGABigger they are, Harder they hitFri Mar 20 1987 14:4415
    	A previous note asked "what's CM and CS".
    
    	CM - cluster wide monitor.  Something like MONITOR CLUSTER
    but much faster - uses CUDRIVER instead of DECnet.
    
    	CS - cluster wide SHOW SYSTEM command.  This also uses CUDRIVER
    for node to node cluster communications.
    
    	These are really nice.  If they're not on your cluster yet,
    beg operations for them.  I use CM and CU at least 5 times a day.
    CM is especially handy when looking for the least used VAX in
    your cluster.  By the time MONITOR CLUSTER starts uo you could
    be asleep.
    
    -mike