[Python third-party package] Quickly obtain hardware information and usage (psutil, platform)

Article directory Preface 1. psutil package 1.1 Install psutil package 1.2 How to use psutil Get CPU usage Get memory usage Change memory usage into GB and MB Get disk usage Disk memory for conversion Get network information Network info 2. platform 2.1 Introduction to platform 2.2 How to use platform Get the name of […]

Design a network traffic monitoring program based on Python psutil library

I recently built a LAN file transfer system that requires network traffic monitoring. Security software on the market has this function, but the interface is too small and inconvenient to view, so I designed this network traffic monitor. Program interface: First, check the network information. We can use the psutil library to obtain the network […]

How to Analyze Linux Process Resources Using the psutil Module

psutil The installation method and official documents of the module are detailed in: https://psutil.readthedocs.io/en/latest/ Meaning of each process statistics pid: PID of the process Return the pid of the process. cpu_num: CPU core running the current process Returns the CPU cores on which the current process is running. The return value will be less than […]

psutil in Python

Directory 1 Introduction 2. Usage 2.1 Get CPU related information 2.1.1 Get the number of physical CPU cores 2.1.2 Get the number of logical CPU cores 2.1.3 Get CPU usage 2.1.4 Get CPU time 2.1.5 Get CPU temperature 2.2 Get memory information 2.2.1 Obtain comprehensive memory information 2.2.2 Obtain the status of the swap partition […]

Jupyter Notebook’s python3 (ipykernel) fails to start and reports “No module named ‘psutil._psutil_windows'”

Record an error when starting a Jupyter Notebook Environment Win10 default installed environment py3.9 32bit, jupyter book is installed in the virtual environment py3.9 (64bit) established by conda Question 1 Jupyter notebook starts the kernel and always shows that reconnecting finally failed An error is reported every time it starts: ModuleNotFoundError: No module named ‘psutil._psutil_windows’ […]