How to use psutil module In Python
This is primarily used for getting runtime process information on the system.
Installation of psutil module can be done using the below command:
pip install psutil
Example:
Python3
import psutil print (f "Memory :{psutil.virtual_memory()}" ) |
Output:
Memory :svmem(total=8458571776, available=2982494208, percent=64.7, used=5476077568, free=2982494208)
Get Your System Information – Using Python Script
Getting system information for your system can easily be done by the operating system in use, Ubuntu let’s say. But won’t it be fun to get this System information using Python script? In this article, we will look into various ways to derive your system information using Python.
There are two ways to get information:
- Using Platform module
- subprocess
Contact Us