Live data from Hacker News

Show HN: Leaves – A text-UI disk usage treemap visualizer

github.com

21–30 of 34 posts

Re: Show HN: Leaves – A text-UI disk usage treemap visualizer

#22
Love this! A few similar GUI apps have been mentioned for Windows. For Mac, I've been using GrandPerspective for probably 15 years. This is one of my favorite class of programs in terms of how uniquely useful they are.

A pity we can't use something like this (and actually take action on the results) on closed systems like iOS (I've just had to factory reset my iphone to rein in a 37GB "system data" mess... even on the newly restored phone that consumes 15GB but at least that's better).

Re: Show HN: Leaves – A text-UI disk usage treemap visualizer

#23

This is the kind of tool that should be baked into the kernel. It's never there when you need it, and when you do need it, it is probably already a full disk and you maybe can't just download it.

Had this happen to me just last week. Had forgotten to change the “to download into” directory in an GOG archive script after migration to a new system. Filled a folder on the system disk instead of my intended ZFS array.

Naturally ncdu wasn’t installed, so it took me a bit to figure out what the heck happened.

It’s interesting and ironic how so many things in proxmox that would normally release space, instead become nonfunctional when the disk is full. Things like deleting old VM disks or cached iso’s will fail via the interface. I think the web console also broke, had to ssh in to manually free space up.

Re: Show HN: Leaves – A text-UI disk usage treemap visualizer

#26
That looks like a nice tool. It would be helpful if it could optionally run off of a data file. I've used "ncdu" to visualize my restic backups by writing a script that generates the ncdu data format, and more recently I've abused ncdu to visualize process memory usage on macos:

https://gist.github.com/dunhamsteve/59f5e6b9a4bc69039853674d...

Re: Show HN: Leaves – A text-UI disk usage treemap visualizer

#29
post #26

That looks like a nice tool. It would be helpful if it could optionally run off of a data file. I've used "ncdu" to visualize my restic backups by writing a script that generates the ncdu data format, and more recently I've abused ncdu to visualize process memory usage on macos: https://gist.github.com/dunhamsteve/59f5e6b9a4bc69039853674d...

I'm planning on implementing persistence in the near future, likely using some kind of generic embedded database or KV store rather than a serialization format. The primary goal would be to enable resummarization without rescanning directories and consequently, real-time updates from file notifications. However, I don't want to force persistence, since one use case for this tool is answering "why is my laptop hard drive completely full!?!?".

re: memory usage, because of the price of RAM these days, my original plan was for a hierarchical memory usage analyzer, but attribution of shared libraries on Linux isn't straightforward.

"Real" memory usage is unfortunately ill-defined since it could mean "memory freed by killing a process", "memory allocated specifically to the process", "proportional of system memory shared by other processes", etc.

Such a tool would likely need multiple subcommands to reflect how the user's intent, along with an extensive README to explain the subtleties.

To illustrate, if we only show the proportional set size in a hierarchy (e.g. IDE with LSP... I'm looking at you rust-analyzer!), but the user wants to know how much memory could be reclaimed by killing the parent process, two things could happen, as far as I understand. If it's the only hierarchy using a large chunk of shared libraries, the PSS will be pretty close. However, if other apps are using those libraries, very little memory will be freed (mostly what was allocated specifically to the killed app).

On top of that, we also have to consider swap space.

I may revisit this in the future once I have a better understanding of smaps and friends, if RAM prices don't normalize anytime soon.

Post reply on HN