Not knowing the /proc file system

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

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

    An official read-only mirror of http://hg.nginx.org/nginx/ which is updated hourly. Pull requests on GitHub cannot be accepted and will be automatically closed. The proper way to submit changes to nginx is via the nginx development mailing list, see http://nginx.org/en/docs/contributing_changes.html

  • So yes, I don't think I have ever typed out "fileDescriptor" but I do label these things to make it more legible!

    OP has a point. We could do with more discipline when it comes to naming conventions in C. We're not using punch cards any longer.

    Somewhat related, there's another comment about the 80 char max... clang-format keeps to this. I'm kind of OK with this particular remnant of punch cards because I can get four editor windows open side by side on my ultra wide monitor.

    The nginx codebase is pretty freaking fantastic and I've learned a lot from just randomly browsing through the source, but I mean, come on:

    https://github.com/nginx/nginx/blob/master/src/core/ngx_arra...

      if ((u_char *) a->elts + a->size * a->nalloc == p->d.last) {

  • lsofer

    script to match similar functionality to lsof -i, and then some.

  • /proc is amazing once you get the hang of it and get a good understanding of what's all in there. Especially if you're doing low level performance tuning.

    It's particularly helpful in larger infrastructures where tool the variability means differences in available tooling, and their output plus cli options. I'm sure /proc iteration has its own issues of variability across large infrastructres, but I haven't seen it. It's a fairly consistent API. Or at least it was, since I haven't touched a large infrastructure in some time.

    When I got tired of `lsof` not being installed on hosts (or when its `-i` param isn't available) I ended up writing a script [1] that just iterates through /proc over ssh and grabs all inet sockets, environment variables, command line, etc from a set of hosts. Results in a null-delimited output that can then be fed into something like grafana to create network maps. Biggest problem with it is the use of pipes means all cores go to 100% for the few seconds it takes to run.

    [1] https://github.com/red-bin/lsofer

  • 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