Htop the use of the top PS dstat command

Source: Internet
Author: User


Htop the use of the top PS dstat command

Top command
Top provides a real-time, dynamic view of the current running system, which is the running process. By default, displays the task with the highest CPU utilization in the system and refreshes every 5 seconds.


Common hotkeys

Hotkey Usage
T displays the summary information switch.
m Displays the memory information switch.
A classification shows the use of different resources of the system. Helps to quickly identify tasks that are resource-intensive in your system.
F Add Delete the field you want to display.
o Adjust the order in which you want to display the fields.
R adjusts the nice value of a running process.
K to end a running process.
Z Color/Black and white display switch



PS-Displays the process, and the PS command displays a snapshot of the current running process. Displays all processes using-a or-E.

# ps-a

Sample output:

PID TTY Time CMD
1? 00:00:02 Init

2? 00:00:02 migration/0

3? 00:00:01 ksoftirqd/0

6} 00:00:00 watchdog/0

5? 00:00:00 MIGRATION/1

4} 00:00:15 KSOFTIRQD/1

......
......



PS is very similar to top, but PS provides more information.

Output Long format
# Ps-al


Output append full format (shows parameters passed in when the process executes)
# Ps-alf


Show process Structure
# PS-ALFH


Show threads after a process
# PS-ALLM


Print all processes on the server
# PS AX
# PS Axu


Print Process Tree
# PS-EJH
# PS AXJF
# Pstree


Print security information
# Ps-eo Euser,ruser,suser,fuser,f,comm,label
# PS AXZ
# Ps-em


View processes running with the Vivek user name
# ps-u Vivek OR-u Vivek or PS U


Setting Custom output formats
# Ps-eo Pid,tid,class,rtprio,ni,pri,psr,pcpu,stat,wchan:14,comm
# PS Axo Stat,euid,ruid,tty,tpgid,sess,pgrp,ppid,pid,pcpu,comm
# Ps-eopid,tt,user,fname,tmout,f,wchan


Show only the LIGHTTPD process ID
# ps-c Lighttpd-o pid=
Or
# pgrep Lighttp


Show process name with PID 55977
# ps-p 55977-o comm=


Identify the top 10 processes that consume the most memory
# PS-AUXF | Sort-nr-k 4 | Head-10


Find the top 10 processes with the most CPU
# PS-AUXF | Sort-nr-k 3 | Head-10






1.htop command


Interactive commands:

U: Filter only shows users ' processes

S: Tracks system calls initiated by the selected process

L: Displays the files opened by the selected process

A: Sets the affinity of the CPU of the process (binds the selected process to the specified CPU)

T: Show process Tree of processes



Options:

-D #: Latency often

-U USERNAME: Displays only the processes of the specified user

-S COLUMN: Sort according to the specified field



The parameters of the monitoring interface represent meaning

Upper left corner:

Indicates the CPU usage,

MEM represents memory usage,

Swap table Swap partition usage


In the upper right corner:

Tasks: Total number of processes, current number of running processes;

Load average: Represents the average load of the system for 1 minutes, 5 minutes, 15 minutes,

Uptime: Time of system operation


PID means: The identification number of the process;

User represents the users of the running process;

PRI: The priority of the process;

NI: The nice value of the process, the priority value of the process, default to 0;

VIRT: Process consumes virtual memory value;

RES: The physical memory value that the process occupies;

SHR: The shared memory value that the process occupies;

S: The running state of the process, R: Indicates that it is running. S: Indicates sleep state, waiting to wake up. Z: Indicates a zombie state;

CPU%: Percentage of CPU consumed by the process;

mem%: Percentage of memory consumed by the process;

Time+: The time that the process starts to occupy the CPU;

Command: The name of the process command that started the process.





Usage: dstat [-AFV] [Options ...] [Delay [Count]]

Options:

-C: Display statistics related to CPU performance metrics

-D: Show disk-related rate data

-G: Show page-related rate data

-I: Show Interrupt (interrupt)-related rate data

-L: Displays statistics related to load average (i.e. load)

-M: Show memory-related statistics

-N: Shows the rate of data sent and received by the network

-N eth#: Displays the specified interface

-P: Displays the relevant statistics for the process (the rate of the new process, etc.)

Rate of-r:io requests

-S: Show data about swap

-Y: Displays system-related data, including terminal and process switching

--TOP-CPU: Show CPU-intensive processes

--top-bio: Shows the process that consumes block IO most

--top-mem: Show the most memory-intensive processes

--top-io: The most CPU-owning process

--IPC: Display rate data for interprocess communication

--raw: Displaying data related to raw sockets

--TCP: Displaying data related to TCP sockets

--UDP: Displaying data related to UDP sockets

--unix: Display Inux sock interface related statistics

--socket: Displays all statistics related statistics above (total, TCP, UDP, Raw)

-A:-cdngy

This article from "My Heart _ Sunny" blog, please be sure to keep this source http://wyg11.blog.51cto.com/11253863/1783119

Htop the use of the top PS dstat command

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.