# Ports

## mbirkett

How do i find out which port numbers each of my services is running on?

I am trying to use psqlODBC with Postgresql but i do not the port number to tell the ODBC driver.

Please help

----------

## rac

lsof can tell you what processes have what files open, including sockets.  /etc/services can tell you what the "official" port number for various services is.  Looking through there for postgres tells me that you might want to start with port 5432.  Does that work?

----------

## mbirkett

i dotn think so. ill just do a quick check

----------

## mbirkett

no it doesnt. thats the default port ive been trying to get it to work on.

----------

## mbirkett

i get the following error:

could not connect to server 

could not connect to remote socket #1

any thoughts?

I have also written out the connect setting of cdr -U marc but this also does not work.

----------

## rac

Locking because poster has apparently decided to continue here.

EDIT: Unlocked because poster apparently changed mind and deleted thread linked to above.

----------

