sp_listener...”status” reports on the state of the listeners. The state is one of active, stopped, or suspended. You can query about a specific listener by indicating the machine, port, or engine number, or you can query about the status of all listeners by not including any parameters.
The following queries the status of all listeners:
sp_listener “status”
The following queries the status of those listeners on engine three of Adaptive Server ASE1251 which are registered in the interfaces file:
sp_listener “status”, ASE1251, “3”
The following queries the status of the tli listener on port 4556 of the current Adaptive Server running on machine spartacus:
sp_listener “status” “tli:spartacus:4556”