bsd-dog-ops
Skill1 starsChanged 2 months agoMITView on GitHub
Operate the bsd-dog lean C telemetry daemons — deploy, verify, and debug metrics/logs/traces lanes on FreeBSD (fbryz3070) and ARM Linux MiSTer boards (mister/de10nano 10.0.2.61, superstation1 10.0.3.136). Use when restarting lanes, checking sole-agent state, debugging "accepted but not indexed" intake issues, or making boot persistence changes.
- Reads credentials
In this repository114 other files it gives its agents.
- AGENTS.mdAGENTS.md
- ac-ideateSkill
- ac-listSkill
- ac-roadmapSkill
- agentbridge-mcpSkill
- almanacSkill
- almquist-shellSkill
- ansible-fleetSkill
- apfsSkill
- apple-siliconSkill
- arena-actorsSkill
- asustor-nasSkill
- a-teamSkill
- atem-miniSkill
- at-tuiSkill
- autoresearchSkill
- babysitSkill
- bonzibuddySkill
- bop-brainstormSkill
- bop-catalogSkill
- bop-onSkill
- bop-teamSkill
- bop-workflowSkill
- bsd-portabilitySkill
- code-refactoringSkill
- codex-personasSkill
- context-graphSkill
- councilSkill
- datadog-backupSkill
- dd-tagsSkill
- delegateSkill
- deming-pdsaSkill
- deterministic-replaySkill
- dispatch-nuSkill
- durable-commitSkill
- elixir-gastown-opsSkill
- ergo-ircSkill
- esp32-tang-bridgeSkill
- fleet-evalSkill
- fleet-ircSkill
- freebsd-build-vmSkill
- freebsd-piSkill
- freebsdSkill
- ganttSkill
- gastown-opsSkill
- gastown-slingSkill
- gh-authSkill
- gitea-releaseSkill
- gitea-runnerSkill
- henshuSkill
- irclaw-cluster-opsSkill
- irclaw-research-teamSkill
- irc-taskSkill
- jail-factorySkill
- jjSkill
- jobcard-systemSkill
- kubernetesSkill
- leptosSkill
- loreSkill
- lower-bound-reviewSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 41
DHCP race: don't bind() a specific LAN IP at boot — the address doesn't exist yet.
- Very specific: line 42
Syslog tail EOF: after fgets() hits EOF you must clearerr() or the stream never sees new lines.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
bsd-dog-ops
Lean C Datadog clients: bsd-dog suite (FreeBSD, 12 lanes) and bsd-dog-linux (ARM MiSTer boards, single binary). Stock Datadog agents coexist on the same hosts — coverage claims are only valid when the C daemon is the sole agent on the host.
The first rule: 202/200 proves nothing
HTTP acceptance is transport, not indexing. Raw JSON spans get 202-and-dropped (spans need protobuf AgentPayload+gzip to /api/v0.2/traces). Unkeyed /api/v2/logs posts get dropped. Malformed ddtags strips all attribution (host:null, svc:null) while still returning 200.
Verify indexed data via pup, after ~6–8 min lag:
~/go/bin/pup logs search --query 'service:bsd-dog host:NAME' --from '15m' --limit 3
~/go/bin/pup metrics query --query 'avg:freebsd.bufcache{*}' --from '30m'Query the hostname the emitter reports (mister's stock agent reported de10nano), not the inventory name.
Fleet layout
| Host | Address | Durable path | Boot mechanism |
| fbryz3070 | fbryz3070.local / 10.0.2.46 | /usr/local/bin/bsd-dog-* + /usr/local/etc/rc.d/bsd-dog* | rc.conf bsd_dog_*_enable="YES" |
| mister (de10nano) | 10.0.2.61 | /media/fat/bsd-dog-linux/ | user-startup.sh BEGIN/END bsd-dog-linux block |
| superstation1 | 10.0.3.136 | /media/fat/bsd-dog-linux/ | same |
FreeBSD enabled lanes: bsd_dog, bsd_dog_tail, bsd_dog_gpu, bsd_dog_traced, bsd_dog_meta. Credential file: /usr/local/etc/bsd-dog.env — raw 32-hex key on one line, root-owned 0400/0600, NOT KEY=value (sourcing it leaks the key to stderr).
Volatile-path traps (all hit in production)
- MiSTer
/var/logand/tmpare volatile./is a read-onlylinux.imgloop mount;/var/logis recreated at boot,/tmpis tmpfs. Only/media/fat(SD card) survives — it even surviveslinux.imgreplacement. - FreeBSD
/tmpis cleared at boot (clear_tmp). Daemons must live in/usr/local/binunder rc.d. - Writable ≠ persistent. Only a reboot proves persistence.
Boot-time gotchas
- DHCP race: don't
bind()a specific LAN IP at boot — the address doesn't exist yet. OmitDD_BIND_ADDRESSentirely forINADDR_ANY. An empty value is worse:inet_pton("")fails → silent exit. - Syslog tail EOF: after
fgets()hits EOF you mustclearerr()or the stream never sees new lines. DD_SITE=empty is not the same as unset — check!site || !*site.service x restartracesdaemonsupervisors on FreeBSD — restart can leave nothing running. Alwaysservice x statusafter.- Env-file shape varies per platform: rc precmd reads raw hex; MiSTer env file is
KEY=valuesourced withset -a. Know which one you're writing.
Managed-file rule
/media/fat/linux/user-startup.sh is managed by Ansible role dd_iot_agent_armhf (in /Users/studio/dd-port-work/qwen38dep-1115/src/fleet-ops — not a git repo, canonical home TBD). It preserves foreign BEGIN/END blocks but rewrites its own. To keep the stock IoT agent off: dd_iot_agent_armhf_enabled: false in group_vars/linux_armhf.yml (role ≥1.2.0). Never hand-edit between managed markers — it gets reverted.
Ansible extra-vars footgun: -e var=false arrives as string "false" (truthy). Use | bool before | ternary.
Tag/envelope rules
ddsourcefield is canonical; do NOT also putsource:inddtags— duplicate keys get split intosource.0:/source.1:.- Log payload needs:
message,ddsource,ddtags,hostname,service,status,timestamp— posted tohttps://http-intake.logs.datadoghq.com/v1/input/<key>(200), not/api/v2/logs. - Metrics:
emit_seriestype mapg→gauge,c→count,h/r→rate-compat sample,ms→gauge. Overflow returns 0 with drop accounting (never -1). - Honest identity:
bsd-dog-unversioned+<sha256>,collector:bsd-dog. Never claim stock-agent version parity.
Verification script
scripts/bsd-dog-verify.nu — sole-agent check + canary metric/log/span + indexed verification via pup. Run it instead of hand-probing:
nu /Users/studio/skills-1/bsd-dog-ops/scripts/bsd-dog-verify.nu --host superstation1
nu /Users/studio/skills-1/bsd-dog-ops/scripts/bsd-dog-verify.nu --host fbryz3070 --probe sshBuild
ARMv7 boards: zig cc -target arm-linux-gnueabihf.2.17 -O2 -s -I/tmp/bsd-dog-linux-build -o bsd-dog-linux /tmp/bsd-dog-linux.c (needs the vendored curl headers dir; ~23KB stripped).
FreeBSD suite: make in /root/agent-port-upgrade/bsd-dog/ on fbryz3070; make install installs binaries + rc scripts. Offline tests: bsd-dog/tests/test-emitter.nu (22 checks), core selftest (20 checks). Do NOT run tests/run-all.sh blindly — it includes live intake + UDP fuzzing.
Version tracking
Watch upstream Datadog Agent tags with scripts/dd-agent-latest.nu (JSON out):
reports latest_ga, tip_7_86, tip_7_x, port_version (fbryz3070 Makefile),
port_behind. Current port: 7.86.0-rc.8 on branch upgrade/7.85.2 at
/root/agent-port-upgrade.
Trap: api.github.com/repos/DataDog/datadog-agent/git/refs/tags/<tag> returns
HTTP 200 for prefix matches — it reported "7.86.0 exists" when only 7.86.0-rc.*
did. Authoritative existence checks only:
git ls-remote --tags https://github.com/DataDog/datadog-agent <tag> # empty = does not exist
curl -o /dev/null -w %{http_code} https://codeload.github.com/datadog/datadog-agent/tar.gz/<tag> # 404 = does not existPort bump recipe (vendor + selfref tarballs → Gitea distfiles release
distfiles/v<X> on http://10.0.3.210:3000/string/dd-agent-FreeBSD → make
makesum) lives in commit 62be9d2 and in /root/work/dd-agent-rc8-prep/ on
fbryz3070.
Cross-references
- Datadog notebook 16341722: Linux lanes + intake protocol lessons
- Datadog notebook 16330676: 2026-11-11 session reconciliation/handoff
- fleet-ops role
dd_iot_agent_armhffor the stock-agent managed lifecycle
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

