# Every dev server and port, with a Stop button.

The Developer tab lists every dev server and database on your Mac with its port, the project it belongs to, how long it has been running and the memory it holds.

Source: https://activityplusmac.com/features/dev-servers-and-ports

## What is holding the port.

Address already in use has one cause: something else is listening. The tab lists every listening port with the command behind it, so you do not need lsof to find out.

- Every listening port
- The command holding it
- Memory it is using
- A Stop button on each

## Which project it belongs to.

Five processes all called node tell you nothing. Each server is shown with the folder it was started in, so you know which one is the project you forgot about.

- The project folder for each server
- How long it has been running
- Servers left running for hours pointed out
- Totals for servers, ports and memory

## Ports that are not yours.

Apps and macOS open ports too. They are listed separately, without a Stop button, which explains why port 5000 or 7000 is taken: on recent macOS, AirPlay Receiver uses both.

- Ports opened by apps
- Ports opened by macOS
- Kept apart from your servers
- Explains the port 5000 clash

## Containers and services, in the same list.

Running Docker containers are listed with their image, uptime, published ports, CPU and memory, each with a Stop button, along with the memory Docker's own Linux machine is holding. Homebrew services running in the background are listed too, with a count of packages that have updates.

- Docker containers with CPU and memory
- Stop a container without the terminal
- Homebrew services running at login
- Packages with updates waiting

## Why it matters

A developer's Mac collects dev servers. Each one is easy to start and easy to forget, and they hold memory for days. In Activity Monitor they are a row of identical node processes with no hint of which project each belongs to.

Finding what holds a port means remembering the lsof flags, reading the process ID out of the result and killing it by hand.

The Developer tab turns that into a list you can read, with the project name beside each server and a button that stops it.

## Where it is in Activity+

1. **Open the Developer tab.** It is the twelfth tab in the bar.
2. **Read the top line.** It points out a server that has been running for hours, or counts what is running.
3. **Find the port.** Dev servers and databases are listed first, with port, project and memory.
4. **Stop it.** Click Stop to ask the process to end cleanly.

## Dev servers and ports: Activity Monitor and Activity+

| | Activity Monitor | Activity+ |
|---|---|---|
| Which process holds a port | No, use lsof in Terminal | Listed |
| Which project a server belongs to | No | Yes |
| How long a server has been running | No | Yes |
| Stop a server | Find the process, then quit it | One button |
| Separates your servers from system ports | No | Yes |

## What the terms mean

- **Port:** A numbered door on your Mac that a program listens on for connections, such as 3000 or 5432.
- **Listening:** Waiting for connections on a port. Only one program can listen on a port at a time.
- **Dev server:** A local web server that a development tool runs while you work on a project.
- **lsof:** The Terminal command that lists open files and network ports.

## Questions

### How do I see what is using port 3000 on my Mac?

Open the Developer tab. Each listening port is shown with the command using it and the project it was started in.

### What does Stop do?

It asks the process to end cleanly, the same as the kill command in Terminal. It does not force it.

### Why is port 5000 already in use?

On macOS Monterey and later, AirPlay Receiver listens on ports 5000 and 7000. It appears under other apps as ControlCenter.

### Does it show Docker containers?

Yes. When Docker is running, each container is listed with its image, ports, CPU and memory, and a Stop button.

### How does it decide what is a dev server?

A listening process counts as a dev server or database when it was started from a project folder and is not part of an installed app or macOS.

### Does it list Homebrew packages or services?

Yes. It lists Homebrew services with whether each is running, and the packages that have an update waiting.

### Does reading ports need admin rights?

No. It lists the ports your own processes have open, which needs no extra permission.
