Skip to main content
100%

Python snippets for quickly finding the platform type, cpu and memory stats of a Linux machine.

✓ Published0🌍 Public
PP7h
Last edited Jun 16, 2015
Created on Jun 16, 2015

This example shows how to quickly retrieve platform type, CPU model names, and memory statistics from a Linux machine. It parses the `/proc/cpuinfo` and `/proc/meminfo` files using Python’s `collections.OrderedDict` to preserve field order, printing each processor’s model name and total/free memory. The third snippet uses the `platform` module’s `uname()` and `linux_distribution()` functions to display system and distribution details. Together, these scripts demonstrate lightweight, file-based system introspection without external dependencies.

AI-generated description

Similar vizzes