位置: 编程技术 - 正文

Unix vmstat 命令详解宝典(unix vi命令)

编辑:rootadmin

推荐整理分享Unix vmstat 命令详解宝典(unix vi命令),希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:unix系统mv命令,unix中vi命令,unix命令大全,unix2dos命令,unix中vi命令,unix2dos命令,unix系统mv命令,unix v7,内容如对您有帮助,希望把文章链接给更多的朋友!

Unix vmstat 命令详解宝典(unix vi命令)

在一个多CPU系统中,vmstat统计所有个数的CPU的平均输出.为每个进程进行统计.没有参数时,vmstat显示每一行是自从系统启动以后的虚拟内存的活动情况. vmstat 的语法我们可以通过linux的man 命令来查看。 将man 的结果导入到指定的文本 # man vmstat|col -b > /u/tianlesoftware.txt 查看vmstat 用法 # man vmstat VMSTAT(8) Linux Administrator’s Manual VMSTAT(8) NAME vmstat - Report virtual memory statistics SYNOPSIS vmstat [-a] [-n] [delay [ count]] vmstat [-f] [-s] [-m] vmstat [-S unit] vmstat [-d] vmstat [-p disk partition] vmstat [-V] DESCRIPTION vmstat reports information about processes, memory, paging, block IO, traps, and cpu activity. The first report produced gives averages since the last reboot. Addi- tional reports give information on a sampling period of length delay. The process and memory reports are instantaneous in either case. Options The -a switch displays active/inactive memory, given a 2.5. kernel or better. The -f switch displays the number of forks since boot. This includes the fork, vfork, and clone system calls, and is equivalent to the total number of tasks created. Each process is represented by one or more tasks, depending on thread usage. This display does not repeat. The -m displays slabinfo. The -n switch causes the header to be displayed only once rather than periodically. The -s switch displays a table of various event counters and memory statistics. This display does not repeat. delay is the delay between updates in seconds. If no delay is speci- fied, only one report is printed with the average values since boot. count is the number of updates. If no count is specified and delay is defined, count defaults to infinity. The -d reports disk statistics (2.5. or above required) The -p followed by some partition name for detailed statistics (2.5. or above required) The -S followed by k or K or m or M switches outputs between , , , or bytes The -V switch results in displaying version information. FIELD DESCRIPTION FOR VM MODE Procs r: The number of processes waiting for run time. b: The number of processes in uninterruptible sleep. Memory swpd: the amount of virtual memory used. free: the amount of idle memory. buff: the amount of memory used as buffers. cache: the amount of memory used as cache. inact: the amount of inactive memory. (-a option) active: the amount of active memory. (-a option) Swap si: Amount of memory swapped in from disk (/s). so: Amount of memory swapped to disk (/s). IO bi: Blocks received from a block device (blocks/s). bo: Blocks sent to a block device (blocks/s). System in: The number of interrupts per second, including the clock. cs: The number of context switches per second. CPU These are percentages of total CPU time. us: Time spent running non-kernel code. (user time, including nice time) sy: Time spent running kernel code. (system time) id: Time spent idle. Prior to Linux 2.5., this includes IO-wait time. wa: Time spent waiting for IO. Prior to Linux 2.5., shown as zero. FIELD DESCRIPTION FOR DISK MODE Reads total: Total reads completed successfully merged: grouped reads (resulting in one I/O) sectors: Sectors read successfully ms: milliseconds spent reading Writes total: Total writes completed successfully merged: grouped writes (resulting in one I/O) sectors: Sectors written successfully ms: milliseconds spent writing IO cur: I/O in progress s: seconds spent for I/O FIELD DESCRIPTION FOR DISK PARTITION MODE reads: Total number of reads issued to this partition read sectors: Total read sectors for partition writes : Total number of writes issued to this partition requested writes: Total number of write requests made for partition FIELD DESCRIPTION FOR SLAB MODE cache: Cache name num: Number of currently active objects total: Total number of available objects size: Size of each object pages: Number of pages with at least one active object totpages: Total number of allocated pages pslab: Number of pages per slab NOTES vmstat does not require special permissions. These reports are intended to help identify system bottlenecks. Linux vmstat does not count itself as a running process. All linux blocks are currently bytes. Old kernels may report blocks as bytes, bytes, or bytes. Since procps 3.1.9, vmstat lets you choose units (k, K, m, M) default is K ( bytes) in the default mode vmstat uses slabinfo 1.1 FIXME FILES /proc/meminfo /proc/stat /proc/*/stat SEE ALSO iostat(1), sar(1), mpstat(1), ps(1), top(1), free(1) BUGS Does not tabulate the block io per device or count the number of sys- tem calls. AUTHORS Written by Henry Ware <al@yfn.ysu.edu>. Fabian Frédérick <ffrederick@users.sourceforge.net> (diskstat, slab, partitions...) Throatwobbler Ginkgo Labs July VMSTAT(8) 示例: # vmstat 2 procs -----------memory---------------------- -----swap--- -----io---- ---system--- ----cpu------ r b swpd free buff cache si so bi bo in cs us sy id wa 1 1 0 0 5 5 1 0 0 0 0 4 1 2 0 0 0 4 5 2 0 0 0 1 6 7 0 0 0 0 0 4 5 0 0 0 0 3 1 1 0 0 0 9 1 1 0 0 0 1 6 2 0 0 0 0 1 5 1 0 0 0 0 4 5 每2秒显示一次,共显示次。 在Unix(Solaris)平台下: -bash-3.$ vmstat 2 kthr memory page disk faults cpu r b w swap free re mf pi po fr de sr s0 s1 -- -- in sy cs us sy id 0 0 0 0 0 0 0 0 1 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 3 0 0 0 0 4 0 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 0 0 0 0 4 0 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 3 0 一些标准说明: CPU: 1) 如果(process r)是连续的大于在系统中的CPU的个数表示系统现在运行比较慢,有多数的进程等待CPU. 2) 如果r的输出数大于系统中可用CPU个数的4倍的话,则系统面临着CPU短缺的问题,或者是CPU的速率过低,系统中有多数的进程在等待CPU,造成系统中进程运行过慢. 3) 如果空闲时间(cpu id)持续为0并且系统时间(cpu sy)是用户时间的两倍(cpu us) 系统则面临着CPU资源的短缺. 简单的说就是: r 和 b 不高于5,如果r 经常大于4,且id 经常少于,则表示CPU 负荷很重。 us+sy 不超过%,如果大于,进程就会在运行队列中花费等待时间,响应时间和吞吐量就会下降。 wa 不超过, 如果说wa >表明磁盘io没有也许存在不合理的平衡,或者对磁盘操作比较频繁 一般情况下,导致CPU资源不足都是应用程序的问题.比如一些SQL语句不合理等等都会造成这样的现象. 内存: si和so基本为零。 其中si表示当前每秒交换回内存(Swap in)的总量,单位为kbytes;so表示当前每秒交换出内存(Swap out)的总量,单位为kbytes。如果si,so 长期不等于0,表示系统使用swap 频繁,即内存不足。 一般情况下,如果内存的占用率比较高,但是,CPU的占用很低的时候,可以考虑是有很多的应用程序占用了内存没有释放. 要注意的是,Linux 内存在使用后不会释放,所以一般会看到内存使用率很高,要判断linux 内存是否正常,需要通过对swap 交换区的交换频率来看。

OPENBSD上的ADSL和防火墙设置配置 下面我用的是OPENBSD3.6配置ADSL:#vi/etc/ppp/ppp.conf========================ppp.conf=======================default:setlogPhaseChatIPCPCCPtuncommandsetredialsetreconnectpppoe:setdevi

Unix BSD Linux的口令机制初探 1.概述早期UNIX系统把用户口令保存在一个纯文本可读的口令文件中,这可能在系统管理员注意不到的情况下被截取并暴露。它也可能在一次偶然事件中

Unix操作系统命令和配置文件的保护知识分享 Unix操作系统有很多值得学习的地方,这里我们主要介绍Unix操作系统中的保护知识。我们要保护下面的Unix操作系统命令和Unix操作系统配置文件以防止入

标签: unix vi命令

本文链接地址:https://www.jiuchutong.com/biancheng/354014.html 转载请保留说明!

上一篇:freebsd下重启网络相关命令分析(freebsd重启命令)

下一篇:OPENBSD上的ADSL和防火墙设置配置(open bsd)

  • 代垫水电费增值税
  • 装修公司财务报销制度和流程
  • 购买冰箱微波炉注意事项
  • 一般纳税人申报纳税的流程
  • 工资进成本还是费用
  • 个人开具发票需要税号吗
  • 个税是否可以跨区缴纳
  • 建筑行业异地工资怎么算
  • 工人工资可以直接记主营业务成本吗
  • 一般纳税人暂估成本的账务处理
  • 个人取得哪项收入需要缴纳个人所得税
  • 红字使用禁忌
  • 补交税款时加收的滞纳金有上限吗
  • 应交税金进项税的会计分录
  • 运保佣是什么
  • 个人独资企业缴纳个人所得税
  • 企业所得税汇算清缴网上申报流程
  • 没有缴纳社保怎么开证明
  • 开具普通发票只写单位名称和税号可以吗?
  • 人工服务费发票
  • 出口退税预审在申报系统怎么做
  • 普票红冲后原件没有了怎么办
  • 违约金收入如何缴税
  • 退役士兵增值税优惠申报方法
  • 上年免税收入转内销补交税分录
  • 生育津贴公司账户怎么维护
  • 产品质量认证的基本条件有哪些
  • 包装本公司产品的出口包装物是否缴增值税?
  • 增值税专用发票查询系统官方网站
  • 期间费用包括哪几个科目
  • 企业取得财政拨款怎么算
  • backupnotify.exe是什么文件的进程 backupnotify进程安全吗
  • 使用筷子就餐会不会传染乙肝病毒
  • ghost还原问题1823
  • 支付费用没有发票怎么做账务处理
  • php字符串赋值
  • php常用的设计模式在开发中的实例
  • 宜搭下载
  • 爬坑图片卡通
  • 没有报税盘
  • vue的安装步骤
  • 注意力机制有什么作用
  • 路径规划的基本流程和方法
  • 员工迟到扣款怎么处理
  • phpcms采集教程
  • 万元发票和千元发票
  • 0税率可以抵扣进项税吗
  • 跨年认证原材料是什么
  • db2自增函数
  • 销货方怎么开红字发票
  • 其他收益里的政府是什么
  • 社保账务会计分录2019
  • 帮客户代付保证金合法吗
  • 增值税发票税率计算公式
  • 外贸出口企业退税查不到进项发票
  • 其他综合收益为什么不影响利润
  • 政府无偿划拨土地如何摊销
  • 交易性金融资产公允价值变动计入
  • 未分配利润期初余额怎么录入
  • mysql数据库巡检脚本
  • 解决口苦最快的方法
  • 打造安全稳定
  • fedora linux安装教程
  • ghost后不能启动
  • 忘记mysql root密码的解决方法
  • 正版win10怎么用
  • cocos编程
  • node_
  • js中alert弹不出来
  • 安卓下的分件分享怎么弄
  • Node.js中的包管理工具是什么
  • node解决了什么问题
  • fragment detach
  • 如何用python连接数据库
  • ListView.setOnItemClickListener不起作用的原因
  • 异步promise原理
  • 每天一篇文章锻炼口才的文章
  • 提问:请问海淀区各税务所管辖范围都是哪里?
  • 个人所得税需要计提吗?
  • 车船税完税证明查询官网
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

    网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

    友情链接: 武汉网站建设