prepare a 1.1 upstream release upstream upstream/1.1
authorBdale Garbee <bdale@gag.com>
Sun, 3 Jan 2021 17:11:02 +0000 (10:11 -0700)
committerBdale Garbee <bdale@gag.com>
Sun, 3 Jan 2021 17:11:02 +0000 (10:11 -0700)
examples/stats/README [new file with mode: 0644]
examples/stats/fhg1106.sts [new file with mode: 0644]
examples/stats/fhgstats [new file with mode: 0644]
examples/stats/pp1106.sts [new file with mode: 0644]
examples/stats/ppstats [new file with mode: 0644]
examples/stats/telpp [new file with mode: 0644]

diff --git a/examples/stats/README b/examples/stats/README
new file mode 100644 (file)
index 0000000..ef13615
--- /dev/null
@@ -0,0 +1,9 @@
+These are some simple 'expect' scripts written by John Conner WD0FHG to help
+gather stats from Packeten switches, along with sample outputs from some of
+the scripts.  
+
+These will require substantial modification for use in other environments, but
+hopefully get the point across that interacting with a switch using 'expect'
+is pretty easy.
+
+Bdale
diff --git a/examples/stats/fhg1106.sts b/examples/stats/fhg1106.sts
new file mode 100644 (file)
index 0000000..16f83f8
--- /dev/null
@@ -0,0 +1,77 @@
+Mon Nov  6 16:08:17 1995
+spawn telnet 44.32.0.32 
+Trying 44.32.0.32...
+Connected to 44.32.0.32.
+Escape character is '^]'.
+
+Gracilis NOS302 (gw.wd0fhg)
+
+Callsign / login: WD0FHG
+Password: 
+
+
+Gracilis NOS302 NET/ROM Emulator
+j 
+ax4:
+Callsign    Last  Heard  Packets        Callsign    Last  Heard  Packets
+WD0FHG       0:00:03:23       14
+A6YKE0-1     0:05:56:56        1        WA6YKE       0:05:20:06      176
+N0UOD        0:00:11:44      912        K0YUM        0:05:23:34       10
+KE0GB-1      0:00:13:27     7025        N0NJY-2      0:00:01:06     2720
+KE0GB        0:19:28:27        7        KB0KQH-3     0:00:12:59     4596
+N0NJY        0:00:05:12     1970        K0QDF        0:20:22:06      355
+ax1:
+Callsign    Last  Heard  Packets        Callsign    Last  Heard  Packets
+WD0FHG       0:00:09:16        9
+WA6YKE       0:05:23:36        3        K0YUM        0:00:07:09    16045
+KE0GB-1      0:00:03:53    34343        KE0GB        0:17:26:03       65
+N0IAK        0:00:05:33    38735        N3EUA-8      0:00:09:39     3912
+N0QCU        0:00:36:54      260        
+@
+The escape character is: CTRL-X
+$empire>uptime
+Time since last system restart:   1 Week(s), 3 Days, 02:17:08
+$empire>syncstat
+PackeTen Switch Sync Channel Statistics
+
+68302  RxChars   RxPacks  Rxerrs  Aborts  RxBf   Txchars   TxPacks TxUns  RxNoBf
+----- ---------  -------  ------  ------  ----  ---------  ------- -----  ------
+    1  14976052   189537    7185   59938     8      93915     1580     0       
+0
+
+8530   RxChars   RxPacks  Rxerrs  Aborts  RxBf   Txchars   TxPacks TxUns  RxNoBf
+----- ---------  -------  ------  ------  ----  ---------  ------- -----  ------
+    4   2394020    21908    1685   16012     3     139103     1878     1       
+0
+
+$empire>asystat
+PackeTen Switch Async Channel Statistics
+
+Dev Name 302      RxChars     TxChars    Overruns   FramingErrs 
+-------- ----    ---------   ---------   --------   ----------- 
+     sl0    0            0           0          0             0
+     sl2    2       121948      180044          0             0
+
+
+$empire>dom db
+ppfma.ampr.org.        480000  IN      A       44.32.4.2
+ke0gb.ampr.org.        480000  IN      A       44.32.4.80
+k0yum.ampr.org.        86400   IN      A       44.20.15.195
+$empire>route
+Dest            Len Interface    Gateway          Metric  P Timer  Use
+44.32.0.33      32  sl0                           1         0      0
+44.32.0.34      32  sl2                           1         0      2661
+44.32.0.2       32  ax1          44.32.4.1        1         0      1
+44.32.0.80      30  ax1          44.32.4.80       1         0      0
+44.20.0.192     29  ax1          44.32.4.192      1         0      10
+44.32.0.72      29  ax1          44.32.4.72       1         0      0
+44.32.0.0       28  ax1          44.32.4.1        1         0      0
+44.32.4.0       24  ax1                           1         0      1017
+44.32.0.0       23  ax4                           1         0      427
+44.20.0.0       16  ax1          44.32.4.16       1         0      401
+default         0   ax1          44.32.4.16       1         0      0
+$empire>exit
+Leaving Sysop mode...
+
+b
+Connection closed by foreign host.
diff --git a/examples/stats/fhgstats b/examples/stats/fhgstats
new file mode 100644 (file)
index 0000000..7ba75b2
--- /dev/null
@@ -0,0 +1,41 @@
+#!/usr/local/bin/expect --
+# a dumb little 'expect' program to check the status of gw.wd0fhg.ampr.org
+
+set timeout 5
+set addr "44.32.0.32"
+set call "WD0FHG"
+set pass ""
+set prompt "empire>*"
+
+puts [timestamp -format %c]            ;# time tag the output
+
+spawn telnet $addr
+expect "login: " { send "$call\r" }
+expect "word: " { send "$pass\r" }
+
+expect "NET/ROM*"  { send "j \r" }     ;# for now we will just look at ax0
+
+expect  {                      ;# no easy way to tell that the list is 
+                               ;# complete so we'll just time out
+       "NET/WRONG*"  {}        ;# looking for we can't find.
+       }
+
+expect "*"     { send "\r@\r" };# flush the expect buffer and go to sysop
+
+expect $prompt { send "uptime\r" }
+expect $prompt { send "syncstat\r" }
+expect $prompt { send "asystat\r" }
+expect $prompt { send "dom db\r" }
+expect $prompt { send "route\r" }
+expect $prompt { send "exit\r" }
+
+expect "mode...*"      { }
+
+expect "*"     { send "\rb\r" };# flush the expect buffer and signoff
+
+expect "closed*"               ;# wait for the connection to close
+
+exec sleep 3
+
+expect eof
+
diff --git a/examples/stats/pp1106.sts b/examples/stats/pp1106.sts
new file mode 100644 (file)
index 0000000..d9f0ff5
--- /dev/null
@@ -0,0 +1,52 @@
+non Nov  6 16:08:49 1995
+spawn telnet 44.32.4.2 
+Trying 44.32.4.2...
+Connected to 44.32.4.2.
+Escape character is '^]'.
+
+Gracilis NOS302 (ppfma)
+
+Callsign / login: N3EUA-8
+Password: 
+
+
+Gracilis NOS302 NET/ROM Emulator
+j ax0
+ax0:
+Callsign    Last  Heard  Packets        Callsign    Last  Heard  Packets
+N3EUA-8      0:00:00:00       15
+K0YUM        0:00:07:44      812        KE0GB-1      0:00:04:29    33105
+N0IAK        0:00:06:09    37363        WD0FHG       0:00:00:00       43
+N0QCU        0:00:37:30       89        
+
+@
+The escape character is: CTRL-X
+$cos>uptime
+Time since last system restart:   1 Week(s), 1 Days, 19:05:50
+$cos>syncstat
+PackeTen Switch Sync Channel Statistics
+
+68302  RxChars   RxPacks  Rxerrs  Aborts  RxBf   Txchars   TxPacks TxUns  RxNoBf
+----- ---------  -------  ------  ------  ----  ---------  ------- -----  ------
+    0  14454936   171144   33867   25599     8     302487     3021     0       
+0
+
+8530   RxChars   RxPacks  Rxerrs  Aborts  RxBf   Txchars   TxPacks TxUns  RxNoBf
+----- ---------  -------  ------  ------  ----  ---------  ------- -----  ------
+    4  23567157   565579  144553  544228     3     882763    27605     0       
+0
+
+Channel 1 is UN-attached
+Channel 2 is UN-attached
+$cos>asystat
+PackeTen Switch Async Channel Statistics
+
+
+Channel 1 is UN-attached
+Channel 2 is UN-attached
+
+$cos>exit
+Leaving Sysop mode...
+
+b
+Connection closed by foreign host.
diff --git a/examples/stats/ppstats b/examples/stats/ppstats
new file mode 100644 (file)
index 0000000..7e907e2
--- /dev/null
@@ -0,0 +1,39 @@
+#!/usr/local/bin/expect --
+# a dumb little 'expect' program to check the status of ppfma.ampr.org
+
+set timeout 5
+set addr "44.32.4.2"
+set call "N3EUA-8"
+set pass ""
+set prompt "cos>*"
+
+puts [timestamp -format %c]            ;# time tag the output
+
+spawn telnet $addr
+expect "login: " { send "$call\r" }
+expect "word: " { send "$pass\r" }
+
+expect "NET/ROM*"  { send "j ax0\r" }  ;# for now we will just look at ax0
+
+expect  {                      ;# no easy way to tell that the list is 
+                               ;# complete so we'll just time out
+       "NET/WRONG*"  {}        ;# looking for we can't find.
+       }
+
+expect "*"     { send "\r@\r" };# flush the expect buffer and go to sysop
+
+expect $prompt { send "uptime\r" }
+expect $prompt { send "syncstat\r" }
+expect $prompt { send "asystat\r" }
+expect $prompt { send "exit\r" }
+
+expect "mode...*"      { }
+
+expect "*"     { send "\rb\r" };# flush the expect buffer and signoff
+
+expect "closed*"               ;# wait for the connection to close
+
+exec sleep 3
+
+expect eof
+
diff --git a/examples/stats/telpp b/examples/stats/telpp
new file mode 100644 (file)
index 0000000..5ae98db
--- /dev/null
@@ -0,0 +1,31 @@
+#!/usr/local/bin/expect --
+# a dumb little 'expect' program to check the heard list on ppfma.ampr.org
+
+set timeout 15
+
+puts [timestamp -format %c]            ;# time tag the output
+
+spawn telnet 44.32.4.2
+expect "login: " { send "wd0fhg\r" }
+
+expect "NET/ROM*"  { send "j\r" }      ;# for now we will just look at all
+
+expect  {                      ;# no easy way to tell that the list is 
+                               ;# complete so we'll just time out
+       "NET/WRONG*"  {}        ;# looking for we can't find.
+       }
+
+expect "*"     { send "\r\r"  };# flush the expect buffer
+
+expect "*"     { send "c ax4 w0lkd-1\r" } :# try to connect on .01
+
+expect "Connected"     {send "\rb\r" }  ;# just try the connection
+
+expect "*"     { send "\rb\r" };# flush the expect buffer and signoff
+
+expect "closed*"               ;# wait for the connection to close
+
+exec sleep 3
+
+expect eof
+