설문조사
PostgreSQL/PPAS 관련 듣고 싶은 교육은


총 게시물 73건, 최근 0 건
   

PostgreSQL 서버 초간단 alive check

글쓴이 : PostgresDBA 날짜 : 2013-06-28 (금) 22:55 조회 : 5946
[postgres@pg-00:/var/lib/pgsql]$ pg_ctl status
pg_ctl: server is running (PID: 2102)
/usr/pgsql-9.2/bin/postgres "-p" "5432" "-D" "/var/lib/pgsql/9.2/data"
[postgres@pg-00:/var/lib/pgsql]$ 

위의 명령어로 사용 포트와 데이터 디렉토리를 바로 알수 있네요.

참고로 PID : 2102 를 찾아볼까요?
[postgres@pg-00:/var/lib/pgsql]$ ps -ef|grep 2102
postgres  2102     1  0 19:13 ?        00:00:00 /usr/pgsql-9.2/bin/postmaster -p 5432 -D /var/lib/pgsql/9.2/data
postgres  2110  2102  0 19:13 ?        00:00:00 postgres: logger process                                        
postgres  2112  2102  0 19:13 ?        00:00:00 postgres: checkpointer process                                  
postgres  2113  2102  0 19:13 ?        00:00:00 postgres: writer process                                        
postgres  2114  2102  0 19:13 ?        00:00:00 postgres: wal writer process                                    
postgres  2115  2102  0 19:13 ?        00:00:00 postgres: autovacuum launcher process                           
postgres  2116  2102  0 19:13 ?        00:00:00 postgres: archiver process   last was 000000010000000000000020  
postgres  2117  2102  0 19:13 ?        00:00:00 postgres: stats collector process                               
postgres  5488  5398  0 22:54 pts/0    00:00:00 grep 2102
[postgres@pg-00:/var/lib/pgsql]$ 


   

postgresdba.com