These tools are an interface library created by Internet Direct, Inc. to 
work with the Livingston Enterprises Portmaster series of products 
utilizing the "Portmaster" or PM protocol, including such equipment as 
terminal servers and routers. You need to have Perl5 installed to run these
tools.

The purpose in the design of these tools is to implement a basic set of 
command line monitoring and control tools for the PM systems that is easy 
to use and platform independent.

Don't expect a lot of support. 

Please send all of your enhancements to gem@rellim.com so
that we can update the master files and, just maybe, we can finally 
have some portmaster tools that are worth using!

==============================================================================
			T H E   A C T U A L   I N D E X ! ! ! 

				Library File

pm.pl	-	This is the main library file used by the following tools
	listed below and utilizes the undocumented "Portmaster" protocol.
	One benefit of this is that it maintains the speed and functionality
	available through pmcommand. You are not going to go far without
	this library! Please examine this file for variables you may wish to
	set prior to using the following tools.


				Useful Tools

pmcommand - This program will open up a session to the portmaster, exactly
	mimicking pmcommand. It is a fully interactive tool, with the same 
	benefits and limitations as pmcommand.

<portmaster> = The hostname or IP address of the Livingston equipment you are
		attempting to connect to. (Make sure the DNS is correct for
		your host to insure that this will work!)
<password>   = This is the password for the <portmaster> machine. If left
		blank, all of the tools will attempt to use the password
		hardcoded in the pm.pl library file.

<portnumber>=  The port number being affected, such as S5 or 5. (The S in
		front is not necessary).

	'pmcommand' can be used in three ways, as can pmcommand.

	usage 1: pmcommand <portmaster> [<password>] 
	If you leave off the password, It will use the password that is set
	in the pm.pl library file. You can also echo commands to this program
	and they will execute on the portmaster.

	At this point, you will have a pmcommand prompt and can use it in the
	same way you would normally use pmcommand or a telnet session in to
	Livingston equipment. For example, you could type 'show global'
	without the quotes to quickly get the requested information.

	usage 2: echo 'show global' | pmcommand <portmaster> [<password>] 
	This is basically the same as usage 1, but it performs one specific
	command and then closes the session.

	usage 3: cat Script.pm | pmcommand <portmaster> [<password>] 
	This is basically the same as usage 2, but it sends and executes a
	series of commands at one time and then closes the connection.


pmall   - This is a demonstration tool that allows you to emulate the use
	of the above tool, pmcommand, on a series of hosts consecutively 
	without re-running the command. The list of hosts included is set
	by editing the pm.pl file. NOTE: The passwords for all included hosts
	must be the same for this command to function properly.

	usage: echo 'show global' | pmall
	Example: echo 'set password IluvISite' | pmall

pmfree	- This utility will reset all telnet connections to a portmaster.
	Occasionally, one of our portmasters will get a bunch of telnet
	sessions hung open to the portmaster making it impossible to open
	any other telnet sessions to the same machine. This tool fixes the
	problems.

	usage: pmfree [<portmaster> [<password>]]

        If no host is specified, then @All hosts are reset

pmwho   - This uses the Portmaster secret command to get all of the 
	information available for a particular portmaster.

	It also stores all of the port information into an associative array
	so that it can be scripted, formatted and outputted for custom
	checks or reports.

	usage: pmwho [<portmaster> [<password>]]

        If no portmaster is specified it checks @All portmasters.

pmwho2  - Another variant of pmwho.  This one can be used as a cgi-bin
        script to output html.

	usage: pmwho [-v] [-html]

	-v    Be verbose
        -html for use as a cgi-bin script

pmchk   - Another variant of pmwho.  This one has more options and slightly
        different output.

	usage: pmchk [-v] [-r] [-x xx] [-H x]

	-v    Be verbose
        -r    reset idle ports
        -x xx flag ports in use more than xx minutes (Hogs)
              0 disables
        -H x  if x is non-zero, reset Hogs

pmwhoall- gone...  this has been merged in to pmho

pminfo-	This is a very quick way to get a lot of the info that is shown
	in a show global command.  Not all of the info that you get with
	show global is printed, but enough to make the program useful is.
	This is similar to the output of show global, but is a faster command
	that is sent using the pm protocol directly.

	usage: pminfo <portmaster> [<password>]

pmreset-  Exactly what the pmreset command from Livingston is supposed
	  to do (reset a port on a particular machine).

	usage: pmreset <portnumber> <portmaster> [<password>]

pmsport-  Use this to save all of the port settings in a format that can
	be fed back into pmcommand or pm. This is something that we are
	particularly proud about (well, the idea, not necessarily the full
	implementation).

	usage: pmsport <portmaster> [<password>] [<portnumber>] 
Note: If the password is not included, you cannot include a port number.

	Example of how this could be used:
	./pmsport phx-ts1 SamplePasswd s1 | ./pmcommand phx-ts254

pmdebug- This is a BMPtools programmers' utility. It returns the raw 
	values returned by the Terminal server about a portmaster.
	It can be used to display the currently "Un"known variables the
	portmaster returns.

	usage: pmdebug <portmaster> [<password>]

pmfingerd- This daemon listens on the finger port (or can be called via
        inetd) and will respond with who is on a terminal server. This
	utility appears to run at variable speeds, and the determining
	factors are network load and the priority given it by the portmasters
	based on how busy they are.

	To run daemon: ./pmfingerd

	The hostame is the name of the computer that pmfingerd is running on.

	usage: finger <portmaster>@hostname.com
					   .net
					   .org
					   .mil
					   .ca  eh!
					   .etc

Well, that's it for now. Please look for updates and new versions on this 
ftp site: ftp.rellim.com:/pub/admin

Please remember to e-mail your updates to :  gem@rellim.com

Thank you and we look forward to your comments and suggestions!
