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 䔇变傴臯㔗