If you have a routine you think might be useful, this is what you do...
In the program... Put in at least the following documentation at the top of the program.. What it does. What parameters it takes. Who wrote it & When.
As a separate file.. Create a document describing the utility for the user. Describe what it does, and the parameters (as in the program) plus details of any error messages it produces , who wrote it and what level of support you offer etc. etc. This need not be very long - a screenful will often do.
Ask me (JHB) for the USEFUL password if you don't know it already. Put your
source and .MOB files in USEFUL: and mail me details of where the
documentation file is. I will then put it in HELP USEFUL.
** End of JHB Bit **
These utilities are contained in the directory 'USEFUL' on the new filestore
and may be accessed by adding either of the commands USEFUL:SETUP or
SETUP USEFUL to the end of your login file, or editing USEFUL:SETUP.MOB
into your login file (this on is not recommended as new commands and system
changes will leave you behind).
*** If you do not currently either preload USEFUL:WHODAT.MOB or give the
*** command SETUP USEFUL in your login file, then you should, as about 90%
*** of all programs contained in USEFUL use it and you will get a very poor
*** response if you do not preload this file as it will be loaded every time
*** you use one of the commands, then thrown away.
Suggestions for new commands are always welcome, or why not implement some yourself.
FIND user{,user,user...} eg } FIND GJK finds GJK
} FIND GDMR,RWT finds GDMR and RWT
This command is used to find a person (as on VAX). If the user is logged on then his location is printed, otherwise a message left by that user (using the command GONE) is printed.
Supported by AJS
FINDALL
This command is used to print the 'GONE' message of every user that has used the GONE command.
Supported by MDP
GONE message e.g. } GONE Home to bed
This command is used to leave a message and log off. Other users can read the message by using the command FIND (or FINDALL).
e.g. } GONE Home To Bed
AJS going Home To Bed at 03.34 am on the 1st of April 1984
Supported by MDP
LASTLOG
This allows the user to keep a note of when they last logged on, this is stored in a file 'LOGIN.LOG'. If this command is put in your login file, then the date and time of your last login are printed out, then the current date and time are written to this file. You can then see if you logged in when 'YOU' were not around.....
Unsupported
NAME wildname e.g. } NAME gr looks for all names &
usernames with 'GR' in
them.
} NAME * prints everybody.
This command is used to find the username or full name of someone for whom you only know part of the name. Useful if their username is not what you expect it to be (e.g. on vax). The names are not matched phonetically as on VAX but this may be implemented.
e.g. } NAME mart
Martin Platts (MARTIN) but this would be under MDP on VAX.
Supported by MDP
PORTANAL
This command gives info on the ports connected to the filestore, i.e. where they are and how active (how long since it was last used, useful for killing ports). It now gives the name of the person using that port if there is someone, other- wise it says the port is '*Free*'.
Supported by MDP
*** Working, but killing of ports is not permitted by law (i.e. GDMR) ***
PORTKILL e.g. } PORTKILL prompts for all ports.
} PORTKILL 23 kills port 23.
This command requires the user to be privileged so that ports connected to the filstore can be killed remotely. It displays the port number, where it is connected to and what activity state the port is in, and prompts. Any answer beginning with 'Y' or 'K' will perform the kill.
Unsupported
Contributed by ICE
Unsupported
SUICIDE
This command is useful in killing off spare processes under your username that Rainer & EFTP have left lying about the system. It will prompt you for each process in turn and you type either 'Y' or 'y' if you want it deleted, anything else will do nothing (e.g. Return).
Privileged users are allowed to kill any process on the system so be careful what you say to Rainer. When killing other users off the full word 'YES' or 'yes' is needed.
Supported by MDP
USERS
This command displays all currently logged on users and their locations. Various qualifiers are available and the qualifiers may be shortened. The number of remote users is displayed at the bottom of the display along with the number of internal filestore copies, these 2 figures are only shown if non zero.
} users/active displays the users and roughly how active they
are. (This is done by looking at when they last
communicated with the File Server and thus if
the user is engaged in a long edit it may appear
that the user is asleep)
} users/brief displays just the usernames
} users/full displays the users plus their station ID
\ } users/remote displays those users who are logged on from
ECSVAX or ECSUNIX
} users/alpha {/wee} these commands allow the user to see who is using
} users/bravo {/big} one of the other APM filestores on the system.
} users/portable {/mini}
} users/all this is the same as '/wee/big/mini'.
} users/uic displays the UICs (according to VAX) of the
logged on users
} users/verybrief displays the number of logged on users
} users/group=51 displays the logged on users with UICs of group 51
Supported by AJS
*** Super new enhanced program ***
VFILES wildfile e.g. } f w::x*: displays all files on WEE fs
in all dirs. starting with X.
} f .mob displays all .MOB files
} f fmacs:* displays all extensionless files
in directory FMACS
This command is an implementation of the FILES command for VAX, it also accepts a few qualifiers which should come after the command and be separated by a space from the parameter (if any). This now accepts node names as part of the filespec standard names are accepted as nodename '::' normal pathname.
} f/today displays all files modified today.
} f/yesterday displays all files modified yesterday.
} f/info displays all information {f/i, same as f/p/s/d}.
} f/perm or f/prot displays the protection on the files {f/p}.
} f/size displays the file sizes {f/s}.
} f/date displays the last written date of the file {f/d}.
} f/short displays the information in short format (as fmac:f).
A new feature has been added to files, in that the command now can take wild carded directories, hence commands such as the following are possible.
} f s*:*.mob all .MOB files in directories beginning with S
} f P::*W*:** all files in any directory with a W in on PORTABLE FS.
} f GMC.%:* all extensionless files in directories beginning with
'GMC.' followed by a single letter or digit.
The program also gives a different output if the file to be searched for does not contain wild cards, in this case the output merely lists the directories found containing such a file.
} f *:login.mob lists all directories containing a login file.
This command is culled from the old VFILES and the old FINDFILE (as requested by HMD).
Supported by MDP
%const %integer Min FS Users, { a lower bound on the range
Max FS Users { the number of actual acreditted users
! This array contains the usernames of the users on this filestore.
! the 3 arrays are parallel and refer to the same order of users.
external %string (6) %array %spec FS Users (Min FS Users : Max FS Users)
! This array contains the real names of the users on this filestore.
external %string (31) %array %spec FS Names (Min FS Users : Max FS Users)
! This array contains the group of the users on this filestore.
external %byte %integer %array %spec FS Grps (Min FS Users : Max FS Users)
These are utility routines required by some of the programs contained in the user USEFUL. They are really for us but others may use them.
! Converts 'IT' into Upper Case
external %routine %spec Upper Case (%string(*) %name it)
! Converts 'IT' into Lower Case
external %routine %spec Lower Case (%string(*) %name it)
! returns the index of 'WHO' in 'FS Users', Max FS Users+1 if not found.
external %integer %fn %spec Find Index (%string (7) who)
! returns the current directory.
external %string (6) %fn %spec Current Directory
! returns the username of the current user, "" if not logged on.
external %string (6) %fn %spec Current User
! returns xx in a hex string
external %string (2) %fn %spec Hex 2 (%integer xx)
! breaks 'LINE' over lines every 80 cols. (no final newline)
external %routine %spec Format (%string (255) Line)
! returns true if S matches the 'wild string' P.
external %predicate %spec Matches (%string (*) %name s, p)
! Prints 'COUNT', followed by 'WHAT', followed by 's' if 'COUNT' # 1
external %routine %spec Announce (%string (80) What, %integer Count)
! Returns the number of minutes since the latest of the 2 times.
external %integer %fn %spec Minimum Difference %alias "USE_MinDiff" %c
(%string (31) One, Two)
%record %format User Fm (%string (6) User Name, {User Name of this user }
%string (6) Directory, {Current directory(e.g. SET)}
%string (21) Login Time,{Time user logged in }
%byte Uno, {Filestore User No }
Pno, {Filestore Port No }
Flags, { #0 if Privileged }
Location, {Terminal Ether Address }
%short Difference) {Minutes since did something}
! Reads the list of users on the system, returns them in the array
external %routine %spec Get Unos From FS %alias "USE_GFsUnos" %c
(%record (User Fm) %array %name Users (1:*),
%integer %name Number of Users,
%integer %name Number of Internal Copies)
-- The commands now use a file of external routines and data, this means that
the database of usernames, names, user groups and various utility routines
can now be shared between all programs rather than one copy each as
before.
*** This means that if the user does not preload this object file
*** as described earlier then they will get very poor response
*** from about 90% of the programs contained in USEFUL.
-- More wildcards are now permitted, notably in VFILES, CLEAN and FINDFILE.
} Preload Useful:WhoDat.Mob
In your login file, if you use 'USEFUL:SETUP' or the better 'SETUP USEFUL', then this will do this for you.
Wherever qualifiers are given to commands, the symbol '/' is used as in VAX/VMS, all commands use 'PAM' and so the default settings do not allow the use of '/' here but use '-'. The separators between parameters are also different, they are shown here as a space (as VMS) rather than the default '/'.
To use the 'space' and '/' (remember IMP & IE & ECCE also use PAM) the command sequence is:
} Pamset
GroupSeparator then Keyflag: /
Many commands take parameters and qualifiers, some of which are not easy to remember. PAM provides a way of deternining these parameters at runtime, by specifying the command you require followed by '??', PAM will prompt you for all parameters and qualifiers showing their default values (if they have one).
Alistair Scobie (AJS) and Martin Platts (MDP) CS4 83/84
SEARCH
PERUSE
CLEAN
The idea of a user database (USEFUL got there first)
Some bits of ID
view:Useful printed on 09/02/89 at 17.24