Loggernet

From IARC 207 Wiki
Revision as of 09:51, 7 August 2007 by imported>Ken
Jump to navigation Jump to search

LoggerNet for Linux

Campbell Scientific has provided LoggerNet as their primary interface software, but until recently it only ran on Windows platforms. Over the past year, CSI finished development of a Linux port of the program. We participated in the beta testing program, and so got an early look at this software.

Far from just trying to install it and look at it, we soon pressed it into service doing hourly downloads of some 20 sites. It has worked out well in doing its job, and we anticipate keeping it as a regular part of our data management system.

installing LoggerNet-Linux on Debian Linux

We've installed LoggerNet-Linux on debian etch or later, though it is packed as an RPM for Fedora Core. To do this, use the debian 'alien' program to create a .deb archive from the .rpm archive:

 ken@foraker:~/csi-loggernet/lnet-3.3.1/ki-install/
 $ sudo alien --scripts --keep-version ../cd1/loggernet-3.3.1_fc5.i386.rpm
 loggernet_3.3-24_i386.deb generated

The --scripts option (tries to) convert installation scripts to debian standards, while --keep-version overrides the default alien behavior of incrementing the native version number.

Install the deb package as root:

 ken@foraker:~/csi-loggernet/lnet-3.3.1/ki-install/
 $ sudo dpkg --install loggernet_3.3-24_i386.deb

The startup scripts are placed in /etc/rc.d/init.d, but need a couple of changes to run under debian:

  • comment out sourcing the RedHat /etc/init.d/functions line
  • change the (RedHat) daemon command to (debian) start-stop-daemon:
 # daemon --user loggernet /opt/CampbellSci/LoggerNet_3.3/csilgrnet            --run-as-daemon=true
   start-stop-daemon --start --user loggernet --exec /opt/CampbellSci/LoggerNet_3.3/csilgrnet -- --run-as-daemon=true

create the lockfile directory:

 $ sudo mkdir /var/lock/subsys/


LoggerNet documentation

CSI provides html and/or pdf pages with the software, detailing many of the instructions and commands. Having used Perl for years and grown familiar with the perldoc command as an on-line help system, we felt compelled to develop a similar command for the LoggerNet system. This software is called coradoc, after the cora scripting system embedded in LoggerNet.


using LoggerNet

In our system, LoggerNet sits on a dedicated server computer which is tasked to do nothing but handle LoggerNet queries. We connect from perl or other scripts from other hosts using the netcat utility. On the LoggerNet server, a coracmd instance is run by the inetd superserver; the originating script then connects to the LoggerNet server, issues one or more commands, then quits.