PostgreSQL 8.2.3 婺桺桺懼
劯锔媆锔䆹25. 䕏毓昄扞康䔇昂媘媆誕嬉誕

25.1. 湺庖 Unix 噖噙

PostgreSQL 婘崓崔昄广埄婪媞櫹 ps 膷庺䔇变傴湺鵻認湙潏傸儌冽垹滷欆庺昊婻橉媇単誕䘋㔗婔婻䞔剘䔇滆䴺套婋

$ ps auxww | grep ^postgres
postgres   960  0.0  1.1  6104 1480 pts/1    SN   13:17   0:00 postgres -i
postgres   963  0.0  1.1  7084 1472 pts/1    SN   13:17   0:00 postgres: writer process
postgres   965  0.0  1.1  6152 1512 pts/1    SN   13:17   0:00 postgres: stats collector process   
postgres   998  0.0  2.3  6532 2992 pts/1    SN   13:18   0:00 postgres: tgl runbug 127.0.0.1 idle
postgres  1003  0.0  2.4  6532 3128 pts/1    SN   13:19   0:00 postgres: tgl regression [local] SELECT waiting
postgres  1016  0.1  2.4  6532 3080 pts/1    SN   13:19   0:00 postgres: tgl regression [local] idle in transaction

脄䫘 ps 䔇桹濘啹广埄䔇婉劯蔯䘖橬婉劯滆䴺庺準䔇䂖誗幘橬婔底寺彆㔗認婻冋床準躻婔婻橔誏䔇 Linux 係䂘㔗認麯滆䴺庺準䔇丸婔婻誕䘋滇婂橉媇単誕䘋㔗滆䴺䔇变傴埗昄启劇媘垄䔇变傴臯埗昄䕩劯㔗婋麵滇䫌婂橉媇単誕䘋躻媘脄䫘䔇婴婻䂘螇櫽镖単劯埄誕䘋套悩嘹螆䘞庖係䂘婉劇媘䂘螇櫽镖単闼幽垄傸婉嚔庺䯄㔗嬷婋䔇鄘滇婔婻婻崇䊖垵潙誂毖䔇橉媇単誕䘋懟婻認湙䔇誕䘋鄘䫘婋麵䔇嘵嚟滆䴺

postgres: user database host activity

婘臖垵潙䆇誂毖䔇䫘变橘婺user, database, host(誂毖溊婂橺)鄘媺毕婉埻嘖滇昂虄攓毺䴺严嚔埻寡㔗昂虄攓埇傖滇 idle(京写垵潙䆇䔇变傴)㔕idle in transaction(婘婔婻 BEGIN 庖麯京写䫘潙)㔕潡蔙婔婻变傴䌂傋劉懫套 SELECT 㔗劯湙套悩嘷嬉溼婘京写婔婻噽垄橉媇単誕䘋毕橬䔇髕䔇施唍嚔婘媇敇劯麵鍇媹 waiting 㔗婘婪麵䔇冋床婺潏傸埇傖毘庺誕䘋 1003 溼婘京写 1016 垯潊噽庋媇認湙欉脘麪櫆婔底髕潡蔙噽垄傔幽婩薪

套悩噿閺庖 update_process_title 闼幽昂虄攓毺䴺严儖婉嚔埻寡幽婫誕䘋湺鵻備婘桄誕䘋赆劇媘䔇施唍螆䘞婔渇㔗婘昊底广埄婪認湙啔埇傖誗䩕懟婻变傴䔇嚔體嘖婘噽垄广埄婪剘澇橬認䓉噞嚗㔗

㔊柊䴺㔏Solaris 驔襕䬹彆䔇崇䊖㔗嘹媙驔嘪䫘 /usr/ucb/ps 蔯婉滇 /bin/ps 㔗嘹誻媙驔嘪䫘婴婻 w 湺媖蔯婉滇婔婻㔗埥崡嘹橔彺脄䫘 postgres 施䫘彄䔇变傴臯婘 ps 䪽攕滆䴺婺媙釂懫 ps 䂍懟婻橉媇単誕䘋滆䴺䔇䘺㔗套悩澇悇轿認婬婻溇傽闼幽 ps 婺懟婻橉媇単誕䘋膷庺䔇儖滇橔彺䔇 postgres 䔇变傴臯㔗


劯锔饡釕嬉誕
䕏毓昄扞康䔇昂媘婪婔亓䂘螇櫽镖単