https://augustpinch.com/qnd7d2fhd?key=ed5dbed8ecdd9af92e2b54e652945382
8
Wednesday, May 14, 2025
SYSTEM INFORMATION CHECKER TOOL
Here's a basic example of a system information checker tool written in Python:
```
import platform
import psutil
def get_system_info():
print("System Information:")
print(f"System: {platform.system()}")
print(f"Release: {platform.release()}")
print(f"Version: {platform.version()}")
print(f"Machine: {platform.machine()}")
print(f"Processor: {platform.processor()}")
def get_cpu_info():
print("\nCPU Information:")
print(f"Physical cores: {psutil.cpu_count(logical=False)}")
print(f"Total cores: {psutil.cpu_count(logical=True)}")
print(f"Current frequency: {psutil.cpu_freq().current} Mhz")
print(f"Max frequency: {psutil.cpu_freq().max} Mhz")
print(f"Min frequency: {psutil.cpu_freq().min} Mhz")
print(f"CPU usage: {psutil.cpu_percent()}%")
def get_memory_info():
print("\nMemory Information:")
svmem = psutil.virtual_memory()
print(f"Total memory: {get_size(svmem.total)}")
print(f"Available memory: {get_size(svmem.available)}")
print(f"Used memory: {get_size(svmem.used)}")
print(f"Percentage: {svmem.percent}%")
def get_size(bytes):
for unit in ['', 'K', 'M', 'G', 'T', 'P']:
if bytes < 1024:
return f"{bytes:.2f}{unit}B"
bytes /= 1024
def main():
get_system_info()
get_cpu_info()
get_memory_info()
if __name__ == "__main__":
main()
```
This script uses the `platform` and `psutil` libraries to gather system, CPU, and memory information.
To run this script, you'll need to install the `psutil` library if you haven't already:
```
bash
pip install psutil
```
This tool provides basic system information, including:
- System type, release, version, machine, and processor
- CPU information, including physical and total cores, current frequency, and usage
- Memory information, including total, available, and used memory
You can modify and expand this script to suit your needs.
Subscribe to:
Post Comments (Atom)
SMART AFFILIATE LINK GENERATOR
Smart Affiliate Link Generator 💰 Smart Affiliate Link Generator Enter your blog/content: Enter keywords and affili...
-
Smart Affiliate Link Generator 💰 Smart Affiliate Link Generator Enter your blog/content: Enter keywords and affili...
-
*Online Stock Photography: Sell Your Snaps* Are you a budding photographer with a penchant for snapping stunning images? Look no further! O...
-
AI Story Writing Tool AI Story Writing Tool Moral Educational Historical ...
No comments:
Post a Comment