Difference between revisions of "Loggernet"
imported>Ken |
imported>Ken |
||
(3 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
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. | 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 == | + | == 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 | + | 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. | |
− | + | Optionally, the contents of the .deb package can be listed: | |
− | + | $ dpkg --contents loggernet_3.4-11_i386.deb | |
+ | |||
+ | or extracted to a directory for inspection: | ||
+ | |||
+ | $ dpkg --extract loggernet_3.4-11_i386.deb /tmp/ | ||
+ | |||
+ | 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/ | ||
+ | |||
+ | The loggernet executables are installed under the /opt/ filesystem; the server programs (csilgrnet, ldmp_server2, ldep_server2) are only accessed through /etc/ init.d scripts, but it may be desired to put a symlink to user or client programs in a bin directory, e.g. one of: | ||
+ | |||
+ | $ cd ~myuser/bin | ||
+ | $ cd /usr/local/bin/ | ||
+ | |||
+ | then: | ||
+ | |||
+ | $ ln -s /opt/CampbellSci/LoggerNet_3.4/cora_cmd | ||
+ | $ ln -s /opt/CampbellSci/LoggerNet_3.4/ldxp_client | ||
== LoggerNet documentation == | == LoggerNet documentation == |
Latest revision as of 10:33, 9 August 2007
Contents
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.
Optionally, the contents of the .deb package can be listed:
$ dpkg --contents loggernet_3.4-11_i386.deb
or extracted to a directory for inspection:
$ dpkg --extract loggernet_3.4-11_i386.deb /tmp/
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/
The loggernet executables are installed under the /opt/ filesystem; the server programs (csilgrnet, ldmp_server2, ldep_server2) are only accessed through /etc/ init.d scripts, but it may be desired to put a symlink to user or client programs in a bin directory, e.g. one of:
$ cd ~myuser/bin $ cd /usr/local/bin/
then:
$ ln -s /opt/CampbellSci/LoggerNet_3.4/cora_cmd $ ln -s /opt/CampbellSci/LoggerNet_3.4/ldxp_client
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.