pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedOpen system files total
2+ messages / 1 participants
[nested] [flat]
* Open system files total
@ 2003-11-14 01:01 Rudi Starcevic <rudi@oasis.net.au>
0 siblings, 1 reply; 2+ messages in thread
From: Rudi Starcevic @ 2003-11-14 01:01 UTC (permalink / raw)
To: pgsql-admin
Hi,
I'd like to know how many total system files Postgresql has open at any
one time.
Is this the easiest way ??
a) Find out how many Postgres process's - `ps aux | grep postgres`
b) For each Postgres process find out which files it has open - `ls
/proc/*postgres_process_id*/fd | wc -l`
c) Add up each Postgres process file open total to work out grand total
of open files for user Postgres.
I know I can get the total for the whole machine using
/proc/user_beancounters but I'd like to know
just for Postgres.
Many thanks
Best regards
Rudi.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Open system files total
@ 2003-11-14 01:35 Rudi Starcevic <rudi@oasis.net.au>
parent: Rudi Starcevic <rudi@oasis.net.au>
0 siblings, 0 replies; 2+ messages in thread
From: Rudi Starcevic @ 2003-11-14 01:35 UTC (permalink / raw)
To: pgsql-admin
Hi,
I think I found an easier way:
lsof -c postmaster | wc -l
lsof -u postgres | wc -l
Another option is to 'ps wwaux', then grep for postgres PIDS, then use
the 'lsof -p' option and give it a comma-separated list of postgres PIDs.
Cheers
Rudi.
Rudi Starcevic wrote:
> Hi,
>
> I'd like to know how many total system files Postgresql has open at
> any one time.
>
> Is this the easiest way ??
>
> a) Find out how many Postgres process's - `ps aux | grep postgres`
> b) For each Postgres process find out which files it has open - `ls
> /proc/*postgres_process_id*/fd | wc -l`
> c) Add up each Postgres process file open total to work out grand
> total of open files for user Postgres.
>
> I know I can get the total for the whole machine using
> /proc/user_beancounters but I'd like to know
> just for Postgres.
>
> Many thanks
> Best regards
> Rudi.
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2003-11-14 01:35 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-11-14 01:01 Open system files total Rudi Starcevic <rudi@oasis.net.au>
2003-11-14 01:35 ` Rudi Starcevic <rudi@oasis.net.au>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox