Files
Samsara/README.md

6.2 KiB

Server Buddy

Desktop retirement assessment tool for Windows Server and Linux administrators. Python 3.11+, PySide6 and versioned JSON. Local read-only Linux Mint/RHEL-based collection, Windows/Linux synthetic demos, offline JSON import and HTML/JSON reporting are available. Remote collection and live Windows collection remain incomplete. No real enterprise infrastructure is contacted automatically.

Linux Mint setup

sudo apt update
sudo apt install python3 python3-venv libegl1 libopengl0 libxcb-cursor0 libxkbcommon-x11-0
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt
python -m server_buddy.main

Run from the project root in a graphical desktop session. If Qt mentions the xcb cursor library, install libxcb-cursor0; reinstalling Python packages does not supply this system library. The launcher diagnoses this common issue before starting Qt.

On Windows 10/11, create a virtual environment with py -3 -m venv .venv, activate .venv\Scripts\activate, install requirements and run the same module command. Windows desktop execution still needs validation. Local Linux collection is disabled on Windows; demo and inventory import remain available.

Test a real assessment on your Mint PC

  1. Close any already-open Server Buddy window and restart with python -m server_buddy.main to load the updated code.
  2. Open Server Analyzer and click Analyze This Linux PC — read-only. This button assesses the computer running the application, irrespective of the demo target and hostname fields. It never connects to a remote hostname.
  3. Watch the collection stages. Use Cancel collection if needed; cancellation retains the previous assessment. Background commands have time/output limits.
  4. Confirm the banner says LOCAL LINUX INVENTORY. Overview shows the actual local OS, kernel, boot time and per-check statuses. Review Services, Network Connections, Scheduled Tasks / Timers, Software, Storage, Dependencies and Risk Assessment. Tables are searchable and sortable.
  5. Open Reports, save an HTML report and open the saved file in a browser. JSON export is also available. Local reports are labeled as local snapshots rather than imported or synthetic data.

Alternatively select This Linux PC — read-only under Settings, then use Analyze Server. The local mode ignores the hostname field. Local collection requires no sudo, passwords or remote setup. It does not install packages, restart services, change configuration, resolve remote names or read private keys, service command lines or environment variables.

The collector uses systemd, ss, ip, RPM where available and dpkg on Mint/Debian-derived hosts. Commands unavailable in containers or restricted environments are recorded as failures, with no synthetic replacement. Results describe the process's local namespace and permissions, which may differ from the whole host.

Current local coverage and limits

  • OS distribution, kernel, boot time, interfaces and addresses.
  • Loaded system service state/startup; accounts, user services and executable details remain incomplete.
  • TCP snapshot and process attribution where visible. Direction and historical/UDP activity are unverified.
  • Loaded system timers; cron/anacron, user timers, unloaded timers and trigger configuration require review.
  • RPM/dpkg software; containers and manually installed applications are outside coverage.
  • Mount table, including remote mount references. Capacity/free space and NFS/Samba exports are not yet collected. Mounted remote filesystems are not accessed.
  • Application certificates, directory integration and workload role inference are explicitly not collected.

The heuristic score is preliminary and requires administrator review. Routine Linux services are not automatically classified as active application workloads; unclassified services contribute uncertainty. Neither missing connections nor a low score proves retirement safety.

Headless local Linux inventory

The local collector can also produce JSON without PySide6 or jsonschema (Python standard library only):

python3 -m server_buddy.collectors.linux --output /tmp/my-local-inventory.json

Use a new output filename; the CLI will not overwrite an existing file. It reads only the local execution host and writes only the requested report file. Import the JSON in either desktop using Import Windows / Linux inventory JSON. This provides a manual offline workflow for future RHEL validation without GUI packages on the assessed host. Do not treat Mint testing as validation of every RHEL release.

Synthetic and offline testing

The target selector chooses Windows Server 2016 onward (demo-web-01.example.test) or RHEL-based Linux (demo-rhel-01.example.test) synthetic fixtures. Click Analyze Server in demo mode to load the selected fixture. All fixture data and timestamps remain clearly labeled. Demo mode rejects other hostnames.

JSON import validates the v1 collection schema (or a report wrapper), enforces a 10 MiB input limit, recalculates risk and strips task/service command lines and external diagnostic details. Imported timestamps/check statuses are not independently verified. Review all report content before sharing; inventory names, paths and addresses may be sensitive. History is session-only and labels each record's source.

Tests

python -m unittest discover -s tests -v

Qt tests run offscreen automatically. Tests cover schema validation, source labeling, Linux service/network/package parsing, missing commands, cancellation/timeouts, local GUI workflow and report escaping. The current development environment passed all 21 tests; a real local smoke collection passed schema validation and generated HTML/JSON. In its restricted environment, systemd and interface commands failed visibly, while package, TCP and mount collection ran. GUI desktop appearance and Windows/RHEL execution still need platform validation.

See implementation plan, platform support and developer guide. Future Windows collection will use existing authorized PowerShell remoting from a Windows execution host, never Windows modules on Linux. Packaging, Windows inventory and remote SSH collection remain later work.