# @file statistics.sh
# @author Ron Brash (<a href="mailto:email@example.com">firstname.lastname@example.org</a>)
# @date Jan 2017
# @purpose Collect network interface statistics and other information and output
# it in XML format instead of arbitrary formatting
Here is a simple BASH script to bring down/up an interface randomly. Note there is no error checking or states... it will work if it can work. e.g if the interface is up, and the script calls up - it will be up.
While scouting about looking for information about the FriendlyArm's NanoPC-T2 GPIO pins and using some of their source - I noticed that the documentation regarding how to setup an LED for example was missing from their forums etc... Here is a quick example:
Recently went to setup a reverse SSH tunnel and had a few issues such as connections not being allowed, or otherwise. There is also a strong gotcha not documented clearly on the Internet, you can only have one connection per port on the intermediary host. If you want more than one host, you need to use multiple ports; sorry this is the way it is.
Before starting, make sure on BOTH hosts, install:
Protocol version set to: RFC 6241 (base:1.1)
Default target set to: <candidate>
Save operation mapped to: commit
Default with-defaults behavior: explicit
Additional with-defaults behavior: trim,report-all,report-all-tagged