1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5
>Standard Unix Tools</TITLE
8
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
10
HREF="mailto:pgsql-docs@postgresql.org"><LINK
12
TITLE="PostgreSQL 9.1beta1 Documentation"
13
HREF="index.html"><LINK
15
TITLE="Monitoring Database Activity"
16
HREF="monitoring.html"><LINK
18
TITLE="Monitoring Database Activity"
19
HREF="monitoring.html"><LINK
21
TITLE="The Statistics Collector"
22
HREF="monitoring-stats.html"><LINK
25
HREF="stylesheet.css"><META
26
HTTP-EQUIV="Content-Type"
27
CONTENT="text/html; charset=ISO-8859-1"><META
29
CONTENT="2011-04-27T21:20:33"></HEAD
35
SUMMARY="Header navigation table"
47
>PostgreSQL 9.1beta1 Documentation</A
56
TITLE="Monitoring Database Activity"
57
HREF="monitoring.html"
66
TITLE="Monitoring Database Activity"
67
HREF="monitoring.html"
74
>Chapter 27. Monitoring Database Activity</TD
80
TITLE="Monitoring Database Activity"
81
HREF="monitoring.html"
89
TITLE="The Statistics Collector"
90
HREF="monitoring-stats.html"
105
>27.1. Standard Unix Tools</A
108
> On most Unix platforms, <SPAN
112
command title as reported by <TT
115
>, so that individual server
116
processes can readily be identified. A sample display is
120
>$ ps auxww | grep ^postgres
121
postgres 960 0.0 1.1 6104 1480 pts/1 SN 13:17 0:00 postgres -i
122
postgres 963 0.0 1.1 7084 1472 pts/1 SN 13:17 0:00 postgres: writer process
123
postgres 965 0.0 1.1 6152 1512 pts/1 SN 13:17 0:00 postgres: stats collector process
124
postgres 998 0.0 2.3 6532 2992 pts/1 SN 13:18 0:00 postgres: tgl runbug 127.0.0.1 idle
125
postgres 1003 0.0 2.4 6532 3128 pts/1 SN 13:19 0:00 postgres: tgl regression [local] SELECT waiting
126
postgres 1016 0.1 2.4 6532 3080 pts/1 SN 13:19 0:00 postgres: tgl regression [local] idle in transaction</PRE
129
(The appropriate invocation of <TT
132
> varies across different
133
platforms, as do the details of what is shown. This example is from a
134
recent Linux system.) The first process listed here is the
135
master server process. The command arguments
136
shown for it are the same ones used when it was launched. The next two
137
processes are background worker processes automatically launched by the
138
master process. (The <SPAN
140
>"stats collector"</SPAN
141
> process will not be present
143
the system not to start the statistics collector.) Each of the remaining
144
processes is a server process handling one client connection. Each such
145
process sets its command line display in the form
172
The user, database, and (client) host items remain the same for
173
the life of the client connection, but the activity indicator changes.
174
The activity can be <TT
177
> (i.e., waiting for a client command),
180
>idle in transaction</TT
181
> (waiting for client inside a <TT
185
or a command type name such as <TT
192
> is appended if the server process is presently waiting
193
on a lock held by another session. In the above example we can infer
194
that process 1003 is waiting for process 1016 to complete its transaction and
195
thereby release some lock.
198
> If you have turned off <A
199
HREF="runtime-config-statistics.html#GUC-UPDATE-PROCESS-TITLE"
200
>update_process_title</A
202
activity indicator is not updated; the process title is set only once
203
when a new process is launched. On some platforms this saves a measurable
204
amount of per-command overhead; on others it's insignificant.
216
> requires special handling. You must
224
>. You also must use two <TT
228
flags, not just one. In addition, your original invocation of the
232
> command must have a shorter
236
> status display than that provided by each
237
server process. If you fail to do all three things, the <TT
241
output for each server process will be the original <TT
255
SUMMARY="Footer navigation table"
266
HREF="monitoring.html"
284
HREF="monitoring-stats.html"
294
>Monitoring Database Activity</TD
300
HREF="monitoring.html"
308
>The Statistics Collector</TD
b'\\ No newline at end of file'