Beginner-friendly 204-line Python script that polls CPU, RAM, disk IO and network and writes metrics to JSON. Handy for checking box health before users complain. #python #infra #psutil https://www.valtersit.com/python/system-metrics-collector-cpu-ram-io-net/
#psutil — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #psutil, aggregated by home.social.
-
Glances on macOS crashed with:
SystemError: <built-in function proc_cmdline> returned a result with an exception set
It's a psutil 7.2.2 bug: if a short-lived process is reaped while Glances reads it, psutil raises an error Glances doesn't catch. No fixed release yet:
https://github.com/giampaolo/psutil/issues/3024
https://github.com/nicolargo/glances/issues/3811The crash also leaves the terminal garbled. No need to close the tab: type reset, even if you can't see it, and press Enter (or Ctrl+J).
-
Catch Python memory leaks in long-running workers. 219 lines, uses psutil and tracemalloc. python3 mem_leak.py --pid 1234 --interval 10 --alert-mb 500 https://www.valtersit.com/python/memory-leak-detector-for-python-processes/ #python #infra #psutil
-
214 lines of Python to watch an interface and alert when throughput passes a threshold. Handy for edge nodes where traffic spikes sneak up. Beginner level, psutil. https://www.valtersit.com/python/network-interface-monitor-and-alerter/ #python #infra #psutil
-
222 lines of Python that watch a process and restart it when it dies. Handles gunicorn workers, daemons, background jobs. Beginner friendly.
https://www.valtersit.com/python/process-monitor-with-auto-restart-policy/
-
Detect memory leaks of C extensions with psutil and psleak
https://gmpy.dev/blog/2025/psutil-heap-introspection-apis
#HackerNews #DetectMemoryLeaks #psutil #psleak #CExtensions #MemoryManagement #TechNews
-
#ZombieShooter #TaskManager #Kiro #KiroweenHackathon #Python #PyGame #psutil #DeveloperTools #VibeCoding #SteeringDocs #RAM #SystemAdmin #ProcessKiller #GameDev #AI #Programming #Coding #SoftwareDevelopment #Tech #Innovation #Frankenstein #Hackathon #Developer #Productivity #CodingTools #DevTools #ProgrammingTools #SoftwareEngineering #TechInnovation #AIAssistant #CodingAssistant #DeveloperExperience #CodingLife #TechLife #Software #AppDevelopment #ProgrammingLanguage #CodingSkills #TechSkills #
-
Ah yes, nothing says "cutting-edge tech" like freethreaded Python wheels for #psutil. 🤓 Let's gather the entire Python community to celebrate this riveting achievement of compiling some C code and throwing it into a wheel like it's 1998. 🎉 Bravo, dear developers—yet another feature that will change everything (or nothing).
https://gmpy.dev/blog/2025/wheels-for-free-threaded-python-now-available-in-psutil #PythonCommunity #TechNews #CCode #Innovation #Celebration #HackerNews #ngated -
Wheels for free-threaded Python now available for psutil
https://gmpy.dev/blog/2025/wheels-for-free-threaded-python-now-available-in-psutil
#HackerNews #Wheels #psutil #Python #FreeThreaded #Development #OpenSource
-
I want to measure run time of a Python program and compare it to /usr/bin/time. The script, t.py:
import psutil, time,
startSecs = psutil.Process(os.getpid()).create_time()
print("startup took %.3fs" % (time.time() - startSecs))run as:
/usr/bin/time -f 'wall=%e' python3 t.py
output:
startup took 0.822s
wall=0.03where 0.8s is quite obviously wrong, not only because of the wall=0.03, but because there is no noticeable wait of nearly a second. How come?
-
Introduction to psutil: A Python library for system monitoring and automation
https://www.recursiveneuron.com/2022/12/introduction-to-psutil-python-library.html
#psutil #python #programming #pythonlesson #pythontips #Python3