Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Challenge: Resource Usage Grapher | Monitoring and Log Analysis
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Python for DevOps Beginners

bookChallenge: Resource Usage Grapher

Visualizing resource trends is a key skill for anticipating system needs and planning capacity upgrades. By plotting resource usage data—like memory consumption—over time, you can quickly spot spikes, patterns, and potential bottlenecks. This challenge asks you to create a Python script that uses the matplotlib library to plot memory usage from a hardcoded list, label the axes, and add a descriptive title. This kind of visualization is essential for DevOps professionals who need to monitor systems and plan for future growth.

Opgave

Swipe to start coding

Write a script that visualizes memory usage data over time using matplotlib.

  • Plot the values in memory_usage as a line graph.
  • Use the x-axis to represent time points (use the index of each value).
  • Label the x-axis as "Time (minutes)".
  • Label the y-axis as "Memory Usage (MB)".
  • Add the title "Memory Usage Over Time" to the plot.

Løsning

Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 2. Kapitel 5
single

single

Spørg AI

expand

Spørg AI

ChatGPT

Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat

close

bookChallenge: Resource Usage Grapher

Stryg for at vise menuen

Visualizing resource trends is a key skill for anticipating system needs and planning capacity upgrades. By plotting resource usage data—like memory consumption—over time, you can quickly spot spikes, patterns, and potential bottlenecks. This challenge asks you to create a Python script that uses the matplotlib library to plot memory usage from a hardcoded list, label the axes, and add a descriptive title. This kind of visualization is essential for DevOps professionals who need to monitor systems and plan for future growth.

Opgave

Swipe to start coding

Write a script that visualizes memory usage data over time using matplotlib.

  • Plot the values in memory_usage as a line graph.
  • Use the x-axis to represent time points (use the index of each value).
  • Label the x-axis as "Time (minutes)".
  • Label the y-axis as "Memory Usage (MB)".
  • Add the title "Memory Usage Over Time" to the plot.

Løsning

Switch to desktopSkift til skrivebord for at øve i den virkelige verdenFortsæt der, hvor du er, med en af nedenstående muligheder
Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 2. Kapitel 5
single

single

some-alt