Python Prompts Free Prompt

Python Script to Monitor Network Bandwidth

Write a Python script that monitors network bandwidth usage using psutil
☆ Save
Prompt
You are a Python developer. Write a script that tracks total bytes sent and received over a period. Use psutil. The script must: 1) Monitor at regular intervals, 2) Calculate bandwidth usage, 3) Log to CSV, 4) Send alert if threshold exceeded, 5) Provide a real-time graph using matplotlib, 6) Run continuously, 7) Handle network interfaces. Add comments.

How to use this prompt

1
Click Copy Prompt above to copy to your clipboard.
2
Open ChatGPT, Claude, Gemini, or any AI assistant and paste the prompt.
3
Replace any [PLACEHOLDER] values with your specific details.
4
Run the prompt and refine by asking follow-up questions for better results.