-
From a command prompt, type each of the following
commands (note that they are not case sensitive):
STAF LOCAL PING PING
-
This command verifies that you can communicate
with STAF.
STAF PING PING PING
-
What result do you get? ___________________________________________________________
-
Why? ___________________________________________________________
STAF LOCAL VAR LIST
-
This command shows you all of the STAF variables
on your machine.
-
What command would you execute to list the
configured STAF services (hint: the Service Service)? ___________________________________________________________
STAF LOCAL SERVICE LIST REQUESTS
-
This commands lists all of the executing requests
(you should only see the "list requests" request).
STAF LOCAL HANDLE LIST HANDLES
-
This command lists all of the current STAF
handles.
STAF LOCAL HANDLE LIST HANDLES
-
Compare this with the output from the previous
command. What are the differences?
STAF LOCAL PROCESS LIST
-
This command lists all of the current STAF
Processes.
STAF LOCAL PROCESS START COMMAND NOTEPAD
-
This command starts the Notepad
Process.
STAF LOCAL PROCESS LIST
-
This command lists all of the current STAF
Processes. Note that you should see the Notepad process. Now, close the
Notepad window.
STAF LOCAL PROCESS LIST
-
This command lists all of the current STAF
Processes. What is the RC of the Notepad process?
STAF LOCAL LOG HELP
-
This command displays the Help for the Log
Service.
STAF LOCAL HELP ERROR [Error Number]
-
This command displays the Help for the specified
error number.
STAF LOCAL SHUTDOWN SHUTDOWN
-
This command will shutdown staf.
STAF LOCAL PING PING
-
What do you get as the result? ___________________________________________________________
-
Why did you get this? ___________________________________________________________
-
Now restart STAFProc
STAF LOCAL PING PING
STAF LOCAL HELP ERROR 21
STAF LOCAL VAR RESOLVE STRING {STAF/Config/MachineNickname}
-
This command displays the value of variable
STAF/Config/MachineNickname
STAF LOCAL LOG LOG MACHINE LOGNAME log1 LEVEL info message test-message
-
This command creates machine log (associate with
the MachineNickname) called log1 and writes an informational message to the
log.
STAF LOCAL LOG LIST MACHINES
-
This command list the machines for which machine
log exist. Notice that it shows the MachineNickname.
STAF LOCAL LOG QUERY MACHINE xxx.austin.ibm.com LOGNAME log1
-
Note: change "xxx" to your hostname. This command
queries the machine log named log1. Note that you need to specify the hostname
for the "MACHINE" option. Now, add the following to your STAF.cfg file:
MACHINENICKNAME testmachine1
and restart STAF.
STAF LOCAL VAR RESOLVE STRING {STAF/Config/MachineNickname}
-
This command displays the value of variable
STAF/Config/MachineNickname (which should be "testmachine1").
STAF LOCAL LOG LOG MACHINE LOGNAME log2 LEVEL info message second-message
-
This command creates machine log (associate with
the MachineNickname) called log2 and writes an informational message to the
log.
STAF LOCAL LOG LIST MACHINES
-
This command list the machines for which machine
log exist. Notice that it shows the MachineNickname testmachine1.
STAF LOCAL LOG QUERY MACHINE testmachine1 LOGNAME log2
-
Notice that now you can use the machine nickname
for the MACHINE option.
STAF LOCAL MISC LIST INTERFACES
-
This command will list the network interfaces
that are currently configured.
-
Which TCP/IP ports are being used? ___________________________________________________________
-
Which one is encrypted? ___________________________________________________________
-
Now try some of the commands, substituting
a neighbor's machine hostname instead of "local" in the commands.