# list-pibs macro

The list-pibs macro produces a report
of each active port in the dm,pibs, file, showing
the port number, the current user of that port and the current terminal/printer
characteristics as defined by the term-type command.

**Synonyms:** lp

## Syntax

```
list-pibs {(options}
```

## Parameter(s)

| options | n | Affects output to the terminal only, preventing output from pausing at the end of each (terminal) page of output. |
| --- | --- | --- |
| p | Directs output to the system printer, via the spooler. | |
The report includes these headings:

| pib# | PIB or user’s port number. The asterisk indicates the current port. |
| --- | --- |
| user | User-ID (found in the dm,users, file) that this user is currently logged on to. |
| location | Value stored in the dm,users, item in the location attribute. This attribute typically contains the user’s name. |
| device | Settings used in the most recently executed term-type command for the terminal device this port is attached to. |

## Example(s)

The port numbers that do not
have a user-ID or name are not currently in use.

```
list-pibs

Page 1 dm,pibs, 09:44:44 21 Feb 2005
pib# user.... location.... device................
0 79,25,0,7,1,8,80,59,IBM3151
1 79,24,0,7,1,8,80,59,WY-50
2 lisa Lisa Jones 79,24,0,7,1,8,80,59,WY-50
3 79,24,0,7,1,8,80,59,WY-50
4 79,24,0,7,1,8,80,59,WY-50
5 79,24,0,7,1,8,80,59,WY-50
6 79,24,0,7,1,8,80,59,WY-50
7 79,24,0,7,1,8,80,59,WY-50
8 am Andy Meyers 79,24,0,7,1,8,80,59,WY-50
9 ss Sam Smith 79,24,0,7,1,8,80,59,WY-50
10 cm Christine Mills 79,24,0,7,1,8,80,59,WY-50
11 79,24,0,7,1,8,80,59,WY-50
12 79,24,0,7,1,8,80,59,WY-50
13 79,24,0,7,1,8,80,59,WY-50
14 79,24,0,7,1,8,80,59,WY-50
15 79,24,0,7,1,8,80,59,WY-50
16 dp Dick Parr 79,24,0,7,1,8,80,59,WY-50
17 79,24,0,7,1,8,80,59,WY-50
18 ff Fred Foote 79,24,0,7,1,8,80,59,WY-50
```

## See also

- [list-users command](https://d3codex.com/tcl/list-users-command/)
- [Options (Access Query Language)](https://d3codex.com/access/options-access-query-language/)
- [PIB](https://d3codex.com/definitions/pib/)
- [pibs file](https://d3codex.com/systemfiles/pibs-file/)
- [Port number](https://d3codex.com/definitions/port-number/)
- [term command](https://d3codex.com/tcl/term-command/)
- [term-type command](https://d3codex.com/tcl/term-type-command/)
- [termp command](https://d3codex.com/tcl/termp-command/)

---
Source: https://d3codex.com/tcl/list-pibs-macro/ - part of the D3Codex reference.
