I am putting this in the “Hardware” category, since it is about keeping our hardware healthy, and does not really fit well anywhere else either as far as I see it. Please let me know if you disagree.
Problem statement and overview
Most BMPCs II run an outdated version of Windows on their internal computers, which should not be connected directly to a network with internet access for security reasons. In addition, using the integrated phone/fax alert system may be hampered by your insititution’s phone installation.
To circumvent these issues and add further monitoring options, the internal computer can be connected to the “outside world” via a gateway. This gateway may either be the spectrometer PC (making the BMPC another device on the spectrometer network), or a separate PC only operated for this specific purpose.
Accessing the BMPC data
First, the BMPC must be accessible via the “internal” network. Probably the preferable way is to just give fixed IP addresses to everyone on this network, and enter the gateway PC as the default gateway on the BMPC computer.
The BMPC II stores the measured values from its sensors in an Access format database, located at C:\Program Files\bruker\bmpc2\BMPC2 Control\db\log.mdb. The folder C:\Program Files\bruker\bmpc2\BMPC2 Control\db should thus be shared on the internal network in read-only mode.
This SMB share may then be mounted on the computer serving as the gateway. Keep in mind that older Windows versions may only support SMB version 1, which is not necessarily activated by default on modern operating systems.
Converting the Access database to CSV
If you are using a system that can directly work with the Access database, or want to convert it to da different database format, this section will not be useful for you.
We (at BNMRZ) are using Munin as an overall monitoring tool and would like to have the measured values in a text file format. Exporting values from the Access database can be done with the Linux tool mdb-export (part of the mdbtools package) and the following command:
mdb-export -D '%Y-%m-%d %H:%M:%S' /path/to/smb/mountpoint/log.mdb datalog > /desired/output/path/raw_db_conversion.csv
The output CSV file will contain, among others, the following columns:
-
1: Line number
-
2: Date in the format YYYY-MM-DD HH:MM:SS (including the space, may be changed in the command)
-
5: T1
-
8: T2
-
17: Vacuum pressure (p1)
-
20: Cryostat pressure (p2)
-
23: Ambient pressure (p3)
-
26: He flow
-
32: Heater power 1
This creates a text-based output file, however the order of entries may still be garbled and it contains a bunch of unneeded data, such as channel names in every line, unused channels etc.. To clean this up, we are using the following awk command:
awk -F, '{ print $1 " " $2 " " $5 " " $8 " " $17 " " $20 " " $23 " " $26 " " $32 }' /desired/output/path/raw_db_conversion.csv | sort -k2 | grep -v datetime | tail > /desired/output/path/cleaned_db_conversion.csv
From this file, our Munin scripts extract their values to send to the server.
Miscellanea
Time synchronization via NTP
Having the BMPC computer clock in time is useful not just in the way that you can correlate logged events with “real time”, but also to avoid concurrent use of the Access database.
To keep the clock of the BMPC in sync with the rest of the world, one can configure the gateway as an NTP (network time protocol) timeserver. CentOS 7 used chrony for this, other operating systems may differ. Once timeserver and gateway firewall are configured correctly, you need to set the gateway as an “Internet Time” server in the date and time settings of the BMPC computer.