[arm-allstar] Allmon

Doug Crompton doug at crompton.com
Sat Jun 28 22:58:33 EST 2014


I put something on the web page about this (see lsnodes on the web page) but php was loaded on the image early on to facilitate running astdb.php which is located in /etc/asterisk/local.  This was taken from Allmon and modified to write in a tmpfs. It downloads and writes the database to /var/log/asterisk
[root at node40961 local]# ls -ls /var/log/asterisk
total 144
136 -rw-r--r-- 1 root root 138444 Jun 28 03:03 astdb.txt
  0 -rw-r--r-- 1 root root      0 Jun 26 23:09 event_log
  4 -rw-r--r-- 1 root root   2246 Jun 28 10:12 messages
  4 -rw-r--r-- 1 root root     38 Jun 26 23:09 queue_log

The reason for this was that the database is used for my script lsnodes and /etc/asterisk/local/astdb.php is call daily by a cron job to update the database. The reason it is stored in /var/log/asterisk is that is a tmpfs and writes to ram not the SD card. Whenever you write any code on the BBB you should always do writes that can be volatile (not survive a boot) to ram. 

[root at node40961 local]# crontab -l
00 0-23 * * * cd /etc/asterisk/local; perl saytime.pl > /dev/null
03 03 * * * cd /etc/asterisk/local; ./astdb.php

If Allmon could be modified to use the database where it is currently located and being updated daily on the BBB that would be good but in any event it should not write to the SD card. There might be other things in Allmon that now do writes periodically to a directory stored on the SD card. This should be investigated and changed if possible. There is no reason to get this database twice and stroe it in different locations as it could be used by both lsnodes and Allmon simultaneously. The only things that should be written to SD are configuration changes that need to be retained through a boot.  We need to adhere to this rule when writing SW for the BBB.

The directories marked tmpfs are ram -

[root at node40961 local]# df
Filesystem     1K-blocks   Used Available Use% Mounted on
/dev/root        3675684 983440   2502200  29% /
devtmpfs          253560      0    253560   0% /dev
tmpfs             253704      0    253704   0% /dev/shm
tmpfs             253704   4484    249220   2% /run
tmpfs             253704      0    253704   0% /sys/fs/cgroup
tmpfs             253704     88    253616   1% /tmp
tmpfs              51200    160     51040   1% /var/log
tmpfs              50744      0     50744   0% /run/user/0

/tmp and /var/log are recommended for this use but remember they do not survive a boot. Logging uses a maximum of about 30M at which point it starts to delete the oldest log information in a round robin fashion.

73 Doug
WA3DSP
http://www.crompton.com/hamradio


Date: Sat, 28 Jun 2014 19:44:57 -0700
From: nz6d at mac.com
To: arm-allstar at hamvoip.org
Subject: Re: [arm-allstar] Allmon

I will see what I can put together for the apache, PHP, and modules that need to be installed. 
Dave

Sent from my Galaxy S®III

-------- Original message --------From: Doug Crompton  Date:06/28/2014  7:09 PM  (GMT-08:00) To: arm-allstar at hamvoip.org Subject: [arm-allstar] Allmon 
Can someone writeup the procedure to get Allmon running on the BBB? If it is just notes that is fine. I can refine it. I will put a howto on the web page.
73 Doug
WA3DSP
http://www.crompton.com/hamradio
 		 	   		  

_______________________________________________

arm-allstar mailing list
arm-allstar at hamvoip.org
http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar

Visit the BBB web page - http://www.crompton.com/hamradio/BeagleBoneBlackAllstar/ 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hamvoip.org/pipermail/arm-allstar/attachments/20140628/c926616a/attachment-0001.html>


More information about the arm-allstar mailing list