Collecting data from Linux

Native Linux commands provide useful data about the current system status and health. However, each one of those Linux commands and utilities are focused on getting data from only one aspect of the system. We need to leverage Python modules to get those details back to the administrator and generate useful system reports.

We will divide the reports into two parts. The first one is getting general information about the system by using the platform module, while the second part is exploring the hardware resources in terms of the CPU and memory.

We will start by leveraging the platform module, which is a built-in library inside of Python. The platform module contains many methods that can be used to get details about ...

Get Hands-On Enterprise Automation with Python. now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.