linux procs单位m,Linux

66b52468c121889b900d4956032f1009.png

8种机械键盘轴体对比

本人程序员,要买一个写代码的键盘,请问红轴和茶轴怎么选?

作者:聂勇 欢迎转载,请保留作者信息并说明文章来源!

近期在排查生产环境故障时要用到vmstat, iostat, sar, top, tcpdump等命令,以前时不时用到它们,但都没有形成一个完整的文档 ,以致在用到时还需要查一些资料。这篇文章主要说明vmstat命令。

vmstat命令用于输出虚拟内存的统计信息。RedHat-5.7 64bit

命令语法及参数说明 | Syntax And Paramenter Description

语法:1vmstat [-V] [-n] [delay [count]]

参数说明:参数描述-Vprints version. 显示vmstat版本信息。

-ncauses the headers not to be reprinted regularly. 只在第一次显示数据时在顶部显示各字段名称,后面不再显示各字段名称。

-aprint inactive/active page stats. 显示活跃和非活跃内存。

-dprints disk statistics. 显示磁盘统计信息。

-Dprints disk table

-pprints disk partition statistics. 显示指定磁盘分区统计信息。

-sprints vm table. 显示内存相关统计信息及多种系统活动数量。

-mprints slabinfo.

-Sunit size 使用指定单位显示。unit size k:1000 K:1024 m:1000000 M:1048576 (default is K). 参数有 k 、K 、m 、M ,分别代表1000、1024、1000000、1048576字节(byte)。默认单位为K(1024 bytes)

delayis the delay between updates in seconds. 刷新时间间隔。如果不指定,只显示一条结果。

countis the number of updates. 刷新次数。如果不指定刷新次数,但指定了刷新时间间隔,这时刷新次数为无穷。

显示字段说明 | Field Description

执行vmstat 1 2后,显示类似如下 :1

2

3

4procs -----------memory---------- ---swap-- -----io-- --system-- -----cpu------

r b swpd free buff cache si so bi bo in cs us sy id wa st

1 0 264 8382308 733500 35758256 0 0 3 12 0 0 1 0 99 0 0

0 0 264 8381264 733500 35759672 0 0 0 0 2823 22045 1 0 98 0 0

1、procs(进程)

r: The number of processes waiting for run time. 运行队列中进程数量。

b: The number of processes in uninterruptible sleep. 等待IO的进程数量。

2、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. 用作缓存的内存大小。

3、swap(交换区)

si: Amount of memory swapped in from disk (/s). 每秒从磁盘交换到内存的大小。

so: Amount of memory swapped to disk (/s). 每秒从内存交换到磁盘的大小。

4、io(磁盘IO)

bi: Blocks received from a block device (blocks/s). 每秒读取的块数。

bo: Blocks sent to a block device (blocks/s). 每秒写入的块数。

5、system(系统)

in: The number of interrupts per second, including the clock. 每秒中断数,包括时钟中断。

cs: The number of context switches per second. 每秒上下文切换数。

6、cpu(值为百分比)

us: Time spent running non-kernel code. (user time, including nice time) 用户进程执行时间(user time)。

sy: Time spent running kernel code. (system time) 系统进程执行时间(system time)。

id: Time spent idle. Prior to Linux 2.5.41, this includes IO-wait time. 空闲时间(包括IO等待时间)。

wa: Time spent waiting for IO. Prior to Linux 2.5.41, included in idle. 等待IO时间(包括空闲时间)。

st: Time stolen from a virtual machine. Prior to Linux 2.6.11, unknown. Linux2.6.11之前未知。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
SQLAlchemy 是一个 SQL 工具包和对象关系映射(ORM)库,用于 Python 编程语言。它提供了一个高级的 SQL 工具和对象关系映射工具,允许开发者以 Python 类和对象的形式操作数据库,而无需编写大量的 SQL 语句。SQLAlchemy 建立在 DBAPI 之上,支持多种数据库后端,如 SQLite, MySQL, PostgreSQL 等。 SQLAlchemy 的核心功能: 对象关系映射(ORM): SQLAlchemy 允许开发者使用 Python 类来表示数据库表,使用类的实例表示表中的行。 开发者可以定义类之间的关系(如一对多、多对多),SQLAlchemy 会自动处理这些关系在数据库中的映射。 通过 ORM,开发者可以像操作 Python 对象一样操作数据库,这大大简化了数据库操作的复杂性。 表达式语言: SQLAlchemy 提供了一个丰富的 SQL 表达式语言,允许开发者以 Python 表达式的方式编写复杂的 SQL 查询。 表达式语言提供了对 SQL 语句的灵活控制,同时保持了代码的可读性和可维护性。 数据库引擎和连接池: SQLAlchemy 支持多种数据库后端,并且为每种后端提供了对应的数据库引擎。 它还提供了连接池管理功能,以优化数据库连接的创建、使用和释放。 会话管理: SQLAlchemy 使用会话(Session)来管理对象的持久化状态。 会话提供了一个工作单元(unit of work)和身份映射(identity map)的概念,使得对象的状态管理和查询更加高效。 事件系统: SQLAlchemy 提供了一个事件系统,允许开发者在 ORM 的各个生命周期阶段插入自定义的钩子函数。 这使得开发者可以在对象加载、修改、删除等操作时执行额外的逻辑。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值