,
primarily the work of Jürgen Schönwälder, adds network
management extensions to Tcl/Tk. The
tnm portion of scotty adds
network administration support. The tkined
portion of scotty, described in the next
section, is a graphical network administration program. What
tnm adds is a number of network management
commands. These include support for a number of protocols including
ICMP, UDP, DNS, HTTP, Sun's RPC, NTP, and, most significantly,
SNMP. In addition, there are several sets of commands that simplify
writing network applications. The netdb command
gives access to local network databases such as
/etc/hosts, the syslog
command supports sending messages to the system logging facilities,
and the job command simplifies scheduling tasks.
A few examples should give an idea of how these commands could be
used.
You can invoke the scotty interpreter directly
as shown here. In this example, the netdb
command is used to list the /etc/host table on a
computer:
bsd4# scotty
% netdb hosts
{localhost.lander.edu 1.0.0.127} {bsd4.lander.edu 239.63.153.205} {bsd4.lander.e
du. 239.63.153.205} {bsd1.lander.edu 231.60.153.205} {sol1.lander.edu 233.60.153
.205} {lnx1.lander.edu 234.60.153.205}
% exit
The results are returned with each entry reduced to the canonical
name and IP address in brackets. Here is the host table for the same
system:
bsd4# cat /etc/hosts
127.0.0.1 localhost.lander.edu localhost
205.153.63.239 bsd4.lander.edu bsd4
205.153.63.239 bsd4.lander.edu.
205.153.60.231 bsd1.lander.edu bsd1
205.153.60.233 sol1.lander.edu sol1
205.153.60.234 lnx1.lander.edu lnx1
Note that there is not a separate entry for the alias bsd4.
Here are a few examples of other commands. In the first example, the
name of the protocol with a value of 1 is looked up in
/etc/protocols using the
netdb command:
% netdb protocols name 1
icmp
In the second example, a reverse DNS lookup is done for the host at
205.153.63.30:
% dns name 205.153.63.30
sloan.lander.edu
Finally, an ICMP ECHO_REQUEST is sent to
www.cisco.com:
% icmp echo www.cisco.com
{www.cisco.com 321}
The response took 321 ms. Other commands, such as
snmp, require multiple steps to first establish
a session and then access information. (Examples are given in .) If you are interested in using these tools
in this manner, you will first want to learn
. You can then consult the manpages for these
extensions. A number of books and articles describe
. The source is freely available for all these
tools.