In the last post, I talked about getting Siegfried installed on a Raspberry Pi and kicking off a process to identify file formats. Easy peasy, except sometimes things don’t work out perfectly. Here are a few tips on handling problems with a run.
Connecting to a Raspberry Pi from another computer
I have a monitor and keyboard for my Pi, but sometimes it’s easier to use it through my laptop instead of turning on the monitor. For this, you’ll need to turn on SSH (Secure SHell) on the Raspberry Pi.
In order to login to the Pi from another computer, you’ll need to know the Pi’s IP address.
Then from the other computer you can login to a command line session on the Pi.
Running Siegfried over SSH
Any commands run during an SSH session will typically end when the user ends the session. To keep a long-running process going, use the nohup
(NO HangUP) command.
Put it in the background
The command from the end of the last post will automatically run Siegfried in the background thanks to the ‘&’ at the end of the command. If you didn’t add the ‘&’, you can still put the process in the background like this.
- Press
ctrl
+z
to suspend the process - Enter the command
bg
to put the process in the background
You should be able to enter new commands agains.
Restarting a run
If the power turns off, you’re working over a flakey network connection, or for any number of reasons, your Siegfried run might get interrupted. Rather than start from scratch, you can pick up from where you left off.
Update 2018-01-31 Richard Lehane helpfully pointed out a feature in Siegfried to make this simpler. Instead of concatenating the files with >>
, you can have Siegfried combine multiple result files.
Repeat as necessary.
Clean up the output
In case you had to restart Siegfried, you’ll have a couple result files. It’s easier to handle this as one dataset.
Update 2018-01-31 Richard Lehane pointed out a feature in Siegfried to make this simpler. Instead of concatenating the files and removing extra header lines, Siegfried can combine the files cleanly.
Here’s the strategy I used to use. It’s messier, and it’s probably more error prone.
Copying data over the network
If you can use SSH, you can also copy files over SSH using scp
(Secure CoPy). That means less fooling around with USB sticks to get data to where you need it.
I’ll add more tips as I cause more problems for myself.