Re: [MLIST] Re: location of the configuration files - Mailing list pgsql-hackers

From David Walker
Subject Re: [MLIST] Re: location of the configuration files
Date
Msg-id 200302140632.37259@grx
Whole thread Raw
In response to Re: location of the configuration files  (Kevin Brown <kevin@sysexperts.com>)
List 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.



pgsql-hackers by date:

Previous
From: Daniel Kalchev
Date:
Subject: Re: Offering tuned config files
Next
From: Bruce Momjian
Date:
Subject: Re: location of the configuration files