Python and Server Load
Question:
Is there a way, using Python, to check the server load of a Linux machine periodically and inform me of it in some way?
Answers:
Python has a function to get the system’s load average as part of the os module
>>> import os
>>> os.getloadavg()
(1.1200000000000001, 1.0600000000000001, 0.79000000000000004)
From there, you can do whatever checks you need, and then email you, or similar.
Is there a way, using Python, to check the server load of a Linux machine periodically and inform me of it in some way?
Python has a function to get the system’s load average as part of the os module
>>> import os
>>> os.getloadavg()
(1.1200000000000001, 1.0600000000000001, 0.79000000000000004)
From there, you can do whatever checks you need, and then email you, or similar.