Verify data is being recorded in offline mode

Hello,

I am using the shake in offline mode. I have had a few sites where data did not record even though everything had been set up correctly. While I think I have fixed the underlying issues (I believe it was an issue with the GPS not syncing correctly), I am not 100% sure and, regardless, I would like to verify that data is actually being recorded.

The best I can do right now is to open the rs.local dashboard and check the helicorder plots to make sure data is being recorded when/where I think it is. While this helps, this is not a “real time” solution. The other things I sometimes check is the time on the main rs.local dashboard (to ensure it is updating and it is what it is supposed to be…sometimes this work even when data is not being acquired) and that the file for the present day exists in the /opt/data/archive/… directory (which only tells me if data exists on that data). I can open one of the data files in the field, but this is too time consuming for our purposes and requires being present at the instrument while it is recording data.

Is there a service or process I can “ping” without interrupting it just to check that it is running to ensure that data is actually being recorded (or check that a file is open or the like)? The data-consumer and data-services (I cannot remember their exact names offhand) seem to be too generic to indicate when data is actually being recorded, but I could be wrong… I am thinking about (for example) programming an LED to blink when data is being recorded as an external indicator.

2 Likes

Hello rbalik,

First, regarding those sites where you have noticed data not being recorded correctly, if you manage to provide the logs of those Shakes I could try to see what could be possibly causing the issue.

Onto your request, you can execute the following command: slinktool -Q :18000, which will return you the latest timestamp for all the Shake channels (example below):

myshake@raspberryshake:/opt $ slinktool -Q :18000
AM R20D6 00 EHE D 2024/05/13 15:55:39.0830  -  2024/05/13 18:17:43.7130
AM R20D6 00 EHN D 2024/05/13 15:55:39.7830  -  2024/05/13 18:17:43.6230
AM R20D6 00 EHZ D 2024/05/13 15:55:38.8730  -  2024/05/13 18:17:42.1330

You can execute the same over ssh with ssh myshake@rs.local 'slinktool -Q :18000', and use the sshpass (https://linux.die.net/man/1/sshpass) command to address password insertion.

With this, you could write a little program that acquires these timestamps, compares them to current datetime, and then can light an LED, produce a log, or do anything else you have in mind if the timestamps are close (or equal to) real-time.

I have been looking back at my data (and testing with this command), it seems data was actually being recorded, just not on the date I was expecting. Thank you!

2 Likes

You’re more than welcome rbalik!