dserv

Data acquisition & experimental control for the lab

Get started

Set up an acquisition box

Linux · Raspberry Pi

Turn a fresh Linux machine into a dserv data-acquisition box — installs dserv, dlsh, stim2 and the agent, then registers it with this network.

curl -sSL https://dserv.net/setup | bash

Preview first with | bash -s -- --dry-run, or set the workgroup with --workgroup mylab. Ships with the stock systems tree (blinky) and no workgroup scripts — add --scripts to pull the workgroup’s ESS systems too, or do it any time later with the card below.

Pull a workgroup’s scripts

Linux · provisioned box

Scripts alone, on a box provisioned earlier: declares the registry pair on the box and syncs the workgroup’s ESS systems into that user’s ~/systems/ess, touching nothing else — no agent, components or services. Also how a box joins a new workgroup’s scripts.

curl -sSL https://dserv.net/setup | sudo bash -s -- --scripts-only --workgroup mylab --user labuser

The registry copy wins every collision, so push local edits first on a box with in-flight work. A running dserv adopts the declarations and sees the tree at its next restart or system load. --user defaults to whoever invoked sudo. Keeping a second workgroup’s scripts around? Give each its own tree with --systems-path ~/systems-mylab — the flag declares that tree as the rig’s ess system_path, workgroup and tree switch together, and switching back is a re-run of the other pair.

Set up a display box

Linux · stim2 only

The other half of a split rig: stim2 and dlsh with no dserv, for a machine that drives the stimulus display while control runs elsewhere.

curl -sSL https://dserv.net/setup?profile=stim | bash

Point the control box at it with ESS_RMT_HOST; its STIM chip then links straight here for updates.

Set up a cage box and its clock

Linux · one step

The from-scratch path for an in-cage rig: everything above, plus a time role applied at the end and recorded in box.conf. Recording it is what makes the role stick — a re-run re-applies the declaration, and the box’s panel converges any drift back to it.

curl -sSL "https://dserv.net/setup?profile=incage&time_role=grandmaster+eth0" | bash

Keep the quotes — an unquoted & would background the command and drop the role. Use client+eth0 on boxes that follow the site clock, or ntp-client+SERVER where the NIC can’t hardware-timestamp; exactly one grandmaster per segment. This is also the only way to give a role to a box you can’t reach: the panel needs a socket to the box, while this needs only the box’s own outbound fetch.

Lab time

Put a box on the site clock

Linux · PTP / NTP

One tool, three roles: a grandmaster defines a site’s time, PTP clients follow it at microseconds on NICs that can hardware-timestamp, and the ntp-client tier (chrony) covers boxes that can’t — still tens of microseconds on a wired LAN. Ships in the dserv package; this fetches it for boxes without one. Everything installs inert: assigning a role stays a deliberate, per-host step.

curl -sSL https://dserv.net/ptp/setup | sudo bash

Then dserv-ptp-setup candidates, and one of grandmaster IFACE · client IFACE · ntp-client SERVER — or append the role to the curl: | sudo bash -s -- client eth0. Whichever way you set it, the role is recorded in box.conf. Provisioning a box from scratch? Declare it in the same step instead — see “Set up a cage box and its clock” above.

Other profiles

Same command, different component set — append to https://dserv.net/setup:

  • ?profile=dev — Development box (dserv + stim2 + dlsh; stim2 windowed)
  • ?profile=server — Data server only (dserv + dlsh, no stimulus)
  • ?profile=minimal — Minimal install (dserv + dlsh, agent only)

List them at any time with curl -sSL https://dserv.net/setup/profiles.