The stub status module in nginx provides a simple way to get live server metrics. First, you add a location block with 'stub_status;' in the nginx configuration file. You usually restrict access to localhost using 'allow 127.0.0.1;' and 'deny all;'. After saving the config, you reload nginx to apply the changes without downtime. Then, when you send an HTTP GET request to the /nginx_status URL on localhost, nginx returns a plain text status page showing active connections, accepted connections, handled connections, total requests, and current reading, writing, and waiting connections. This output can be parsed by monitoring tools to track nginx performance.