Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It would be nice to indicate if the upstream or the downstream is the 'limiting' factor in speed.

Ie. within pv, is it the reading the input stream or the writing the output stream that is blocking most of the time?



I have written a (free OSS) Linux tool called `psn` for this kind of stuff [1]. It samples each interesting thread's state from /proc/PID/task/TID/status,wchan,syscall etc and shows you a summary of which threads were blocked in which state, in which syscalls and where in the kernel were they stuck (wchan). It can be used with applications like pv, tar, dd, mysqld, httpd, etc.

[1] https://0x.tools/#linux-process-snapper


it's instantaneous, but the -T (transfer buffer % full display) is sometimes useful for that. (0% full -> source limited, 100% full -> sink limited)


Oh wow, I'd completely missed that -T flag. That's some useful data. Thanks for mentioning it!


It's open source, be the change you want to see in the world


Having maintained an open source library, it’s actually really helpful to see features people want. Not everyone needs to contribute directly to the code base. User feedback is valuable, too.


Unfortunately not everyone is a developer.


This would be a genius addition




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: