Advanced Linux Systems Using Python

Coming soon. This course is planned; lessons and labs are not available yet. No release date has been announced.

Use Python to investigate files, storage, processes, services and networks, then plan bounded changes and reconcile uncertain results on assigned Linux systems.

Advanced ยท Python systems engineering

Before you begin

Comfortable Python programming, including functions, exceptions, files and tests, plus Linux files, processes, permissions and command-line inspection. This is not an introduction to Python.

The planned project

Build and explain small Linux operator tools that distinguish observed state from inference, make only approved bounded changes, and verify recovery and preservation in a changed systems case.

Course scope

An advanced course for people who already program in Python. Build tested operator tools using real Linux evidence and bounded changes in disposable guests. The IDE, labs and assessments are still in development. Guest virtual disks do not establish facts about physical host disks.

Planned course outline

6 planned chapters and 18 lesson outlines.

  1. Follow bytes to backing devices

    Start with durable file evidence, then trace filesystem capacity and device identity without confusing a report with physical storage.

    1. Planned lesson: Write evidence durably

      Planned task: Predict how bytes, offsets and partial writes reach a private file, inspect real descriptor and syscall evidence, then implement and verify a bounded evidence writer.

      Changed case to investigate: An interrupted write occurs after replacement but before confirmed directory synchronization; report the uncertain commit instead of claiming rollback or repeating blindly.

    2. Planned lesson: Explain capacity and mounts

      Planned task: Use Python and Linux observations to relate a mounted filesystem, available blocks, inode counts and device size, stating what each number measures.

      Changed case to investigate: A deleted but still-open file consumes space; revise the capacity explanation without treating a directory listing as complete evidence.

    3. Planned lesson: Trace a device graph

      Planned task: Follow an assigned filesystem through major/minor numbers, Device Mapper, LVM reports and guest backing disks, then verify each dependency edge.

      Changed case to investigate: The logical volume spans two assigned virtual disks; reject a one-device assumption and rebuild the graph from current identifiers.

  2. Read and change storage cautiously

    Interpret an on-disk structure, handle changing paths, and gate any modification to owned disposable storage.

    1. Planned lesson: Inspect an ext4 superblock

      Planned task: Read documented fields from a clean assigned image, predict byte order and offsets, and compare the parsed result with Linux filesystem tools.

      Changed case to investigate: A truncated or unsupported image replaces the clean one; report the limit rather than fabricating a filesystem size or repair.

    2. Planned lesson: Defend a file traversal

      Planned task: Inspect permissions, directory descriptors and path changes in a private tree, then restore only the intended file with verified metadata limits.

      Changed case to investigate: A symlink changes between inspection and use; explain the race and choose a descriptor-relative operation or a justified stop.

    3. Planned lesson: Constrain a storage change

      Planned task: Check an approved disposable virtual disk and filesystem against an exact target allowlist and preconditions before one bounded operation and verification.

      Changed case to investigate: The target identity or current size changes after planning; refuse the stale plan and reconcile observed state before any retry.

  3. Investigate processes and resource boundaries

    Build a host observer that accounts for short-lived processes, subprocess lifetimes and measured resource scope.

    1. Planned lesson: Identify a changing process

      Planned task: Correlate PID, creation time and open-file evidence for an owned process, including visibility limits and exit races.

      Changed case to investigate: A PID is reused after the first observation; reject the stale identity before reporting or acting on it.

    2. Planned lesson: Supervise a bounded child

      Planned task: Launch an argument vector without shell interpolation, collect both output streams with a deadline, and distinguish child exit, timeout and incomplete descendant cleanup.

      Changed case to investigate: The child closes output but remains alive, or a descendant retains a pipe; avoid labeling EOF as process completion.

    3. Planned lesson: Measure a cgroup, not a guess

      Planned task: Compare interval CPU, memory, I/O and pressure observations at guest and cgroup scope, and explain a measured constraint.

      Changed case to investigate: A counter resets or a mapped file is truncated during observation; qualify the delta and contain the test to a separate owned process.

  4. Explain service behavior over time

    Separate unit state from useful service, preserve journal gaps, and make unattended work accountable.

    1. Planned lesson: Follow a service job

      Planned task: Inspect systemd unit properties and a bounded job on an assigned service, distinguishing enabled, active, ready and application-healthy.

      Changed case to investigate: The unit is active but its application probe fails; locate the missing evidence before changing the unit.

    2. Planned lesson: Correlate journal evidence

      Planned task: Use cursors, boot IDs and bounded records to explain a service restart while preserving missing intervals and clock uncertainty.

      Changed case to investigate: A log gap spans a reboot; stop short of claiming no failure occurred in the missing interval.

    3. Planned lesson: Run an accountable timer

      Planned task: Give an owned observer a service identity, schedule, output record and overlap rule; verify useful work rather than just a ready notification.

      Changed case to investigate: A prior run is still active at the next trigger; account for overlap or skip behavior and preserve its outcome.

  5. Observe and repair a network path

    Tie namespace-specific route evidence to bounded DNS, transport and application probes before a scoped network change.

    1. Planned lesson: Read the right network namespace

      Planned task: Collect links, addresses, routes and rules for an assigned guest namespace, then explain which table and interface a packet would use.

      Changed case to investigate: The same interface name appears in another namespace; identify the scope before reporting a route.

    2. Planned lesson: Locate a failed connection

      Planned task: Use Python sockets and TLS checks with deadlines to distinguish DNS, TCP, certificate and application outcomes on assigned endpoints.

      Changed case to investigate: DNS succeeds but the service is bound only to loopback; revise the diagnosis without disabling certificate checks or scanning beyond the lab.

    3. Planned lesson: Preserve the control path

      Planned task: Plan one approved guest-network repair with target namespace, preconditions and recovery path, then verify application reachability and management access.

      Changed case to investigate: A route repair would redirect the management connection; stop or choose a narrower change and prove preservation.

  6. Plan, reconcile and defend a systems change

    Assemble the observations into a reviewable operator tool, then handle partial fleet work and a changed independent case.

    1. Planned lesson: Reconcile an uncertain write

      Planned task: Build a plan/apply/verify record for one approved operation, using current state and a journal to decide whether a retry is safe.

      Changed case to investigate: The request times out after a possible change; inspect the target before retrying and reverse only genuinely reversible work.

    2. Planned lesson: Account for every assigned host

      Planned task: Use authenticated transport, verified host keys, canaries and per-node results to report a bounded operation across owned guests.

      Changed case to investigate: One host does not reply while another succeeds; retain partial status and do not turn a completed request into fleet-wide success.

    3. Planned lesson: Defend an independent systems repair

      Planned task: Trace an assigned filesystem through guest devices and related process, resource and service evidence, justify one bounded repair, and verify preserved behavior.

      Changed case to investigate: The same symptom now comes from a different layer; form a fresh explanation and reject a hard-coded replay of the first repair.

See available courses