`

Linux Performance Monotor

阅读更多
When the system is running fast/normally you need to take a baseline. Look at top, see what your percentage system, user, idle and iowait is. These can be seen here:

Cpu(s):  8.6% us,  0.3% sy,  0.0% ni, 90.5% id,  0.6% wa,  0.0% hi, 0.0% si

us
    percent cpu being used by userland code
sy
    percent cpu being used by kernelspace code
ni
    like "us" but related to "niced" processes
id
    idle
wa
    cpu is idle because it waits for IO to complete
hi
    interrupts generated by hardware
si
    interrupts generated by software

vmstat 5


    processes ready to run but are waiting for the cpu

    processes in uninterruptible sleep (often io-related)

swpd 
    swap used (KiB)
free 
    memory doing nothing (KiB)
buff 
    buffers (KiB)
cache
    disk cache (KiB)

si 
    memory swapped in from disk (KiB/s)
so 
    memory swapped out from disk (KiB/s)

bi 
    Blocks read in from block devices (blocks/sec)
bo 
    Blocks written out to block devices (blocks/sec)

in 
    interrupts per second (hardware, software, e.g. "the clock ticked" "the ethernet card got a packet")
cs 
    context switches per second (one process stops running on CPU, another starts)

us 
    Userland CPU usage %
sy 
    Kernelspace CPU usage %
id 
    Idle CPU %
wa 
    IO wait CPU %


http://strugglers.net/wiki/Linux_performance_tuning

The first line in top:

top - 22:09:08 up 14 min,  1 user,  load average: 0.21, 0.23, 0.30

“22:09:08″ is the current time; “up 14 min” shows how long the system has been up for; “1 user” how many users are logged in; “load average: 0.21, 0.23, 0.30″ the load average of the system (1minute, 5 minutes, 15 minutes).

Load average is an extensive topic and to understand its inner workings can be daunting. The simplest of definitions states that load average is the cpu utilization over a period of time. A load average of 1 means your cpu is being fully utilized and processes are not having to wait to use a CPU. A load average above 1 indicates that processes need to wait and your system will be less responsive. If your load average is consistently above 3 and your system is running slow you may want to upgrade to more CPU’s or a faster CPU.

The second line in top:

Tasks:  82 total,   1 running,  81 sleeping,   0 stopped,   0 zombie

Shows the number of processes and their current state.

The third lin in top:

Cpu(s):  9.5%us, 31.2%sy,  0.0%ni, 27.0%id,  7.6%wa,  1.0%hi, 23.7%si,  0.0%st

Shows CPU utilization details. “9.5%us” user processes are using 9.5%; “31.2%sy” system processes are using 31.2%; “27.0%id” percentage of available cpu; “7.6%wa” time CPU is waiting for IO.

When first analyzing the Cpu(s) line in top look at the %id to see how much cpu is available. If %id is low then focus on %us, %sy, and %wa to determine what is using the CPU.

The fourth and fifth lines in top:

Mem:    255592k total,   167568k used,    88024k free,    25068k buffers
Swap:   524280k total,        0k used,   524280k free,    85724k cached

Describes the memory usage. These numbers can be misleading. “255592k total” is total memory in the system; “167568K used” is the part of the RAM that currently contains information; “88024k free” is the part of RAM that contains no information; “25068K buffers and 85724k cached” is the buffered and cached data for IO.

So what is the actual amount of free RAM available for programs to use ?

The answer is: free + (buffers + cached)

88024k + (25068k + 85724k) = 198816k

How much RAM is being used by progams ?

The answer is: used – (buffers + cached)

167568k – (25068k + 85724k) = 56776k

The processes information:

Top will display the process using the most CPU usage in descending order. Lets describe each column that represents a process.

PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
3166 apache    15   0 29444 6112 1524 S  6.6  2.4   0:00.79 httpd

PID – process ID of the process

USER – User who is running the process

PR – The priority of the process

NI – Nice value of the process (higher value indicates lower priority)

VIRT – The total amount of virtual memory used

RES – Resident task size

SHR – Amount of shared memory used

S – State of the task. Values are S (sleeping), D (uninterruptible sleep), R (running), Z (zombies), or T (stopped or traced)

%CPU – Percentage of CPU used

%MEM – Percentage of Memory used

TIME+ – Total CPU time used

COMMAND – Command issued
http://www.kernelhardware.org/linux-top-command/
分享到:
评论

相关推荐

    Linux Performance Monitoring

    ### Linux性能监控详解 #### 一、性能监控概述 在IT行业中,特别是在服务器管理和运维领域,性能监控是一项至关重要的技能。对于Linux系统来说,性能监控不仅能够帮助我们了解系统的运行状态,还能帮助我们及时...

    Linux performance monitor & experiments-开源

    开源项目“Linux performance monitor & experiments”提供了一个工具,用于深入理解系统的内部运作,通过对不同虚拟内存(VM)参数和调度程序设置的调整,帮助用户分析和提升系统性能。下面将详细探讨相关知识点。 ...

    juicessh-performancemonitor, 用于监视linux服务器的JuiceSSH插件.zip

    juicessh-performancemonitor, 用于监视linux服务器的JuiceSSH插件 JuiceSSH插件:性能监视器用于监视使用JuiceSSH插件SDK的linux服务器的JuiceSSH插件。 这个插件将连接你选择的JuiceSSH连接并执行命令来监视服务器...

    Extreme Linux Performance Monitoring and Tuning

    The purpose of this document is to describe how to monitor Linux operating systems for performance. This paper examines how to interpret common Linux performance tool output. After collecting this ...

    juicessh-performancemonitor:一个JuiceSSH插件,用于监视linux服务器

    一个JuiceSSH插件,用于使用JuiceSSH插件SDK监视Linux服务器。 该插件将连接到您选择的JuiceSSH连接并执行命令以监视服务器的性能。 有关如何发现各种统计信息的详细信息,请查看以下类: 有关JuiceSSH插件SDK的...

    PLX PCI卡 linux驱动

    PCI8系列 PCI9系列 PCI9054 linux驱动程序 PLX SDK Samples ================================================================ ABOUT This document provides a brief description of the samples included ...

    Linux-Performance-Monitoring.pdf

    这份名为“Linux-Performance-Monitoring.pdf”的文档很可能是关于如何有效地监控和分析Linux系统性能的专业指南。以下是基于这个主题的一些关键知识点: 1. **系统资源监控**:监控CPU、内存、磁盘I/O和网络带宽等...

    network_performance_monitor:网络性能监视器-用于解决家庭网络性能问题的便携式工具

    网络性能监视器网络性能监视器是用于诊断家庭网络性能问题的便携式工具。 可以部署它而无需更改要监视的网络的配置。 该系统测试网络性能的多个方面,包括: 上网速度互联网连接(ping) 域名查询本地网络速度(特别...

    System Performance Monitor 2 by hp-开源

    "System Performance Monitor 2 by hp-开源"是一个专为Linux设计的全面的系统性能监控工具,它由知名科技公司hp开发并进一步发展为System Performance Monitor 2。现在,这个强大的工具已被开源,意味着其源代码公开...

    System and Performance Monitor-开源

    "System and Performance Monitor" 是一款开源的系统监控工具,专为Linux系统设计,旨在提供对系统性能和稳定性的深入洞察。这款工具可以帮助用户实时监测和分析系统的各项关键指标,包括CPU利用率、内存使用情况、...

    PERFORMANCE TUNING ORACLE RAC ON LINUX

    随着每个Oracle版本的更新,监控和故障排除工具都在不断改进,Oracle现在提供了更多工具来监控操作系统,如Grid Control、Lightweight Onboard Monitor (LTOM) 和 Oracle OS Watcher (OSW),这些工具的合理应用对于...

    nnmon-开源

    nmon,全称是"Linux Performance Monitor",是由Andrew F. Sarjeant开发的一款强大的性能监控工具,用于收集Linux服务器的系统资源使用情况,如CPU、内存、磁盘I/O和网络流量等数据。nnmon则为这些数据提供了一个...

    z/VM Performance Monitor Daemon-开源

    在IBM大型机上的z / VM下运行的z / Linux的zpmd是z / VM性能监视器守护程序。 它从Monitor System Service(* MONITOR)使用的DCSS处理并收集数据。 记录被写入MySQL数据库。

    Linux: Powerful Server Administration

    Monitor, manage and develop your server's file system to maintain a stable performance Gain best practice methods on sharing files and resources through a network Install and configure common standard...

    Linux devfreq子系统分析及应用.pdf

    Linux devfreq子系统提供了多种governor供驱动和用户态API选择,包括performance、powersave、userspace和ondemand等。这些governor可以根据不同的场景需求和性能需求对设备进行调频调压,提高设备的运行效能和降低...

    nmon_linux和nmonanalyser工具

    nmon(Nigel's Performance Monitor for Linux)和nmonanalyser是两款非常实用的工具,专用于Linux系统的性能监控和分析。 **nmon_linux** nmon是Andrew Morgan开发的一款轻量级命令行工具,它能够实时监控Linux...

    linux资源监控_nmon工具

    NMON(Nigel's Performance Monitor)是一款强大的性能监控工具,适用于包括龙芯和飞腾在内的多种Linux平台。NMON由Nigel Griffiths开发,它提供了一个直观的界面来展示系统CPU、内存、磁盘I/O、网络流量等关键资源...

    nmon for linux 下性能报表分析

    nmon(Nigel's Performance Monitor)是一款强大的工具,专为Linux设计,用于实时监控和记录系统的资源使用情况,包括CPU、内存、磁盘I/O以及网络等关键性能指标。本文将深入探讨nmon的使用方法及其在性能报表分析中...

    Nmon监控Linux系统资源

    Nmon,全称为“Nigel's Performance Monitor”,是由IBM开发的一款免费的系统监控软件。它能够实时地收集和显示Linux系统的CPU、内存、磁盘I/O、网络流量等关键性能指标,并提供图表化的展示,便于分析和理解。相比...

Global site tag (gtag.js) - Google Analytics