Re: [MLIST] Re: location of the configuration files

From: David Walker <pgsql(at)grax(dot)com>
To: Kevin Brown <kevin(at)sysexperts(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [MLIST] Re: location of the configuration files
Date: 2003-02-14 12:32:37
Message-ID: 200302140632.37259@grx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

In reference to determining what port postgres or any program is listening on
On my Redhat Linux machines
netstat --inet -nlp
when run as root
produces a nice list of all programs listening on the network with IP and port
number the process is listening on, the name of the process and the pid.

The environment used to start each of these postmasters can be found at
cat /proc/${POSTMASTER-PID}/environ | tr "\000" "\n"

I'm not arguing one way or the other on your issue, just hope these tips make
the "black magic" a little easier to use.

On Friday 14 February 2003 04:58 am, Kevin Brown wrote:
> Now let's repeat that scenario, except that instead of seeing one
> postmaster process, you see five. And they all say
> "/usr/bin/postmaster" in the "ps" listing. No arguments to clue you
> in or anything, as before. You might be able to figure out where one
> of them is going by looking at /etc/postgresql, but what about the
> rest? Now you're stuck unless you want to do a "find" (time consuming
> and I/O intensive -- a good way to slow the production database down a
> bit), or you're knowledgeable enough to use 'lsof' or black magic like
> digging into kernel memory to figure out where the config files and
> data directories are, or you have enough knowledge to pore through the
> startup scripts and understand what they're doing.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-02-14 12:36:38 Re: PG_TEMP_FILES_DIR
Previous Message Bruce Momjian 2003-02-14 12:32:31 Re: location of the configuration files