From: | Rudi Starcevic <rudi(at)oasis(dot)net(dot)au> |
---|---|
To: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Open system files total |
Date: | 2003-11-14 01:35:29 |
Message-ID: | 3FB43161.7010505@oasis.net.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)postgresql(dot)org)
>
From | Date | Subject | |
---|---|---|---|
Next Message | Cristian Veronesi | 2003-11-14 09:34:53 | Which hardware/filesystem for postgresql? |
Previous Message | noelvillarama | 2003-11-14 01:32:42 | how can i connect to postgres 7.3 using pgadmin3 |