[Xastir] Saving serial snapshots

riverridge@centurytel.net cen94999 at centurytel.net
Wed Apr 15 23:04:10 EDT 2009


Thankyou everyone!  I will give it a shot tomorrow. 

And Carl.... the How to is that I had remembered, but couldn't find!  
That is what started this whole discussion!  Thanks. 

Later.................. jt   KC9MXT

  --
  Jim Tolbert
PO Box 536
Webster, WI  54893



Quoting Carl Makin <carl at stagecraft.cx>:
> Hi Jim,
>
> On Wed, 15 Apr 2009, Jim Tolbert wrote:
>
> > I seem to have four "snapshot" files.... .png, xpm, kml, geo.  Do I want to
> > change the snapshot.jpg to snapshot.png in the code from Carl?
>
> Yes.  the .png and .xpm files are straight images, the .kml is for loading
> it up into Google Earth and the .geo is for loading it back up into
> Xastir. 
>
> > An then ( just to show how ignorant I am....), what do I do with this code?
> > ... No, I am not kidding.  Do I type it in the terminal with the 
> "sudo chmod
> > 666 /dev/ttyS0" before I start xastir?
>
> You save it into a file, probably in /usr/local/bin.  Lets call it
> "mvsnapshot".  Then mark the file executable with;
>
> chmod +x /usr/local/bin/mvsnapshot
>
> Then you update your crontab "crontab -e" and insert the following;
> */4 * * * * cd /your/snapshot/dir ; /usr/local/bin/mvsnapshot > /dev/null
> 2>&1
>
> (all on one line...)
>
> kick it off and see what happens.  Don't forget to create the "archive"
> directory in your snapshot directory. 
>
> Hmmm, thinking about this more, there might be a better way to do this. 
> You could create a new script to start Xastir that kicks it regularly and
> does the move for you.  If you wanted snapshots then you just run this
> script to start Xastir.  It could look something like this;
>
> ------- Cut Here ---------------------------
> #!/bin/sh
>
> xastir &
>
> sleep 300
>
> while [ 1 ]; do
>          kill -SIGUSR1 `cat ~/.xastir/xastir.pid`
>  	sleep 10
>          RIGHTNOW=`date +%Y%M%d%H%M`
>          if [ -f ~/.xastir/tmp/snapshot.png ]; then
>                  mv ~/.xastir/tmp/snapshot.png archive/snapshot-$RIGHTNOW.png
>          fi
>          sleep 290
> done
> ------- Cut Here ---------------------------
>
> Or you could remove the "xastir &" and "sleep 300" lines and launch it in
> a terminal window after you have started xastir. 
>
> There's actually a wiki page that covers this to some degree;
>
> http://www.xastir.org/wiki/index.php/HowTo:Snapshots
>
> Carl. 
> (vk1kcm)
>
> _______________________________________________
> Xastir mailing list
> Xastir at lists.xastir.org
> http://lists.xastir.org/cgi-bin/mailman/listinfo/xastir
>




More information about the Xastir mailing list