(X)Net autoexec.net

 

#### Hier worden de services gestart ####
#
#### Start the router
start routed
#### Start beacond
start beacond
#### Ping-Pong convers
#start conversd pi1lap-4
#### ONLINE-PortStatistieks
start postatd
pos * # port statistieks voor alle poorten
#### Start crond zie file crontab
start crond
#### CALL-Check starten / Zie file callchk.net - suspend.txt
start callchkd 100
# Name server - Router
names 192.168.1.1
# Time server
ntpdate 217.77.132.1
#### Beacons pi1lap
BEACON A 600 0 ID text PI1LAP:xn_lap - ((X)NET) Ax25 - Net/ROM node.
BEACON A 600 1 ID text PI1LAP:xn_lap - ((X)NET) Ax25 - Net/ROM node.
#
my call pi1lap
my alias xn_lap
my tcall pd2lt
my prompt pi1lap ==>

(X)Net autoboot.net

 

#### Autoboot.net Hier komen de attach commandos. ####

#### Ax25 kiss poorten
attach sdev0 kiss 0 1 9600 /dev/ttyUSB0 # 2m
attach sdev1 kiss 1 1 9600 /dev/ttyUSB1 # 70cm
#attach sdev2 kiss 2 1 9600 /dev/ttyUSB2 # hf
attach sdev3 kiss 3 1 115200 /dev/pts/2
attach sdev4 kiss 4 1 115200 /dev/pts/4
#attach sdev5 kiss 5 1 19200 /dev/com8  # Cluster
#### AXIP - Ports
# Link pi1lap
#attach ip0 axudp 0 1 l10093 d93 (ip-adres link local)
# Link pi1dxc-15
attach ip0 axudp 6 1 l93 d93 (ip-adres pi1dxc)
# Link pi1snk
attach ip1 axudp 7 1  l93 d93 (ip-adres pi1snk)
# Link pi1dec-14
attach ip2 axudp 8 1 l93 d10093 (ip-adres pi1dec)
# Link pi1bdg
attach ip3 axudp 9 1 l93 d10093 (ip-adres pi1bdg)
# Link pi1cdr
attach ip4 axudp 10 1 l93 d93 (ip-adres pi1cdr)
#
#### Slip port
attach sdev6 slip 38400 /dev/pts/6

#po 0 baud 115200
#po 0 dup 0
#po 0 win 7
#po 0 quality 255
#po 0 name pi1lap
#r bc ad 0 pi1lap
#r bc ad 0 nodes

#### 2m
po 0 acon 1 
po 0 baud 1200
po 0 dup 0
po 0 win 4
po 0 dama 0
po 0 quality 192
po 0 name 2m-1k2
#r bc ad 0 pe1plm-14
#r bc ad 0 nodes
#### 70cm
po 1 acon 1
po 1 baud 1200
po 1 dup 0
po 1 win 4
po 1 dama 0
po 1 quality 192
po 1 name 70cm-1k2
#r bc ad 1 pe1plm-14
#r bc ad 1 nodes
#### HF
#po 2 baud 9600
#po 2 dup 1
#po 2 win 2
#po 2 quality 0
#po 2 name hf
#### F6fbb bbs
po 3 baud 115200
po 3 dup 0
po 3 win 4
po 3 name pi8lap
#### Convers
#po 4 acon 1
po 4 baud 115200
po 4 dup 0
po 4 win 4
po 4 name pi8lap-8
#r bc ad 1 pi1lap-15
#r bc ad 1 nodes
#### Cluster
#po 5 baud 19200
#po 5 dup 1
#po 5 win 7
#po 5 name Cluster
#### ip0 Link pi1dxc-15
po 6 baud 76800
po 6 dup 0
po 6 win 7
#po 6 quality 255
po 6 name pi1dxc-15
r f add 6 pi1dxc-15
r bc ad 6 pi1dxc-15
r bc ad 6 nodes
#### ip1 Link pi1snk
po 7 baud 76800
po 7 dup 0
po 7 win 7
#po 7 quality 255
po 7 name pi1snk
r bc ad 7 pi1snk
r bc ad 7 nodes
#### ip2 Link pi1dec-14
po 8 baud 76800
po 8 dup 0
po 8 win 7
#po 8 quality 255
po 8 name pi1dec-14
r bc ad 8 pi1dec-14
r bc ad 8 nodes
#### ip3 Link pi1bdg
po 9 baud 76800
po 9 dup 0
po 9 win 7
#po 9 quality 255
po 9 name pi1bdg
r bc ad 9 pi1bdg
r bc ad 9 nodes
#### ip4 Link pi1cdr
po 10 baud 38400
po 10 dup 0
po 10 win 7
po 10 quality 255
po 10 name pi1cdr
r bc ad 10 pi1cdr
r bc ad 10 nodes

(X)Net – Statd / Rstatd Port Statistieken.

It is possible with (X)net to display the port statistics in a bar chart.
This way you get a nice overview per port. In the file postat.zip the cgi script is what you need to get the statistics from the file * .sta. There is also a postat.txt in which “what” explains how it should and works. I found it fairly unclear, but that can also be my knowledge of the German language 🙂
Here the necessary file…postat.zip

apt-get install libgd2-xpm-dev            “You really need this one”

GD is an open source code library for the dynamic creation of images by programmers. GD is written in C, and “wrappers” are available for Perl, PHP and other languages. GD creates PNG, JPEG, GIF, WebP, XPM, BMP images, among other formats. GD is commonly used to generate charts, graphics, thumbnails, and most anything else, on the fly.

 

 

There are two different ways to achieve this.
The first option described below I use for my port statistics.

In IP.NET the rstatd deamon is started with the IP address of your web server

start rstatd 192.168.1.112    #ip-adres webserver

In the start of (X) Net, I have included the following line. The rstatrxd refers to the directory of your web server in this case /var/www/cgi-bin/postat/

./rstatrxd /var/www/cgi-bin/postat/ &

I use the following to get the statistics from the file pi1lap.sta.
Here I get the data from port 0 with an interval of 10 from the file.
/cgi-bin/postat.cgi?df=pi1lap.sta&port=0&interval=10&cfg=0&l2con=2
The cfg = 0 indicates the size of the bar chart. Give it a try. Option 1 and 2 are also possible. l2con = 1 or 2

Here below with an interval of 60 minutes and 720 minutes.
/cgi-bin/postat.cgi?df=pi1lap.sta&port=0&interval=60&cfg=0&l2con=2
/cgi-bin/postat.cgi?df=pi1lap.sta&port=0&interval=720&cfg=0&l2con=2

Example :
Poort Statistieken

Option 2 actually works the same way. Only a simlink is placed from the file min.sta to the web server directory.

In IP.NET
#### Start statd
start statd
start statd 60 min.sta
start statd 3600 hour.sta
start statd 86400 day.sta

ln -s /usr/local/xnet/min.sta /var/www/cgi-bin/postat/min.sta
ln -s /usr/local/xnet/hour.sta /var/www/cgi-bin/postat/hour.sta
ln -s /usr/local/xnet/day.sta /var/www/cgi-bin/postat/day.sta
ln -s /usr/local/xnet/port.sta /var/www/cgi-bin/postat/port.sta

/cgi-bin/postat.cgi?df=port.sta&port=-1&l2con=1 # Status of all ports
/cgi-bin/postat.cgi?df=min.sta&port=3&l2con=1 # Status of port 3 in 10 minutes
/cgi-bin/postat.cgi?df=hour.sta&port=3&l2con=1 # Status of port 3 in 1 hour
/cgi-bin/postat.cgi?df=day.sta&port=3&l2con=1 # Status of port 3 in 1 day

min.sta is the status for 10 minutes
hour.sta is the status for 1 hour
day.sta is the status for 24 hours
port.sta is the complete status?

This could also suffice with just a simlink to the post.sta and then requesting the status with interval = 10 (60,720).