Use of the Process management tool Htop/glances/dstat

Source: Internet
Author: User
Tags message queue network function

First, Htop:


Use # Man htop to see usage and instructions.

The Htop is a free (GPL) interactive process Viewer for Linux. Similar to the top command, but more comprehensive and powerful, it allows you to flip horizontally or vertically and see the complete command line. In the Htop interface, you can also directly execute killing (terminate process), renicing (reset friendly values) without the need to type the PID (process number) of the process.


Command format:

# htop [-DCHUSV]

D:--delay=delay, specifying the interval of time, in seconds, for each update of data

C:--no-color, monochrome display results;

H:--help, display brief help information;

U USERNAME: Displays only the process of the selected user USERNAME;

s COLUMN: Sorts according to the specified field;

V: Displays the version number and exits.

Example: # htop-d 3-u root-s CPU means to enter the Htop interface, showing only the root user's data and updating the data every 3 seconds, sorted by the percentage size of CPU usage.


After entering the Htop results interface, the following operational options are available:

Quick Flip Process list: directional arrows, pgup,pgdn,home,end;

S: When the Strace command package is installed, this button allows you to track the system call situation initiated by the process;

L: Displays the files opened by the selected process (with the LSOF command package installed);

T or F5: shows the hierarchical structure of the process;

A: Set the CPU affinity of the process (that is, only allow the process to run on the established CPU, only valid for multicore CPUs);

+ OR-: In the tree structure (with T or F5), the lower branch process of the selected process is closed or expanded;

U: Select a specific user's process to display;

M: Sort by memory usage percentage

T: Sort by cumulative use of CPU time;

P: Sort by percentage of CPU used

K: Hide Kernel threads

H: Hide User threads

Ctrl-l: Refresh Data and interface

#: Enter the process number directly and you can highlight the process.

F9 or K: terminates the currently highlighted process

F10 or Q: Exits the process.


second, glances:


Glance is a free (GPL) cross-platform monitoring tool that automatically adapts to screen size dynamically displaying key elements of information such as CPU, load averaging, memory, network, disk, file system, process etc.

At the same time, glances can also implement remote monitoring in C/s architecture.


glances [-BDEHMNRSVYZ1] [-B bind] [-C Server] [-C conffile] [-P port] [-p password] [--passwd] [-t #] [-f/path/to/somefil E] [-o {html| CSV}]

Common options:

-B: Display the data exchange rate of the network card device in BYTE/S;

-D: Turn off the disk I/O function module;

-E: Turn off the sensing function module;

-H: Display brief help information;

-M: Close the Mount function module;

-N: Turn off the network function module;

-R: Close the process list function module;

-S: Run glances in server mode;

-V: Display version information;

-Y: Enable Hddtemp function module (required hddtemp installed);

-Z: Disables bold color display properties;

-1: Display each CPU related load data information separately;


-B ipaddr: Used to indicate the local address of the listener

-C IPADDR: The address of the server used for the connection;

-f/path/to/somefile: Set the location and format of the output file;

-O {html| CSV}: Define additional output forms, HTML and CSV two items are optional;

-T #: Specifies the length of the delay, which defaults to 3 seconds;

-P PASSWD: set client/server password

Glances supports remote mode:

That can work in C/s mode:

Server: Start glances in listening mode;

Client: Start glances in remote mode, connect to the specified server remotely, and correlate data on server (-p password is required after setting password);

Server mode:

Glances-s-B ipaddr

-B: Used to indicate the local address of the listener;

Client mode:

Glances-c ipaddr

-C: The address of the server used for the connection;


Interactive instructions that can be used after entering the glances display interface:


A: Automatically sort the sort process list automatically

B: Network transfer rate switching between BIT/S and byte/s switch between bit/s or byte/s for network I/O

C: Sort processes by CPU usage based on CPU usage

D: Show or hide disk I/O status show/hide disks I/O stats

F: Show or hide the file system State show/hide. Stats

H: Show or hide the Help window show/hide

I: Sort by I/O rates sort processes by I/O rate

L: Show or hide log information show/hide log messages

M: Sort according to memory usage sort processes by MEM usage

N: Show or hide network status Show/hide networks stats

P: Sort processes by name based on process name

Q: Quit glances quit

S: Show or hide the sensing state Show/hide sensors stats (only available WITH-E flag)

U: Show Network I/o cumulative Usage View cumulative networking I/O

W: Delete Read warning log information delete finished warning log messages

X: Delete Once warning and critical log information delete finished warning and critical log messages

Y: Show or hide hddtemp status information show/hide hddtemp stats (only available with-y flag)

1: Toggle Displays the global CPU and the status of each CPU switch between global CPU and PER-CPU stats


Third, Dstat:


Integrates the features of the Vmstat, Iostat, Netstat and ifstat four tools so that you can see all the system resources immediately, and the internal statistical items include Aio,cpu,cpu24,disk,disk24,disk24old,epoch, Fs,int,int24,io,ipc,load,lock,men,net,page,page24,proc,raw,socket,swap,swapold,sys,tcp,time,udp,unix,vm

The display results are refreshed once per second with the end of the row.

Dstat [-AFV] [options:] [Delay [Count]]


Delay: How many seconds to display once

Count: show how many times after exiting, no setting will always work display, you can press CTRL + C exit;


Screen Display effect settings:

-a:--all, equivalent to-cdngy;

-f:--full, all displays the results list of-c,-d,-i,-n and-s;

-v:--vmstat, equivalent to-pmgdsc-d total;

--BW: Black word display on white background

--float: Display floating point data (mutually exclusive with--integer)

--integer: Show only integer data

--nocolor: Turn off color

--noupdate: Turn off immediate updating data function when delay is greater than 1 seconds

--output/path/to/file: Save the results in CSV format to/path/to/file



Options

-C: Displays statistical data related to CPU performance indicators;

-D: Show disk-related rate data;

-D Total,hda: Displays all content including HDA and total;

-G: Displays page-related rate data;

-I: Show interrupt related rate data;

-L: Display statistics related to load average (1min,5mins,15mins);

-M: Displays memory-related statistics (used used, buffers buffered, cache cached, free idle);

-N: Shows the rate at which data is sent and received from the network (receive, send);

-N eth1,total: Displays information that includes all the NICs in the Eth1 and total (the network card that needs to be displayed after N is set);

-P: Show process-related statistics (runnable-ready, uninterruptible non-disruptive, new-initiated);

The rate of-r:io requests (read, write, requests application pending);

-S: Displays data about swap (used used, free idle);

-S Swap1,total: Displays information including SWAP1 and total, which is used when there are multiple swaps;

-t:--time, Show time/date;

-T: Start timing after entering the interface;

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

--TOP-CPU: Displays the most CPU-intensive processes;

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

--top-io: The most IO-intensive process;

--top-mem: Shows the most memory-intensive processes;

--aio: Displays AIO status (asynchronous I/O);

--fs: Displays the file system status, including open files and inodes;

--IPC: Shows the rate data related to interprocess communication, including the message queue, the semaphores semaphore, and shared memory;

--lock: Display file lock information;

--socket: Displays socket status information, including total totals, tcp,udp,raw,ip-fragments

--raw: Displays data related to raw sockets;

--TCP: Displays data related to TCP sockets;

--UDP: Displays data related to UDP sockets;

--unix: Displays statistics related to UNIX sock interfaces;

--VM: Display VM virtual memory information (including hard page failure flag, soft page invalidation flag, allocated, idle)


Plugin settings:

We can use after setting up our own plug-in statistics plugin, here are some existing plug-in features, after downloading and installing the corresponding function program (in parentheses for the required download installation), you can use:

--battery: Displays battery statistics (ACPI) as a percentage;

--battery-remain: Displays the amount of time, in hours or minutes (ACPI), that the remaining battery power can still be used;

--cpugreq: Display CPU frequency (ACPI);

--fan: Show fan speed (ACPI);

--freespace: Displays disk File system usage;

--net-packets: Displays the number of network packets received and sent;

--mysql5-{cmds|conn|io|keys}: Displays the MySQL5 's command line, connection, I/O, keys statistics;

--postfix: Display suffix queue size (postfix);

--proc-count: Shows the number of all processes;

--RPC: Displays the statistics of RPC client calls;

--RPCD: Displays the statistics of the RPC server calls;

--sendmail: Displays the size of the queue for outgoing messages (sendmail);

--snooze: The time to send a message or receive a message per second;

--thermal: Display System temperature sensor

--top-{bio|cpu|cputime|cputime-avg|io|latency|latency-avg|men|oom}: Displays the most consumed disk blocks | Consumes cpu| most CPU time | Consumes the most CPU time on average | Most consumption of i/ o| the Highest latency | The most memory-intensive | The first process to be oom kill;

--vmk-{hba|int|nic}: Displays the VMware ESX Kernel | interrupt | interface statistics;

--wifi: Displays the quality and signal-to-noise ratio of the wireless network link.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6B/73/wKiom1Ut0pjDcvGwAAIW1LIPVdQ373.jpg "title=" Dstat.jpg "alt=" Wkiom1ut0pjdcvgwaaiw1lipvdq373.jpg "/>




Use of the Process management tool Htop/glances/dstat

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.