[arm-allstar] LOG

Doug Crompton wa3dsp at gmail.com
Mon Sep 3 21:55:43 EDT 2018


I gave this command to Luc because he needed to automatically mount the USB
stick at boot. The purpose is to check if devmon is already running and if
not run it in the background. The command gives no response if run from the
console. This command is also executed in the file-backup.sh script if you
use a USB stick to backup.

However the best way to start devmon at each boot is to run it under
systemd which is what I do here. Here is an example which when run will
start it now and at each boot -

systemctl enable devmon at root.service
systemctl start devmon at root.service

systemctl status devmon at root.service

* devmon at root.service - devmon Service
   Loaded: loaded (/usr/lib/systemd/system/devmon at .service; enabled; vendor
pres
   Active: active (running) since Thu 2018-05-31 23:20:25 EDT; 3 months 3
days a
 Main PID: 272 (devmon)
    Tasks: 2 (limit: 512)
   CGroup: /system.slice/system-devmon.slice/devmon at root.service
           |-272 /bin/bash /usr/bin/devmon
           `-419 /usr/sbin/udevil --monitor

Once you do this it will always be running and the line to check if it is
running would not be needed. It would not hurt to run it though as it would
do nothing.


*73 Doug*

*WA3DSP*

*http://www.crompton.com/hamradio <http://www.crompton.com/hamradio>*




On Mon, Sep 3, 2018 at 7:59 PM "Charles Powell via ARM-allstar" <
arm-allstar at hamvoip.org> wrote:

> Luc,
>
> You have told the computer to output everything to '/dev/null’ so it won’t
> return anything to you.  I’m not exactly sure why you were running the
> command but you have indeed corrected the syntax and command structure.
> ‘devmon’ is a system monitor for use with SNMP (Simple Network Management
> Protocol) for comprehensive system monitoring.  Is that what you intended?
> If not, what were you trying to accomplish with the command?
>
> 73,
>
> Charles - NK8O
>
> > On Sep 3, 2018, at 5:56 PM, Luc Drolet VE2LUQ via ARM-allstar <
> arm-allstar at hamvoip.org> wrote:
> >
> > Hello Charles,
> >
> > I entered your order and the return of the "ENTER" I'm nothing happens?
> > See attached file
> >
> > thank you for helping me
> >
> > Luc
> > VE2LUQ<devmon_1.pdf>
> >
> >> Le 3 sept. 2018 à 18:09, Charles Powell via ARM-allstar <
> arm-allstar at hamvoip.org> a écrit :
> >>
> >> For starters, you must not put spaces between elements of a directory
> or path.
> >>
> >> You wrote your command as:
> >>
> >> 'pgrep devmon &> / dev / null || / usr / bin / devmon &> / dev / null’
> >>
> >> This should be written:
> >>
> >> 'pgrep devmon &> /dev/null || /usr/bin/devmon &> /dev/null'
> >>
> >> What the terminal is telling you is that all it sees is ‘/‘ and that
> represents the root directory.  Since you can’t output to the root
> directory, your command fails.
> >>
> >> 73,
> >>
> >> Charles - NK8O
> >>
> >>
> >>
> >>
> >>> On Sep 3, 2018, at 3:40 PM, Luc Drolet VE2LUQ via ARM-allstar <
> arm-allstar at hamvoip.org> wrote:
> >>>
> >>> Hello Doug,
> >>>
> >>> OK, I did some tests, but I can not make it work?
> >>> in menu-9 in SSH mode, I run the command
> >>> <devmon.pdf>"pgrep devmon &> / dev / null || / usr / bin / devmon &> /
> dev / null »
> >>> and I do not understand how to transfer these files to the drive USB?
> >>>
> >>> Luc
> >>>
> >>>
> >>>> Le 3 sept. 2018 à 14:02, Luc Drolet VE2LUQ via ARM-allstar <
> arm-allstar at hamvoip.org> a écrit :
> >>>>
> >>>> Hello Doug,
> >>>>
> >>>> Thank you for this info, all my sites have a 16GB USB key now, since
> I learned to make the file "file-backup.sh" except the NODE 1400 him he
> does not have a USB key presently because I have access to this site which
> is difficult,
> >>>>
> >>>> With the same USB key, if I understand correctly, I can make my
> backup in a file and create another file for my LOGS on the same USB key
> that is connected to the Raspbbey Pi
> >>>>
> >>>> OK tonight I'm going to test my NODE at home to see how it works
> >>>>
> >>>> Thank you for your explanations, thank you very much
> >>>>
> >>>> see attached file #df
> >>>>
> >>>> Luc
> >>>> VE2LUQ<df.pdf>
> >>>>
> >>>>> Le 3 sept. 2018 à 12:22, Doug Crompton via ARM-allstar <
> arm-allstar at hamvoip.org> a écrit :
> >>>>>
> >>>>> Luc,
> >>>>>
> >>>>> When using an SD card as in the Pi we limit writes to the card itself
> >>>>> therefore all logs are to a tmp filesystem or in other words to
> volatile
> >>>>> RAM. If you do a 'df' command at the Linux prompt you will see what
> I mean -
> >>>>>
> >>>>> # df
> >>>>> Filesystem     1K-blocks    Used Available Use% Mounted on
> >>>>> /dev/root        3762048 1594272   1956956  45% /
> >>>>> devtmpfs          474584       0    474584   0% /dev
> >>>>> tmpfs             479192       0    479192   0% /dev/shm
> >>>>> tmpfs             479192   12344    466848   3% /run
> >>>>> tmpfs             479192       0    479192   0% /sys/fs/cgroup
> >>>>> tmpfs             479192      32    479160   1% /tmp
> >>>>> tmpfs              51200     412     50788   1% /var/log
> >>>>> /dev/mmcblk0p1    102182   19610     82572  20% /boot
> >>>>> tmpfs              95840       0     95840   0% /run/user/0
> >>>>>
> >>>>> All of the filesystems defined tmpfs are in RAM. This includes
> /var/log and
> >>>>> all directories below it.
> >>>>>
> >>>>> f you truly want to save data on an ongoing basis I would recommend
> >>>>> installing a USB stick. 32G or more USB sticks are very inexpensive.
> >>>>>
> >>>>> You can either specifically mount it in /etc/fstab or make sure that
> devmon
> >>>>> is running using the following line - This could be the first line in
> >>>>> /etc/rc.local -
> >>>>>
> >>>>> # check if devmon is running, if not running,  start it
> >>>>> pgrep devmon &> /dev/null || /usr/bin/devmon &> /dev/null
> >>>>>
> >>>>> Then direct all things you want to keep to the USB stick.
> >>>>>
> >>>>> There are other ways like sending the data to another computer but
> just
> >>>>> putting it on a USB stick is the easiest. I do this on my hubs
> storing logs
> >>>>> there and it has worked well. Here is what it looks like in my case
> in
> >>>>> fstab -
> >>>>>
> >>>>> /dev/sda1       59374732 1520772  54814780   3% /media/MS1
> >>>>>
> >>>>> I named the stick MS1. It is a 64G stick and after a year of logging
> has 3%
> >>>>> used!
> >>>>>
> >>>>> And yes this could be the same USB stick that you do backups to using
> >>>>> file-backup.sh
> >>>>>
> >>>>>
> >>>>> *73 Doug*
> >>>>>
> >>>>> *WA3DSP*
> >>>>>
> >>>>> *http://www.crompton.com/hamradio <http://www.crompton.com/hamradio
> >*
> >>>>>
> >>>>>
> >>>>> On Mon, Sep 3, 2018 at 11:54 AM "Luc Drolet VE2LUQ via ARM-allstar" <
> >>>>> arm-allstar at hamvoip.org> wrote:
> >>>>>
> >>>>>> Hello everyone,
> >>>>>>
> >>>>>> I have a small problem with my CDR-CSV file in / var / log /
> >>>>>> this file sometimes disappears ???, I ask myself a question which I
> >>>>>> believe,
> >>>>>> when I made an update of our asterisk version,
> >>>>>> in ssh mode "admin menu" # 1, the file CDR-CSV who disappears but
> I'm not
> >>>>>> sure!
> >>>>>>
> >>>>>> I installed the supermon 6.0 in our repeater and I also like this
> web page
> >>>>>> very good job
> >>>>>> Is it because I installed this web page that I have a bug on the
> CDR-CSV
> >>>>>> file?
> >>>>>>
> >>>>>> I use private NODES for your information.
> >>>>>>
> >>>>>> to get the CDR-CSV file, I go back to the 9-Start bash shell
> interface
> >>>>>> menu,
> >>>>>> and execute this command
> >>>>>> "mkdir / var / log / asterisk / cdr-csv"
> >>>>>> and everything comes back to normal, skips that I lost my LOG
> >>>>>>
> >>>>>> Thank you for helping us
> >>>>>> Have a good day
> >>>>>> Luc
> >>>>>> VE2LUQ
> >>>>>> _______________________________________________
> >>>>>>
> >>>>>> ARM-allstar mailing list
> >>>>>> ARM-allstar at hamvoip.org
> >>>>>> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
> >>>>>>
> >>>>>> Visit the BBB and RPi2/3 web page - http://hamvoip.org
> >>>>>>
> >>>>> _______________________________________________
> >>>>>
> >>>>> ARM-allstar mailing list
> >>>>> ARM-allstar at hamvoip.org
> >>>>> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
> >>>>>
> >>>>> Visit the BBB and RPi2/3 web page - http://hamvoip.org
> >>>>
> >>>> _______________________________________________
> >>>>
> >>>> ARM-allstar mailing list
> >>>> ARM-allstar at hamvoip.org
> >>>> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
> >>>>
> >>>> Visit the BBB and RPi2/3 web page - http://hamvoip.org
> >>>
> >>> _______________________________________________
> >>>
> >>> ARM-allstar mailing list
> >>> ARM-allstar at hamvoip.org
> >>> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
> >>>
> >>> Visit the BBB and RPi2/3 web page - http://hamvoip.org
> >>
> >> _______________________________________________
> >>
> >> ARM-allstar mailing list
> >> ARM-allstar at hamvoip.org
> >> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
> >>
> >> Visit the BBB and RPi2/3 web page - http://hamvoip.org
> >
> > _______________________________________________
> >
> > ARM-allstar mailing list
> > ARM-allstar at hamvoip.org
> > http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
> >
> > Visit the BBB and RPi2/3 web page - http://hamvoip.org
>
> _______________________________________________
>
> ARM-allstar mailing list
> ARM-allstar at hamvoip.org
> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>
> Visit the BBB and RPi2/3 web page - http://hamvoip.org


More information about the arm-allstar mailing list