MCPcopy
hub / github.com/celery/celery / stats

Method stats

celery/app/control.py:179–243  ·  view source on GitHub ↗

Return statistics of worker. Returns: Dict: Dictionary ``{HOSTNAME: STAT_INFO}``. Here is the list of ``STAT_INFO`` fields: * ``broker`` - Section for broker information. * ``connect_timeout`` - Timeout in seconds (int/float) for establishing a new

(self)

Source from the content-addressed store, hash-verified

177 return self._request('reserved')
178
179 def stats(self):
180 """Return statistics of worker.
181
182 Returns:
183 Dict: Dictionary ``{HOSTNAME: STAT_INFO}``.
184
185 Here is the list of ``STAT_INFO`` fields:
186
187 * ``broker`` - Section for broker information.
188 * ``connect_timeout`` - Timeout in seconds (int/float) for establishing a new connection.
189 * ``heartbeat`` - Current heartbeat value (set by client).
190 * ``hostname`` - Node name of the remote broker.
191 * ``insist`` - No longer used.
192 * ``login_method`` - Login method used to connect to the broker.
193 * ``port`` - Port of the remote broker.
194 * ``ssl`` - SSL enabled/disabled.
195 * ``transport`` - Name of transport used (e.g., amqp or redis)
196 * ``transport_options`` - Options passed to transport.
197 * ``uri_prefix`` - Some transports expects the host name to be a URL.
198 E.g. ``redis+socket:///tmp/redis.sock``.
199 In this example the URI-prefix will be redis.
200 * ``userid`` - User id used to connect to the broker with.
201 * ``virtual_host`` - Virtual host used.
202 * ``clock`` - Value of the workers logical clock. This is a positive integer
203 and should be increasing every time you receive statistics.
204 * ``uptime`` - Numbers of seconds since the worker controller was started
205 * ``pid`` - Process id of the worker instance (Main process).
206 * ``pool`` - Pool-specific section.
207 * ``max-concurrency`` - Max number of processes/threads/green threads.
208 * ``max-tasks-per-child`` - Max number of tasks a thread may execute before being recycled.
209 * ``processes`` - List of PIDs (or thread-id’s).
210 * ``put-guarded-by-semaphore`` - Internal
211 * ``timeouts`` - Default values for time limits.
212 * ``writes`` - Specific to the prefork pool, this shows the distribution
213 of writes to each process in the pool when using async I/O.
214 * ``prefetch_count`` - Current prefetch count value for the task consumer.
215 * ``rusage`` - System usage statistics. The fields available may be different on your platform.
216 From :manpage:`getrusage(2)`:
217
218 * ``stime`` - Time spent in operating system code on behalf of this process.
219 * ``utime`` - Time spent executing user instructions.
220 * ``maxrss`` - The maximum resident size used by this process (in kilobytes).
221 * ``idrss`` - Amount of non-shared memory used for data (in kilobytes times
222 ticks of execution)
223 * ``isrss`` - Amount of non-shared memory used for stack space
224 (in kilobytes times ticks of execution)
225 * ``ixrss`` - Amount of memory shared with other processes
226 (in kilobytes times ticks of execution).
227 * ``inblock`` - Number of times the file system had to read from the disk
228 on behalf of this process.
229 * ``oublock`` - Number of times the file system has to write to disk
230 on behalf of this process.
231 * ``majflt`` - Number of page faults that were serviced by doing I/O.
232 * ``minflt`` - Number of page faults that were serviced without doing I/O.
233 * ``msgrcv`` - Number of IPC messages received.
234 * ``msgsnd`` - Number of IPC messages sent.
235 * ``nvcsw`` - Number of times this process voluntarily invoked a context switch.
236 * ``nivcsw`` - Number of times an involuntary context switch took place.

Callers 1

workersFunction · 0.45

Calls 1

_requestMethod · 0.95

Tested by

no test coverage detected