Skip to content

Tools and Tips

This chapter lists various useful commands and tips to analyse or debug deployment issues.

Netstat - Network


Debug tool to check port open in a device

listing all TCP opening ports :

sudo netstat -tnlp
# or, depending on your setup :
sudo ss -tnlp

Pacemaker/corosync - System for managing clustered resources (like Virtual IPs)


This tool shows : all corosync cluster nodes, and their status (online/offline) all managed pacemaker resources (Virtual IPS), and the node they run on


This is the tool used to configure/manage resources in pacemaker cluster. It can be run on any node of the cluster, and will configure the whole cluster.

listing configuration

crm configure show

listing managed resources and their status

crm resource show

migrate a resource to another node

crm resource migrate adm2t

note that this migration will respect colocalisation constraints configured in crm (i.e. associated services will follow their VIP if the VIP is migrated)


crm help

ps - System


Debug tool to check running process

ps -faux

Supervisor - System


This is a service managed by init daemon. Supervisord configuration is read from /etc/supervisord.conf and all files in /etc/supervisor/conf.d directory (one by supervised process)


This is the control tool to monitor/start/stop processes managed by Supervisord

listing processes and their state

sudo supervisorctl status

restarting a given service

sudo supervisorctl restart <serviceName>

stopping all monitored processes
while leaving supervisord alive (useful to stop service, while preventing pacemaker from switching services to the other node in an active/passive cluster)

sudo supervisorctl stop all

Systemd - System


This is a service. For Ubuntu 15 init daemon is depreciated in favor of system daemon.


This is the control tool to monitor/start/storm processes managed by Systemd

listing processes and their state

    sudo systemctl status

restart a given service :

sudo systemctl <serviceName>.service status

stopping a given service :

    sudo systemctl <serviceName>.service stop

Telnet - Network


Debug tool to established a TCP connection

telnet <host> <port>