Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Upgrading

This guide covers upgrading socktop and socktop_agent to newer versions.

Upgrade Order

Mixed versions keep working during rollouts (wire changes are additive), but two things set the order:

  • Upgrade clients first where you use TLS. Versions before 1.60 did not actually enforce certificate pinning — any server certificate was accepted. The fix is client-side.
  • Upgrade agent and client together on machines where you use the process kill feature — older agents keep reporting dead processes, so killed rows would linger on screen.

Upgrading via APT

Standard Upgrade

The easiest method - upgrade through normal system updates:

# Update package lists
sudo apt update

# Upgrade socktop packages
sudo apt upgrade socktop socktop-agent

# Or upgrade entire system
sudo apt upgrade

The service will automatically restart after the upgrade.

Verify Upgrade

# Check new versions
socktop --version
socktop_agent --version

# Check service status
sudo systemctl status socktop-agent

Tip: if socktop --version still shows the old version after upgrading, an older copy in ~/.cargo/bin may be shadowing the new one on your PATH. Check with type -a socktop and remove the stale copy (then hash -r in bash). Also note a long-running agent keeps serving its old behavior until restarted — restart the service after any upgrade.

Upgrading via Cargo

Update from crates.io

# Update client
cargo install socktop --force

# Update agent
# on the server running the agent
cargo install socktop_agent --force
sudo systemctl stop socktop-agent
sudo install -o root -g root -m 0755 "$HOME/.cargo/bin/socktop_agent" /usr/local/bin/socktop_agent
# if you changed the unit file:
# sudo install -o root -g root -m 0644 docs/socktop-agent.service /etc/systemd/system/socktop-agent.service
# sudo systemctl daemon-reload
sudo systemctl start socktop-agent
sudo systemctl status socktop-agent --no-pager
# logs:
# journalctl -u socktop-agent -f