Closed Memphizzz closed 3 years ago
I like to use psutil because of the huge range of functionality it offers. For example, you can view the memory usage of processes. There is a particular python profiler called memory-profiler that analyses the memory consumption of a python script line-by-line(made possible by psutil).
If psutil wasn't installed I'd probably have to use htop or ps(to look at the memory usage).
I was actually thinking about the performance impact between psutil and whatever the alternative is. @aristocratos Any insight on this?
@Memphizzz
Not using psutil uses ps
and reads directly from /proc
which isn't very efficient in bash.
Regardless I would suggest you use BpyTop instead, since it's alot faster than bashtop regardless of method and also in active development.
Oh wow, thanks for letting me know @aristocratos !
As stated above I'd like to know what the advantages of using psutil are and what is being used if psutil is not installed on a Ubuntu server?
Thanks in advance!