Runpeek guides

Guides for long-running scripts, servers and training runs

50 guides in 5 topics: keeping jobs alive on remote servers, progress bars that work, following logs, alerts when a run finishes or fails, and training on Colab, Kaggle and rented GPUs. Each guide lists its sources and the date it was last checked.

Notifications and alerts

Get a ping on your phone when a script, command or training run finishes, fails or gets stuck.

Python notificationsGet a notification when your Python script finishes or crashesSend a Discord, Slack, Telegram, ntfy or email alert when a Python script ends, make crashes and SIGTERM notify too, and know each channel's limits.Discord webhooksSend Discord webhook messages from PythonCreate a Discord webhook, post messages and embeds from Python with requests, retry on 429 with retry_after, and stay inside the 2,000 and 6,000 character limits.Slack webhooksPost to Slack from Python with an incoming webhookCreate a Slack incoming webhook, post text and Block Kit messages from Python with requests, retry on 429 and fix invalid_payload and the other webhook errors.Telegram botsSend Telegram messages from a Python scriptCreate a Telegram bot with BotFather, find your chat_id, send alerts from Python with requests or python-telegram-bot 22.8 and stay under the rate limits.ntfySend ntfy push notifications from curl and PythonSend phone push notifications with ntfy from curl or Python: title, priority, tags and click headers, private topics, self-hosting and the ntfy.sh limits.Push notificationsFree push notifications for scripts: 9 options and their real limitsCompare 9 ways to push alerts from scripts: ntfy, Discord, Slack, Telegram, Pushover, Gotify, Pushbullet, Gmail and Runpeek, with their real costs and limits.Training alertsGet notified when model training finishes, crashes or hangsSend a Discord or Slack message when Keras, PyTorch or Hugging Face training finishes, and catch the crashes, OOM kills and hangs that end hooks miss.Debugging hangsFind out why a Python script is stuck, and get alerted next timeTell a hung Python script from a slow one with ps, find the stuck line with py-spy or faulthandler, add timeouts and get alerted when a job goes quiet.Shell notificationsGet notified when a long command finishes, locally or over SSHGet a desktop or phone alert when a long Linux or macOS command ends: notify-send, the terminal bell, osascript, tail --pid and curl to ntfy over SSH.Google ColabGet notified when a Colab cell finishes, crashes or disconnectsGet alerted when a Google Colab cell finishes: Colab's browser notification, a sound, a Discord or Telegram message from the cell, and catching disconnects.

Terminals and remote servers

Keep long jobs alive on a remote box, reattach later and share what the terminal is doing.

tmux 3.8 cheat sheettmux cheat sheet: sessions, windows, panes and copy modeEvery tmux command for sessions, windows, panes and copy mode on one page, for tmux 3.8, with the default Ctrl-b bindings.tmux 3.8 sessionstmux attach, detach, list and kill: the long-job workflowStart a named tmux session for a long job, detach with Ctrl-b d, log out, then list, reattach or kill it. Tested on tmux 3.8 and 3.5a.tmux 3.8 copy modeHow to scroll up in tmux: mouse, copy mode and scrollbackScroll up in tmux with the mouse wheel or Ctrl-b [, copy text with emacs or vi keys, raise the 2,000-line history-limit and save scrollback to a file.tmux vs screentmux vs screen: which terminal multiplexer to use in 2026tmux 3.8 and GNU screen 5.0.2 side by side: keys, scrollback, splits, mouse, scripting and serial ports, plus when screen is still the right pick.GNU screen 5.0.2Linux screen command: sessions, detach, reattach, scroll and logsUse the Linux screen command: start a named session, detach with Ctrl-a d, reattach with screen -r, scroll back, log output and kill it.GNU coreutils nohupnohup: keep a command running after logout and log its outputHow nohup works: where nohup.out goes, how to send output to your own log file, check on the job later, stop it, and why Python prints nothing.Linux background jobsRun a process in the background on Linux and keep it after logoutRun a Linux process in the background with &, bg, nohup, disown, setsid, systemd-run or tmux, and see which survive a closed terminal or logout.OpenSSH keepalivesSSH keep alive: stop idle SSH connections from timing outStop SSH sessions from timing out: set ServerAliveInterval in ~/.ssh/config or ClientAliveInterval in sshd_config, and see why keepalives do not save your job.ttyd 1.7.7ttyd: share a terminal in your browser without handing out a shellShare a terminal in the browser with ttyd 1.7.7: install it, choose read-only or writable, add a password and TLS, run it behind nginx and keep shells private.tmate 2.4.0 replacementstmate alternatives now that ssh.tmate.io is gonetmate's public servers shut down in July 2025. Compare upterm, sshx, ttyd, tmux over SSH, asciinema and self-hosted tmate, with the real limits of each.

tqdm and progress bars

Progress bars for loops, pandas, notebooks and worker pools, and how to fix the ones that stay blank.

Python progress barstqdm in Python: what it is and how to use ittqdm wraps any Python iterable in a progress bar with ETA and rate. Install it, wrap a loop, then use the parameters and helpers that matter in practice.Python progress barsHow to make a progress bar in PythonCopy-paste Python progress bar code: tqdm in 3 lines, a short standard library function, and rich, alive-progress, click and progressbar2 compared.Python progress barstqdm alternatives: 6 Python progress bar libraries comparedrich, alive-progress, progressbar2, enlighten, click and yaspin compared with tqdm 4.70.1: versions, licences, Python support, several-bar support and best use.Python progress barsProgress bars in Jupyter notebooks with tqdmGet the tqdm widget bar in Jupyter with tqdm.auto, fix the IProgress not found error, nest and reuse bars, and set up JupyterLab and VS Code.Python progress barsProgress bars for pandas apply with tqdmAdd a tqdm progress bar to pandas apply, map and groupby with tqdm.pandas() and progress_apply, fix the pandas 3 AttributeError and avoid known bugs.Python progress barstqdm with multiprocessing, threads and asyncioGet a tqdm progress bar that moves with multiprocessing: process_map, thread_map, Pool.imap with total, asyncio gather, and the tqdm 4.70 chunksize bug.Python progress barstqdm not showing? Fixes for every common symptomFix tqdm when the bar doesn't show, prints a new line on every update or floods your logs: stderr redirects, disable=None, mininterval, tqdm.write and position.Python progress barstqdm progress bars in Telegram, Discord and SlackSend a tqdm progress bar to Telegram, Discord or Slack with tqdm.contrib: bot setup, tokens, environment variables, rate limits and what they can't alert on.Python progress barsHow to install tqdm and fix No module named tqdmInstall tqdm with pip install tqdm or conda-forge, fix ModuleNotFoundError: No module named 'tqdm', install it in a Jupyter kernel and check the version.Python outputPYTHONUNBUFFERED: why print output shows up late, and how to fix itPython print output late or missing under nohup, Docker, systemd or CI? Fix it with PYTHONUNBUFFERED=1, python -u, print(flush=True) or line buffering.

Logs and monitoring

Follow logs live, see what a running process is doing and know when a job stops making progress.

GNU coreutils tailtail -f: follow a log file in real time (and use tail -F for rotated logs)Follow a log file live with tail -f, keep following after log rotation with tail -F, filter with grep, and know when less +F or journalctl -f fits better.Docker container logsdocker logs -f: follow a container's logs liveFollow Docker container logs live with docker logs -f, limit output with --tail and --since, follow Compose services, and fix logs that stay empty.Python process inspectionHow to check the progress of a Python script that is already runningSee how far a Python script that is already running has got, without stopping it, using py-spy dump, /proc file offsets, pv -d, ps and strace.py-spy 0.4.2py-spy: see what a running Python process is doingInstall py-spy 0.4.2, use dump, top and record on a running Python process, read the flame graph, and fix Permission Denied in Docker and Kubernetes.NVIDIA GPU monitoringnvidia-smi: monitor GPU usage, memory and processes liveMonitor NVIDIA GPUs live with nvidia-smi -l and watch, log metrics to CSV with --query-gpu, use dmon and pmon, and read Volatile GPU-Util correctly.Slurm workload managerHow to check Slurm job status with squeue, sacct and scontrolCheck Slurm job status with squeue --me, read finished jobs with sacct and seff, inspect running jobs with scontrol and sstat, and decode the state codes.Jupyter notebookspapermill: run a Jupyter notebook from the command lineRun Jupyter notebooks from the terminal with papermill 2.7.0: pass -p parameters, stream output with --log-output, set timeouts, or use nbconvert --execute.Cron job monitoringCron job monitoring tools with a free tier: 7 options comparedSeven cron job monitoring tools with a free tier compared: Healthchecks.io, Cronitor, Better Stack, Dead Man's Snitch, Sentry Crons, Uptime Kuma and Runpeek.Python loggingPython logging to a file: basicConfig, handlers and rotationWrite Python logs to a file with basicConfig, log to a file and the console at once, rotate by size or time, format lines, and keep tqdm bars intact.Linux command lineLinux watch command: rerun a command every few secondsUse the Linux watch command to rerun a command every N seconds: set -n intervals, highlight changes with -d, quote pipes, exit on change with -g.

ML training and GPUs

Watch training from anywhere, pick a tracker, and stop paying for GPUs that finished hours ago.

Remote training monitoringHow to monitor ML training remotely, including from your phoneFour ways to watch a remote training run from a laptop or a phone, what each one shows, and how to get a ping when training finishes, crashes or stalls.PyTorch and tqdmHow to add a tqdm progress bar to a PyTorch training loopAdd epoch and batch tqdm bars to a PyTorch training loop, show the loss with set_postfix without slowing the GPU, and fix nested bars and DDP output.Transformers TrainerHow the Hugging Face Trainer progress bar works and how to change itHow the transformers Trainer draws its tqdm bar, how to hide it, log more often or replace it with a callback, and why it behaves differently in notebooks.Experiment trackingW&B alternatives: 7 experiment trackers and their real limitsWeights & Biases is now CoreWeave Forge and Neptune is gone. Seven experiment trackers compared on license, free tier, price and the limit that bites.MLflow 3.17 tracking serverHow to run a remote MLflow tracking serverRun mlflow server on a remote machine, keep runs in SQLite or PostgreSQL and artifacts in S3, reach it by SSH tunnel or over the network, and add a login.Colab plans and pricingGoogle Colab Pro and compute units: prices, plans and what you getColab Pro, Pro+ and Pay As You Go prices, what compute units are, when they expire, what each plan adds, and which Google AI plans now include Colab units.Colab runtime limitsGoogle Colab time limits: why your runtime disconnects and how to survive itWhat Google publishes about Colab runtime limits, idle disconnects and GPU quotas, what Pro+ changes, and how to checkpoint to Drive and resume after a disconnect.Free GPUsFree GPU for deep learning: 8 options and their real limitsKaggle, Colab, Lightning AI, SageMaker Studio Lab, Modal, Paperspace, Hugging Face ZeroGPU and cloud trials: free GPU quotas, session caps and catches.GPU rental pricesCloud GPU pricing: what an H100, A100, L40S or RTX 4090 costs per hourWhat an H100, A100 80GB, L40S or RTX 4090 costs per hour on 8 GPU clouds, checked on each vendor's page on 30 October 2026, plus storage and idle costs.Cloud GPU billingHow to stop a GPU instance automatically when training finishesWhat shutting down the OS does to billing on Runpod, Vast.ai, Lambda, AWS, Google Cloud and Azure, the stop command for each, and a script that stops the GPU.

Check on long runs from your phone

Change one import and every tqdm bar prints a link you can open on any device. Get a Discord or Slack message when the run finishes, fails or stalls.

Get a live linkpip install tqdm-live