[FADCA] Additional commands
Chuck Hast
wchast at gmail.com
Wed Dec 27 23:37:54 EST 2006
Folks,
I have been playing around with additional commands for fpac, I am always
wanting to know the status of the switch, even more so than the built in
commands supply, so as a result I started looking at the data that is available
in /proc.
For those of you who are not real familiar with Linux, /proc is a directory
structure in memory where all of the variables for Linux are held. Of particular
interest to us are those that hold the control and status data on the switch,
this data can be ax25, as seen in the /proc/net/ax25 file, which shows the
status of each link, you may at the command line do a cat /proc/net/ax25
and you will see the information, you can pull down the ax25 how to and
read up on what each column is, but the timers packet length and all of
the other common timing and size info is stored for each link here. AXStats
will show the contents of this file from the fpacnode consol. This command
appears to be on all of our switches.
Now if you did a:
ls /proc/net
you will have seen a number of other files in there, the netstat command
will show you all of the data on the IP and TCP connections, IPR and
IPL show subsets of that command from the fpac command line.
There are other files of interest in there that I have added commands to
my switch (kp4djt-8) which you can invoke and see the status of both the
ROSE (X.25) links and the NetRom links:
The ROSE commands are
RS_D, which gives the l3 timer information. It is taken from
/proc/sys/net/rose
KP4DJT-8 (Commands = ?) : rs_d
Parameters for device rose
Acknowledge Hold Back Timeout : 5 Seconds
Call Request Timeout : 200 Seconds
Clear Request Timout : 180 Seconds
Link Fail Timeout : 120 Seconds
Maximum Virtual Circuits : 50
Reset Request Timeout : 180 Seconds
Restart Request Timeout : 180 Seconds
Routing Control : 1
Window Size : 7
RS_N, shows the neighbor switch status, the data is found here:
/proc/net/rose_neig
here is a sample from my addeed command:
KP4DJT-8 (Commands = ?) : rs_n
Shows neighbor switches, timer states.
addr callsign dev count use mode restart t0 tf digipeaters
00027 KC5QCN-9 sp0 10 0 DTE no 0 0
00026 KD4YAL-9 ax0 1 65535 DTE yes 0 0
00025 W4MIN-9 ax0 1 0 DTE no 0 0
00024 K4GBB-9 ax0 5 0 DCE no 0 115
00023 N4PLZ-9 ax0 6 1 DTE yes 0 0
00022 N3PPC-9 ax0 1 0 DTE no 0 0
00021 F5KBW-9 ax0 9 1 DTE yes 0 0
00020 F6BVP-11 ax0 12 1 DCE yes 0 0
00019 VK2TV-2 ax0 1 0 DTE no 0 0
00001 RSLOOP-0 ??? 5 0 DCE yes 0 0
Of particular interest is k4gbb-9 under the tf colum you will see that it
shows 115 (that is 115 seconds until the bad route timer times out. So
you can check and see if a path is timed out by using this command.
if it is you can see how much time until it will be retried.
RS_R, This command will show connections in transit through the switch,
it is sourced from the directory
/proc/net/rose_routes,
Here is what is shown:
KP4DJT-8 (Commands = ?) : rs_r
Shows in transit level 3 circuits only, for local connects see Users.
lci address callsign neigh <-> lci address callsign neigh
001 3100863494 KP4DJT-0 00025 001 2080175520 F6BVP-8 00020
RS_S This is a very large screen that shows the link infor for each link in and
out of the switch, due to the size of the screen data I will not show
it here but you
can look at if if you link to kp4djt-8 and do a rs_s, here is the source info
/proc/net/rose
NR_A gives a similar dispaly to the RS_N, and it is sourced from
/proc/net/nr_neigh
root at fpac:/proc/net# cat nr_neigh
addr callsign dev qual lock count failed digipeaters
00011 KD4YAL-5 ax0 200 0 1 0
00010 KD4YAL-10 ax0 200 0 30 2
00006 KC5QCN-14 ax0 200 0 2 0
00005 K4GBB-14 ax0 200 0 1 0
00004 F6BVP-14 ax0 200 0 12 0
00003 VK2TV-14 ax0 200 0 6 0
NR_N gives a list of known nodes, it is sourced from
/proc/net/nr_nodes
Here is the dump from it:
root at fpac:/proc/net# cat nr_nodes
callsign mnemonic w n qual obs neigh qual obs neigh qual obs neigh
KB8UVN-11 CMHSW4 2 1 124 6 00010
N4GAA-4 BBSGAA 2 1 159 6 00010
N3NXO-3 GWHOPE 2 1 142 6 00010
KD4YAL-11 CLWBBS 2 1 178 6 00010
KD4MZM-5 SRQMZM 2 1 178 6 00010
W8CQK-1 BATTEL 2 1 124 6 00010
KB8UVN-1 CPGBBS 2 1 177 6 00010
VE1DRG-7 VALLEY 2 1 128 6 00010
N4GAA-2 WHAVEN 2 1 159 6 00010
N8DA-7 OH105 2 1 178 6 00010
W8CQK-0 CMHBBS 2 1 122 5 00010
N4GAA-11 QSOSCT 2 1 159 6 00010
VE1DRG-0 DRGBBS 2 1 128 6 00010
K2GE-8 IPGE 2 1 127 6 00010
W1NPR-7 EN79 2 1 159 6 00010
KB8UVN-7 CMHSW3 2 1 177 6 00010
K2MF-8 IPMF 2 1 142 6 00010
N5VDA-3 VDAGW 2 1 128 6 00010
VE1DRG-2 DRGDXC 2 1 128 6 00010
K2BJG-10 IPBJG 2 1 159 6 00010
K2MF-11 QSONNJ 2 1 142 6 00010
KA1ZFO-0 EWLBBS 2 1 178 6 00010
N4GAA-6 #IPGAA 2 1 178 6 00010
N4GAA-15 WHVNX 2 1 159 6 00010
KB8UVN-4 CMHNET 2 1 178 6 00010
N4GAA-7 FXWHVN 2 1 159 6 00010
WB2ONA-1 IPCNJ 2 1 142 6 00010
K2MF-5 #HUBNE 2 1 159 6 00010
KD4YAL-10 FLGATE 2 1 200 6 00010
KD4YAL-5 CLW01 1 2 200 3 00011 159 6 00010
F6BVP-4 BVPNO2 1 1 156 5 00004
F6GGY-12 NODE47 1 1 156 5 00004
F6GGY-1 BBSGGY 1 1 155 5 00004
F5KCK-13 LNXKCK 1 1 150 5 00004
K4GBB-14 CIT03 1 3 200 6 00005 156 5 00004 156 6 00006
KC5QCN-14 TAMPA 1 2 200 6 00006 156 5 00004
F6BVP-3 BVPDX 1 1 199 5 00004
F6BVP-1 BVPBBS 1 1 199 5 00004
F6BVP-14 BVPNOD 1 1 200 5 00004
GB7YB-0 YORKS 1 2 156 5 00003 122 5 00004
VK2VY-2 VYNODE 1 2 150 5 00003 117 5 00004
GB7YDX-8 DXYORK 1 1 143 5 00003
GB7YDX-1 DXYRK 1 1 147 5 00003
GB7SYP-1 SYP 1 1 147 5 00003
VK2TV-14 KEMPC 1 2 200 5 00003 156 5 00004
root at fpac:/proc/net#
Those commands are just placed in the fpac.conf file, here are the
example formats from my switch.
NR_A = /bin/cat /proc/net/nr_neigh
NR_N = /bin/cat /proc/net/nr_nodes
RS_S = /bin/cat /proc/net/rose
RS_D = /etc/ax25/rsdispparms
RS_N = /etc/ax25/rose_adj
RS_R = /etc/ax25/rose_routes
The command causes the file to be dumped to the screen. In some cases
a secondary file is called which adds some user data or explaination to
the viewed data. In others the cat command is used to display the /pro/net/file
info.
Enjoy!
--
Chuck Hast -- KP4DJT --
To paraphrase my flight instructor;
"the only dumb question is the one you DID NOT ask resulting in my going
out and having to identify your bits and pieces in the midst of torn
and twisted metal."
More information about the FADCA
mailing list