Bash Debugging

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • sdc-headnode

    Responsible for building and setting up the Triton (formerly SmartDataCenter) headnode.

  • It's actually possible to produce a stack trace of sorts, if you use a lot of bash functions. One possible implementation is: https://github.com/TritonDataCenter/sdc-headnode/blob/master...

  • unix-shell-script-kit

    Unix shell script kit with many utility functions, constant exit codes, and POSIX helpers.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • runag

    💜 A shell library to deploy workstations and simple servers

  • to produce a stack trace and exit the shell in case of non-zero exit status from some-command.

    [1]: https://github.com/runag/runag/blob/main/lib/fail.sh

  • zfsbootmenu

    ZFS Bootloader for root-on-ZFS systems with support for snapshots and native full disk encryption

  • We use a couple nice home-grown functions in ZFSBootMenu to help debug things. We have a zdebug logging function that's peppered liberally throughout the code base - https://github.com/zbm-dev/zfsbootmenu/blob/master/zfsbootme...

    Hitting ctrl-t on our main menu will, when booting with debug logging enabled, show a screen like this: https://imgur.com/Ge75zkP

    We also have a flamegraph profiling mechanism that can be enabled with https://github.com/zbm-dev/zfsbootmenu/blob/master/zfsbootme... . That will dump data to a serial port, which when re-assembled, can be used to produce a graph like https://raw.githubusercontent.com/zbm-dev/zfsbootmenu/master...

    Bash is suprisingly flexible.

  • pd

    Linux pipeline debug (by ketancmaheshwari)

  • Plug and slightly related. I once created a bash pipeline debugger that preserves the intermediate outputs. Has a few limitations but maybe generally useful: https://github.com/ketancmaheshwari/pd

  • Pytorch

    Tensors and Dynamic neural networks in Python with strong GPU acceleration

  • When I was at Facebook, I wrote a Python script to extract shell scripts from GitHub Actions workflows, so we could run them all through ShellCheck: https://github.com/pytorch/pytorch/blob/69e0bda9996865e319db...

  • templates

    Starter templates for different languages (by theimpostor)

  • You can use the bash 'caller' builtin to print a stack trace, e.g.: https://github.com/theimpostor/templates/blob/main/bash%2Fte...

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts