[Linux performance Detection Tools] Pidstat

Source: Internet
Author: User
Tags switches

Pidstat

NAME

Pidstat statistics on Linux tasks

Grammar

Pidstat [-C comm] [-d] [-h] [-i] [-l] [-p {pid [,...] | Self | All}] [-r] [-T] [-t {TASK | Child | All}] [-u] [-v] [-W] [interval [count]]

Describe

The Pidstat command is used to monitor the standalone tasks currently managed by the Linux kernel. Each task that outputs the-p parameter, or-p all outputs all Linux kernel-managed tasks. If you do not write the parameter defaults to-P all, only the active task appears in the report.

The Pidstat command can be used to monitor sub-processes that select tasks. See the-t option specifically.

The interval parameter specifies the time interval for each report. If 0 is the report statistics from the system startup. The cout parameter represents the number of reports generated. If the interval does not specify a count parameter, it is always generated.

You can specify an option by specifying the active, if not specified, only the real CPU activity.

Options

-C Comm

Only tasks that contain comm strings are displayed.

-D

The report IO statistics shows the following information:

PID: Process ID

kb_rd/s: KB read per second from disk

kb_wr/s: Write disk KB per second

kb_ccwr/s: The KB of the write disk to which the task was canceled. Occurs when a task truncates a dirty pagecache.

Command: Task Name

-H

All activities are displayed on a single line so that other programs can be easily parsed.

-I.

In an SMP environment, indicates the CPU usage/number of cores for a task

-L

Show command name and all parameters

-p{pid [,...] | Self | All}

Select a task (process) to report statistics. The PID is the process identifier. The Self keyword indicates that pidstat reports its own process if all the tasks in the system are reported for all.

-R

Reporting errors also and memory utilization, when reporting a task, is shown as follows:

PID : Process Identifier

minflt/s: Minor error occurred per second for task, no need to load page from disk

majflt/s: The primary error that occurs per second for a task that requires the page to be loaded from disk

VSZ: Virtual address size, use of virtual memory kb

RSS: Resident collection size, non-swap zone five memory usage kb

Command: Task Name

When global statistics are displayed for all tasks and all threads, the following values are displayed:

PID: Process identifier

minflt-nr: Minor error for all tasks and sub-threads within interval time.

MAJFLT-NR: The primary error for all tasks and sub-threads within interval time.

Command: Commands name

-T

Displays additional information outside the statistics for the thread that selected the task:

Tgid: The representation of the main thread

TID: Thread ID

-T {TASK | Child | All}

This option specifies the Pidstat monitor. The task representation reports the independent Task,child keyword representing all thread statistics under the reporting process. All indicates that all threads under separate task and task are reported.

Note: The global statistics for task and child threads are independent of the PIDSTAT option. These statistics do not correspond to the current statistical interval, and these statistics are collected only when the child thread is killed or completed.

-U

Reporting CPU Utilization

The report independent process is displayed:

PID: Process ID

%usr: User-level CPU usage

%system: System-Level CPU usage

%guest: CPU utilization of virtual processors

%cpu: Total CPU usage

CPU: The number of CPUs used by the process.

Command: Commands name

When reporting tasks and all thread global statistics:

PID: Process ID

Usr-ms: The number of milliseconds that tasks and child threads use at the user level.

System-ms: The number of milliseconds that tasks and child threads use at the system level.

Guest-ms: The number of milliseconds that the task and child threads use in the virtual machine (running a Vsan processor).

Command: Commands name

-V

The output version number.

-W

Report Context Switch activity:

PID: Process ID

cswch/s: Number of active task context switches per second

nvcswch/s: Number of passive task context switches per second

Command: Commands name

[Linux performance Detection Tools] Pidstat

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.