I'm not sure what you're asking, but most of the "devices" in
/dev are just placeholders for use when needed. If you're asking "Which
tty entries are currently in use," something like this would tell you.
Code:
$ ps -ea | grep tty
2599 tty4 00:00:00 mingetty
2600 tty5 00:00:00 mingetty
2601 tty2 00:00:00 mingetty
2602 tty3 00:00:00 mingetty
2603 tty6 00:00:00 mingetty
2637 tty7 00:02:58 X
The actual device to which a
tty is connected is determined when it's opened by the kernel, and the "number" used is seldom related to any physical device. As you can see in the listing above, on this laptop
tty7 is connected to the X-server and
tty[2-6] are connected to terminal consoles.