Polls system performance metrics periodically and logs them to a CSV spreadsheet.
Tick off requirements as you build to track real-time completion.
Follow this chronological guide to build the project from scratch.
Query metrics using psutil variables and format log entries.
import psutil
import csv
import time
from datetime import datetime
def log_system_usage():
cpu = psutil.cpu_percentage(interval=1)
ram = psutil.virtual_memory().percent
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
with open("sys_log.csv", "a", newline="") as f:
writer = csv.writer(f)
writer.writerow([timestamp, cpu, ram])
if cpu > 85.0:
print(f"[WARNING] High CPU usage detected: {cpu}%")Real issues students hit during development and how to troubleshoot them fast.
Continue building your skills with similar projects.
Sleek weather dashboard using OpenWeather API with geolocation, 5-day forecast, and dynamic weather themes.
Personal budget tracker with transaction log, category breakdown, and Chart.js pie charts.
Movie discovery app with TMDB API, trending lists, search, and detail modals.