rtop and ruptime are lightweight, SSH-based remote monitoring tools that don’t require agents on remote systems. They use SSH to connect to remote servers and display system information in real-time.
| Feature | rtop | ruptime |
|---|---|---|
| Display | Real-time interactive | Snapshot summary |
| Protocol | SSH | SSH/RSH |
| Agent Required | No | No |
| Multi-host | Yes | Yes |
| Configuration | Minimal | Minimal |
# Install from source
git clone https://github.com/rakyll/rtop.git
cd rtop
go build
# Or install via Go
go get github.com/rakyll/rtop
# Move to system path
sudo mv rtop /usr/local/bin/
# Install from package manager
# Debian/Ubuntu
sudo apt-get install rusers
# RHEL/CentOS
sudo yum install rusers
# Or compile from source
# Download from: https://github.com/troglobit/ruptime
rtop has minimal configuration and is primarily controlled via command-line options.
# Basic usage
rtop [options] [user@]host1 [user@]host2 ...
# Options
rtop -h, --help Show help
rtop -i, --interval=SECONDS Update interval (default: 2)
rtop -b, --batch Batch mode (non-interactive)
rtop -c, --command=CMD Run command on remote hosts
rtop -u, --user=USER Default SSH user
rtop -p, --port=PORT SSH port (default: 22)
rtop -k, --key=KEYFILE SSH private key file
rtop -P, --password=PASS SSH password (not recommended)
rtop -t, --timeout=SECONDS SSH connection timeout
rtop -v, --verbose Verbose output
# ~/.ssh/config - SSH configuration for rtop
Host monitoring-targets
HostName 192.168.1.*
User monitoring
IdentityFile ~/.ssh/rtop_key
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
ConnectTimeout 10
ServerAliveInterval 30
Host webserver
HostName 192.168.1.10
User monitoring
IdentityFile ~/.ssh/rtop_key
Host dbserver
HostName 192.168.1.20
User monitoring
IdentityFile ~/.ssh/rtop_key
# Generate SSH key for rtop
ssh-keygen -t ed25519 -f ~/.ssh/rtop_key -N "" -C "rtop monitoring"
# Copy key to remote servers
ssh-copy-id -i ~/.ssh/rtop_key monitoring@192.168.1.10
ssh-copy-id -i ~/.ssh/rtop_key monitoring@192.168.1.20
# Set proper permissions
chmod 600 ~/.ssh/rtop_key
# Monitor single host
rtop user@server1.example.com
# Monitor multiple hosts
rtop user@server1.example.com user@server2.example.com
# Monitor with custom interval
rtop -i 5 user@server1.example.com
# Batch mode for scripting
rtop -b user@server1.example.com > output.txt
# Run custom command
rtop -c "uptime" user@server1.example.com
# Use specific SSH key
rtop -k ~/.ssh/rtop_key user@server1.example.com
# Use specific SSH port
rtop -p 2222 user@server1.example.com
ruptime uses standard system configuration files.
# /etc/hosts.equiv - Trusted hosts for ruptime
# Trust hosts in local domain
+@trusted-servers
# Trust specific hosts
server1.example.com
server2.example.com
# Trust with specific user
+@monitoring-servers monitoring
# /etc/hosts.lpd - Additional trusted hosts
192.168.1.10
192.168.1.20
192.168.1.30
# Basic usage
ruptime [options] [host...]
# Options
ruptime -h, --help Show help
ruptime -l Long format
ruptime -r Reverse sort
ruptime -t Sort by time
ruptime -u Sort by users
ruptime -a Show all hosts
ruptime -V Show version
# Show uptime for all hosts
ruptime
# Show uptime for specific hosts
ruptime server1 server2 server3
# Long format
ruptime -l
# Sort by number of users
ruptime -u
# Show all hosts including down
ruptime -a
# /etc/ssh/sshd_config - SSH server configuration
# Limit users
AllowUsers monitoring
# Use key-based authentication only
PasswordAuthentication no
PubkeyAuthentication yes
# Limit commands (optional)
# ForceCommand can restrict what rtop can execute
# Logging
LogLevel VERBOSE
# Connection settings
ClientAliveInterval 300
ClientAliveCountMax 2
MaxStartups 10:30:60
# Allow SSH for monitoring
sudo ufw allow from 192.168.1.0/24 to any port 22 proto tcp
# Or with iptables
sudo iptables -A INPUT -s 192.168.1.0/24 -p tcp --dport 22 -j ACCEPT
#!/bin/bash
# /usr/local/bin/rtop-monitor.sh
# rtop monitoring script
HOSTS=(
"monitoring@192.168.1.10"
"monitoring@192.168.1.20"
"monitoring@192.168.1.30"
)
OUTPUT_DIR="/var/log/rtop"
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
mkdir -p "$OUTPUT_DIR"
for host in "${HOSTS[@]}"; do
echo "Checking $host..."
rtop -b -i 1 "$host" > "$OUTPUT_DIR/${host}_${TIMESTAMP}.txt" 2>&1
done
# Clean up old files (keep 7 days)
find "$OUTPUT_DIR" -name "*.txt" -mtime +7 -delete
#!/bin/bash
# /usr/local/bin/ruptime-monitor.sh
# ruptime monitoring script
OUTPUT_FILE="/var/log/ruptime/uptime_$(date +%Y%m%d).log"
mkdir -p /var/log/ruptime
echo "=== $(date) ===" >> "$OUTPUT_FILE"
ruptime -l >> "$OUTPUT_FILE" 2>&1
echo "" >> "$OUTPUT_FILE"
# /etc/cron.d/rtop-monitor
# Run rtop monitoring every 5 minutes
*/5 * * * * root /usr/local/bin/rtop-monitor.sh
# Run ruptime summary every hour
0 * * * * root /usr/local/bin/ruptime-monitor.sh
# /etc/logrotate.d/rtop
/var/log/rtop/*.txt {
daily
rotate 7
compress
delaycompress
missingok
notifempty
}
# /etc/logrotate.d/ruptime
/var/log/ruptime/*.log {
daily
rotate 30
compress
delaycompress
missingok
notifempty
}
# Check rtop version
rtop --version
# Test SSH connection
ssh -i ~/.ssh/rtop_key monitoring@192.168.1.10 uptime
# Test rtop connection
rtop -b monitoring@192.168.1.10
# Check output
rtop -b -i 1 monitoring@192.168.1.10 | head -20
# Check ruptime version
ruptime -V
# Test ruptime
ruptime
# Test long format
ruptime -l
Squeezing every bit of performance from your rtop installation? Our experts help with:
Optimize your setup: office@linux-server-admin.com | Contact Us