Python, Automation, Data Science, Artificial Intelligence, Llm.
format='%(asctime)s - %(message)s', datefmt='%Y-%m-%d %H:%M:%S') # Monitoring interval in seconds interval = 60 while True: # Get CPU usage cpu_percent = psutil.cpu_percent() # Get memory usage memory = psutil.virtual_memory() memory_percent = memory.percent # Log the information logging.info(f"CPU