Live data from Hacker News

Show HN: Witr – Explain why a process is running on your Linux system

github.com

61–70 of 108 posts

Re: Show HN: Witr – Explain why a process is running on your Linux system

#61
post #17

If you're looking to build and install this from source, here's the incantation: CGO_ENABLED=0 go build -ldflags "-X main.version=dev -X main.commit=$(git rev-parse --short HEAD) -X 'main.buildDate=$(date +%Y-%m-%d)'" -o witr ./cmd/witr Call me old-fashioned, but if there's an install.sh, I would hope it would prefer the local src over binaries. Very cool utility! Simple tools like these keep me glued to the terminal…

Thanks! Glad you like it Thanks to @sestep, Nix support is already added, so no need to worry about binaries.

Re: Show HN: Witr – Explain why a process is running on your Linux system

#62
post #14

What does this means for context: “Git repository name and branch” Does this mean it detects if something is running from within a git repository folder? Couldn’t find the code that checked this.

It appears to walk up from the process's working directory searching for a .git directory: https://github.com/pranshuparmar/witr/blob/1e47bdb8fde179b17...

Yes, that's correct! It walks up from the process’s working directory looking for a `.git` folder to detect the repo and branch. Thanks.

Re: Show HN: Witr – Explain why a process is running on your Linux system

#63

Cool idea. Reminds me of my alias "whodis" which just lsofs a port to find out the pid who's got it open, but way more functional.

Thanks! Glad you like it Trying to make this a swiss army knife for PID information.

Re: Show HN: Witr – Explain why a process is running on your Linux system

#64
post #10

This is amazing. Thank you for sharing this. Do you have any qualms about me making an entry in the AUR for this?

Im not the author but I would love for an AUR made for this ;) My favorite thing about arch is how insanely quickly AURs pop up for interesting tools.

[deleted]

Re: Show HN: Witr – Explain why a process is running on your Linux system

#68

> witr is successful if users trust it during incidents. > This project was developed with assistance from AI/LLMs [...] supervised by a human who occasionally knew what he was doing. This seems contradictory to me.

The last bit > supervised by a human who occasionally knew what he was doing. seems in jest but I could be wrong. If omitted or flagged as actual sarcasm I would feel a lot better about the project overall. As long as you’re auditing the LLM’s outputs and doing a decent code review I think it’s reasonable to trust this tool during incidents. I’ll admit I did go straight to the end of the readme to look for this exact…

Thank you, yes I added it in jest and still keeping it for sometime. It was always meant to be removed in future.

Re: Show HN: Witr – Explain why a process is running on your Linux system

#69
post #51

Earlier quoted context omitted.

No, it does not.

I'm on mobile, so it's not super easy to read the source, but it seems like it only checks for the parent processes? Also I don't think this approach works correctly, because a disowned/nohup process will show up as PPID 1 (systemd), which is not correct

Yes, this is a bug. Planning to fix it soon.

Re: Show HN: Witr – Explain why a process is running on your Linux system

#70

`ps uaxf` gives me pretty similar output.

`witr` is trying to be a bit different. Here are few use cases to consider: - When a process started. - Which ports a process is using. - Which user started it. - From which directory it started. - env flag to list all the variables attached to the process. - json flag to use it programmatically.
Post reply on HN