Linux Top 命令解析

2023-11-16

转自:http://www.jb51.net/LINUXjishu/34604.html

TOP是一个动态显示过程,即可以通过用户按键来不断刷新当前状态.如果在前台执行该命令,它将独占前台,直到用户终止该程序为止.比较准确的说,top命令提供了实时的对系统处理器的状态监视.它将显示系统中CPU最“敏感”的任务列表.该命令可以按CPU使用.内存使用和执行时间对任务进行排序;而且该命令的很多特性都可以通过交互式命令或者在个人定制文件中进行设定.

top - 12:38:33 up 50 days, 23:15,  7 users,  load average: 60.58, 61.14, 61.22

Tasks: 203 total,  60 running, 139 sleeping,   4 stopped,   0 zombie

Cpu(s)  : 27.0%us, 73.0%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st

Mem:   1939780k total,  1375280k used,   564500k free,   109680k buffers

Swap:  4401800k total,   497456k used,  3904344k free,   848712k cached

PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                

 4338 oracle    25   0  627m 209m 207m R    0 11.0 297:14.76 oracle                                

 4267 oracle    25   0  626m 144m 143m R    6  7.6  89:16.62 oracle                                

 3458 oracle    25   0  672m 133m 124m R    0  7.1   1283:08 oracle                                

 3478 oracle    25   0  672m 124m 115m R    0  6.6   1272:30 oracle                                

 3395 oracle    25   0  672m 122m 113m R    0  6.5   1270:03 oracle                                 

 3480 oracle    25   0  672m 122m 109m R    8  6.4   1274:13 oracle                                

 3399 oracle    25   0  672m 121m 110m R    0  6.4   1279:37 oracle                                

 4261 oracle    25   0  634m 100m  99m R    0  5.3  86:13.90 oracle                                

25737 oracle    25   0  632m  81m  74m R    0  4.3 272:35.42 oracle                                

 7072 oracle    25   0  626m  72m  71m R    0  3.8   6:35.68 oracle                                

16073 oracle    25   0  630m  68m  63m R    8  3.6 175:20.36 oracle                                

16140 oracle    25   0  630m  66m  60m R    0  3.5 175:13.42 oracle                                

16122 oracle    25   0  630m  66m  60m R    0  3.5 176:47.73 oracle                                

  786 oracle    25   0  627m  63m  63m R    0  3.4   1:54.93 oracle                                

 4271 oracle    25   0  627m  59m  58m R    8  3.1  86:09.64 oracle                                

 4273 oracle    25   0  627m  57m  56m R    8  3.0  84:38.20 oracle                                

22670 oracle    25   0  626m  50m  49m R    0  2.7  84:55.82 oracle     

一.  TOP前五行统计信息

统计信息区前五行是系统整体的统计信息。

1. 第一行是任务队列信息

同 uptime  命令的执行结果:

[root@localhost ~]# uptime

 13:22:30 up 8 min,  4 users,  load average: 0.14, 0.38, 0.25

其内容如下:

12:38:33

当前时间

up 50days

系统运行时间,格式为时:分

1 user

当前登录用户数

load average: 0.06, 0.60, 0.48

系统负载,即任务队列的平均长度。 三个数值分别为  1分钟、5分钟、15分钟前到现在的平均值。

2. 第二、三行为进程和CPU的信息

当有多个CPU时,这些内容可能会超过两行。内容如下:

Tasks: 29 total

进程总数

1 running

正在运行的进程数

28 sleeping

睡眠的进程数

0 stopped

停止的进程数

0 zombie

僵尸进程数

Cpu(s): 0.3% us

用户空间占用CPU百分比

1.0% sy

内核空间占用CPU百分比

0.0% ni

用户进程空间内改变过优先级的进程占用CPU百分比

98.7% id

空闲CPU百分比

0.0% wa

等待输入输出的CPU时间百分比

0.0% hi

 

0.0% si

 

3. 第四五行为内存信息。

内容如下:

Mem: 191272k total

物理内存总量

173656k used

使用的物理内存总量

17616k free

空闲内存总量

22052k buffers

用作内核缓存的内存量

Swap: 192772k total

交换区总量

0k used

使用的交换区总量

192772k free

空闲交换区总量

123988k cached

缓冲的交换区总量。 内存中的内容被换出到交换区,而后又被换入到内存,但使用过的交换区尚未被覆盖, 该数值即为这些内容已存在于内存中的交换区的大小。相应的内存再次被换出时可不必再对交换区写入。

二.  进程信息

列名

含义

PID

进程id

PPID

父进程id

RUSER

Real user name

UID

进程所有者的用户id

USER

进程所有者的用户名

GROUP

进程所有者的组名

TTY

启动进程的终端名。不是从终端启动的进程则显示为 ?

PR

优先级

NI

nice值。负值表示高优先级,正值表示低优先级

P

最后使用的CPU,仅在多CPU环境下有意义

%CPU

上次更新到现在的CPU时间占用百分比

TIME

进程使用的CPU时间总计,单位秒

TIME+

进程使用的CPU时间总计,单位1/100秒

%MEM

进程使用的物理内存百分比

VIRT

进程使用的虚拟内存总量,单位kb。VIRT=SWAP+RES

SWAP

进程使用的虚拟内存中,被换出的大小,单位kb。

RES

进程使用的、未被换出的物理内存大小,单位kb。RES=CODE+DATA

CODE

可执行代码占用的物理内存大小,单位kb

DATA

可执行代码以外的部分(数据段+栈)占用的物理内存大小,单位kb

SHR

共享内存大小,单位kb

nFLT

页面错误次数

nDRT

最后一次写入到现在,被修改过的页面数。

S

进程状态。
            D=不可中断的睡眠状态
            R=运行
            S=睡眠
            T=跟踪/停止
            Z=僵尸进程

COMMAND

命令名/命令行

WCHAN

若该进程在睡眠,则显示睡眠中的系统函数名

Flags

任务标志,参考 sched.h

top 的man 命令解释如下:

    Listed below are top's available fields.  They are always associated with the  letter  shown,  regardless  of the position you may have established for them with the 'o' (Order fields) interactive command.Any field is selectable as the sort field, and you control whether they are  sorted high-to-low  or  low-to-high.   For  additional  information on sort provisions see  topic 3c. TASK Area Commands.

a: PID  --  Process Id

       The task's unique process ID, which periodically wraps, though never  restarting at zero.

b: PPID  --  Parent Process Pid

       The process ID of a task's parent.

c: RUSER  --  Real User Name

       The real user name of the task's owner.

d: UID  --  User Id

       The effective user ID of the task's owner.

e: USER  --  User Name

       The effective user name of the task's owner.

f: GROUP  --  Group Name

       The effective group name of the task's owner.

g: TTY  --  Controlling Tty

       The  name of the controlling terminal.  This is usually the device (serial port, pty, etc.) from which the process was started, and which it uses  for  input  oroutput.   However,  a task need not be associated with a terminal, in which case you'll see '?' displayed.

h: PR  --  Priority

       The priority of the task.

i: NI  --  Nice value

       The nice value of the task.   A  negative  nice  value  means  higher  priority, whereas  a  positive nice value means lower priority.  Zero in this field simply means priority will not be adjusted in determining a task's dispatchability.

j: P  --  Last used CPU (SMP)

       A number representing the last used processor.  In a true SMP  environment  this will likely change frequently since the kernel intentionally uses weak affinity. Also, the very act of running top may break this weak affinity  and  cause  more processes  to change CPUs more often (because of the extra demand for cpu time).

k: %CPU  --  CPU usage

       The task's share of the elapsed CPU time since the last screen update, expressed as a percentage of total CPU time.  In a true SMP environment, if 'Irix mode' is Off, top will operate in 'Solaris mode' where a task's cpu usage will be divided by  the  total  number  of  CPUs.   You toggle 'Irix/Solaris' modes with the 'I' interactive command.

l: TIME  --  CPU Time

       Total CPU time the task has used since it started.  When  'Cumulative  mode'  is On,  each  process is listed with the cpu time that it and its dead children has used.  You toggle 'Cumulative mode' with 'S', which is a command-line option and an interactive command.  See the 'S' interactive command for additional information regarding this mode.

m: TIME+  --  CPU Time, hundredths

       The same as 'TIME', but reflecting more granularity through hundredths of a sec          ond.

n: %MEM  --  Memory usage (RES)

       A task's currently used share of available physical memory.

o: VIRT  --  Virtual Image (kb)

       The total amount of virtual memory used by the task.  It includes all code, data and shared libraries plus pages that have  been  swapped  out.  (Note:  you  can define  the STATSIZE=1 environment variable and the VIRT will be calculated from the /proc/#/state VmSize field.)

       VIRT = SWAP + RES.

p: SWAP  --  Swapped size (kb)

       The swapped out portion of a task's total virtual memory image.

q: RES  --  Resident size (kb)

       The non-swapped physical memory a task has used.

       RES = CODE + DATA.

r: CODE  --  Code size (kb)

       The amount of physical memory devoted to executable  code,  also  known  as  the'text resident set' size or TRS.

s: DATA  --  Data+Stack size (kb)

       The  amount of physical memory devoted to other than executable code, also known the 'data resident set' size or DRS.

t: SHR  --  Shared Mem size (kb)

       The amount of shared memory used by a task.   It  simply  reflects  memory  that could be potentially shared with other processes.

u: nFLT  --  Page Fault count

       The  number  of  major  page faults that have occurred for a task.  A page fault occurs when a process attempts to read from or write to a virtual page  that  is not  currently  present  in  its address space.  A major page fault is when disk access is involved in making that page available.

v: nDRT  --  Dirty Pages count

       The number of pages that have been modified since  they  were  last  written  to disk.   Dirty  pages  must  be written to disk before the corresponding physical memory location can be used for some other virtual page.

w: S  --  Process Status

       The status of the task which can be one of:

             'D' = uninterruptible sleep

             'R' = running

             'S' = sleeping

             'T' = traced or stopped

             'Z' = zombie

       Tasks shown as running should be more properly thought of as 'ready to run'  --their  task_struct is simply represented on the Linux run-queue.  Even without a true SMP machine, you may see numerous tasks in this state  depending  on  top's delay interval and nice value.

x: Command  --  Command line or Program name

       Display the command line used to start a task or the name of the associated program.  You toggle between command line and name with 'c', which is both  a  command-line option and an interactive command. When  you've  chosen  to display command lines, processes without a command line (like kernel threads) will be shown with only the program name  in  parentheses, as in this example:                ( mdrecoveryd ) Either  form  of  display is subject to potential truncation if it's too long to fit in this field's  current  width.   That  width  depends  upon  other  fields  selected, their order and the current screen width.

       Note: The 'Command' field/column is unique, in that it is not fixed-width.  When displayed, this column will be allocated all remaining screen width (up  to  the maximum  512  characters)  to  provide for the potential growth of program names into command lines.

y: WCHAN  --  Sleeping in Function

       Depending on the availability of the kernel link map ('System.map'), this  field will  show  the  name or the address of the kernel function in which the task is currently sleeping.  Running tasks will display a dash ('-') in this column.

       Note: By displaying this field, top's own working set will be increased by  over 700Kb.   Your  only  means of reducing that overhead will be to stop and restart          top.

z: Flags  --  Task Flags

       This column represents the task's current scheduling flags which  are  expressed in  hexadecimal  notation and with zeros suppressed.  These flags are officially documented in <linux/sched.h>.  Less formal documentation can also be  found  on the 'Fields select' and 'Order fields' screens.

       默认情况下仅显示比较重要的  PID、USER、PR、NI、VIRT、RES、SHR、S、%CPU、%MEM、TIME+、COMMAND  列。

2.1 用快捷键更改显示内容。
(1)更改显示内容通过 f键可以选择显示的内容。

       按 f 键之后会显示列的列表,按 a-z  即可显示或隐藏对应的列,最后按回车键确定。

(2)按o键可以改变列的显示顺序。

       按小写的 a-z 可以将相应的列向右移动,而大写的 A-Z  可以将相应的列向左移动。最后按回车键确定。

       按大写的 F 或 O 键,然后按 a-z 可以将进程按照相应的列进行排序。而大写的  R 键可以将当前的排序倒转。

       设置完按回车返回界面。

三.  命令使用

详细内容可以参考MAN 帮助文档。这里列举部分内容:

命令格式:

top [-] [d] [p] [q] [c] [C] [S]    [n]

参数说明:

d:  指定每两次屏幕信息刷新之间的时间间隔。当然用户可以使用s交互命令来改变之。

p:  通过指定监控进程ID来仅仅监控某个进程的状态。

q:该选项将使top没有任何延迟的进行刷新。如果调用程序有超级用户权限,那么top将以尽可能高的优先级运行。

S: 指定累计模式

s : 使top命令在安全模式中运行。这将去除交互命令所带来的潜在危险。

i:  使top不显示任何闲置或者僵死进程。

c:  显示整个命令行而不只是显示命令名

在top命令的显示窗口,我们还可以输入以下字母,进行一些交互:

帮助文档如下:

Help for Interactive Commands - procps version 3.2.7

Window 1:Def: Cumulative mode Off.  System: Delay 4.0 secs; Secure mode Off.

  Z,B       Global: 'Z' change color mappings; 'B' disable/enable bold

  l,t,m     Toggle Summaries: 'l' load avg; 't' task/cpu stats; 'm' mem info

  1,I       Toggle SMP view: '1' single/separate states; 'I' Irix/Solaris mode

  f,o     . Fields/Columns: 'f' add or remove; 'o' change display order

  F or O  . Select sort field

  <,>     . Move sort field: '<' next col left; '>' next col right

  R,H     . Toggle: 'R' normal/reverse sort; 'H' show threads

  c,i,S   . Toggle: 'c' cmd name/line; 'i' idle tasks; 'S' cumulative time

  x,y     . Toggle highlights: 'x' sort field; 'y' running tasks

  z,b     . Toggle: 'z' color/mono; 'b' bold/reverse (only if 'x' or 'y')

  u       . Show specific user only

  n or #  . Set maximum tasks displayed

  k,r       Manipulate tasks: 'k' kill; 'r' renice

  d or s    Set update interval

  W         Write configuration file

  q         Quit

          ( commands shown with '.' require a visible task display window )

Press 'h' or '?' for help with Windows,

h或者?  : 显示帮助画面,给出一些简短的命令总结说明。

k  :终止一个进程。系统将提示用户输入需要终止的进程PID,以及需要发送给该进程什么样的信号。一般的终止进程可以使用15信号;如果不能正常结束那就使用信号9强制结束该进程。默认值是信号15。在安全模式中此命令被屏蔽。

i:忽略闲置和僵死进程。这是一个开关式命令。

q:  退出程序。

r:  重新安排一个进程的优先级别。系统提示用户输入需要改变的进程PID以及需要设置的进程优先级值。输入一个正值将使优先级降低,反之则可以使该进程拥有更高的优先权。默认值是10。

S:切换到累计模式。

s :  改变两次刷新之间的延迟时间。系统将提示用户输入新的时间,单位为s。如果有小数,就换算成ms。输入0值则系统将不断刷新,默认值是5 s。需要注意的是如果设置太小的时间,很可能会引起不断刷新,从而根本来不及看清显示的情况,而且系统负载也会大大增加。

f或者F :从当前显示中添加或者删除项目。

o或者O  :改变显示项目的顺序。

l: 切换显示平均负载和启动时间信息。即显示影藏第一行

m: 切换显示内存信息。即显示影藏内存行

t : 切换显示进程和CPU状态信息。即显示影藏CPU行

c:  切换显示命令名称和完整命令行。 显示完整的命令。 这个功能很有用。

M : 根据驻留内存大小进行排序。

P:根据CPU使用百分比大小进行排序。

T: 根据时间/累计时间进行排序。

W:  将当前设置写入~/.toprc文件中。这是写top配置文件的推荐方法。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Linux Top 命令解析 的相关文章

  • linux4.6 EC11旋转编码器的驱动

    最近项目使用了旋转编码器EC11 遍查内核 发现并没有它的驱动 查了查 终于找到一篇有用的 根据自己的需要和对最基础的gpio key c的理解 我改写出了一份EC11的专用驱动 感谢下面博主的启发 有了这位高人的指点 我才有信心改写成功
  • 让Redis突破内存大小的限制

    Redis虽然可以实现持久化存储 也是基于数据内存模型的基础之上 单机内存大小限制着Redis存储的数据量 有没有一种替代方案呢 本文介绍一款笔者使用的采用New BSD License 许可协议的软件 SSDB 官网地址 http ssd
  • Linux统计某文件夹下文件、文件夹的个数

    http blog sina com cn s blog 464f6dba01012vwv html 统计某文件夹下文件的个数 ls l grep wc l 统计某文件夹下目录的个数 ls l grep wc l 统计文件夹下文件的个数 包
  • ubuntu16.04安装cmake-3.8.1最靠谱的方法(ubuntu下安装指定版本cmke)

    1 问题描述 2 cmake安装五种方法 法一 下载cmake二进制安装包 配置路径 亲测有效 法二 cmake源码编译 注意和法一区别 法三 apt安装 法四 在原基础上升级版本 法五 ppa安装 1 问题描述 在配置OpenMVS时 报
  • ld 链接程序出错定位

    工具链相关问题 一般可 verbose 下 看看具体什么地方出问题 设置 LDFLAGS Wl verbose 例如 链接一堆 o文件 只有以下错误信息 ld final link failed Bad value 就可以加入 Wl ver
  • Linux下安装QT4.3.2

    安装qt是因为我刚安装过mplayer想装个前端上网 一查 很多都推崇用smplayer 我也就下决心装上 刚开始一直都装不上 后来静心读了读Install文件才明白要装smplayer必须要有qt4 2或者更高版本 用rpm qa qt才
  • Linux系统:ulimit命令

    目录 一 理论 1 ulimit命令 二 实验 1 打开的最大文件描述符的数量为65535 一 理论 1 ulimit命令 1 概念 ulimit是一个计算机命令 用于shell启动进程所占用的资源 可用于修改系统资源限制 限制每个用户可使
  • linux grep 使用

    1 grep 单独使用 搜素指定目录中包含指定字符的文件 例如 grep r words 搜素当前目录中包含 words 字符的文件 grep r words wc 搜素当前目录中包含 words 字符的文件 只显示 包含该字符的数量 2
  • Dell工作站8T硬盘安装ubuntu 16.04

    Dell工作站8T硬盘安装ubuntu 16 04 MBR文件系统仅支撑2T磁盘 因此在2T以上磁盘上安装ubuntu时 如果想利用全部磁盘空间 需要采用GPT分区 文件系统 模型 这需要重新分区 制作Ubuntu 16 04启动U盘 一
  • linux驱动开发(四):ioctl()函数

    前文中我们介绍了应用程序通过使用虚拟文件系统VFS提供的接口 来控制字符驱动程序 完成字符驱动设备的open close read write操作 但是如果我们想进行除此以外的其他操作 拓展一些file operations给出的接口中没有
  • ubuntu 上安装 oprofile

    1 wget http prdownloads sourceforge net oprofile oprofile 0 9 6 tar gz 2 tar zxf oprofile 0 9 6 tar gz 3 configure check
  • 臻识车牌识别摄像头对接

    一 臻识车牌识别摄像头 1 非常有用的官方代码 内部有TCP HTTP等协议 2 官方常见问题 3 官方下载专区 二 http对接例子 1 自己使用java mock 模拟后台服务 你会用到的配置文件 java jar moco runne
  • Linux sh命令

    sh a c C e E f h i I k m n p r s t T u v x argument a Export all variables assigned to c Pass the string argument to the
  • Linux线程同步(二)---互斥锁实现线程同步

    一 why 先给自己打个广告 本人的微信公众号 嵌入式Linux江湖 主要关注嵌入式软件开发 股票基金定投 足球等等 希望大家多多关注 有问题可以直接留言给我 一定尽心尽力回答大家的问题 在博客 Linux线程同步 一 初识篇 中 介绍了为
  • Linux系统:常用服务端口

    目录 一 理论 1 端口分类 2 传输协议 3 常用端口 一 理论 1 端口分类 一个计算机最多有65535个端口 端口不能重复 Linux 只有 root 用户可以使用 1024 以下的端口 表1 端口分类 端口 范围 说明 公认端口 W
  • 日志查找常用命令-超实用

    0 前言 1 命令的尾部添加 color 或者 color auto 可以使关键字带颜色 很清晰 1 Linux日志查找常用命令 1 1 cat zcat cat n app log grep error 查询日志中含有某个关键字error
  • 挂载mount问题“wrong fs type, bad option, bad superblock on ”的解决办法

    重装系统后挂载一般会出现如下问题 problem ivy ivy OptiPlex 380 source sudo mount 192 168 9 18 home deep dev env source mount wrong fs typ
  • 防止内存泄露 Linux下用Valgrind做检查

    用C C 开发其中最令人头疼的一个问题就是内存管理 有时候为了查找一个内存泄漏或者一个内存访问越界 需要要花上好几天时间 如果有一款工具能够帮助我们做这件事情就好了 valgrind正好就是这样的一款工具 Valgrind是一款基于模拟li
  • Linux生产者消费者模型(POSIX信号量)

    目录 一 生产者消费者模型 1 基本概念 2 模型特点 3 模型优点 二 基于BlockingQueue的生产者消费者模型 1 基本概念 2 单生产者 单消费者为例进行模拟实现 3 基于计算任务的生产者消费者模型 三 POSIX信号量 1
  • docke的基础入门

    docker基础入门操作 一 如何安装docker 一 如何安装docker 安装docker命令通过一下命令顺序执行 即可进行安装 校验操作系统内核版本 要求是3 10以上的版本 1 安装一些必要的系统工具 其中yum utils包含yu

随机推荐

  • PHP的bcadd()函数用法

    求和后保留X位小数的函数 一般用于价格累加 查询出来的价格即使是浮点型 但是运用 后会变成整型 若需求需要保留小数位 则需要用到这个函数 bcadd 被加数 加数 保留几位小数 bcadd 1 3 2 4 00
  • 华为OD机试真题-最长密码【2023.Q1】

    题目描述 小王在进行游戏大闯关 有一个关卡需要输入一个密码才能通过 密码获得的条件如下 在一个密码本中 每一页都有一个由26个小写字母组成的若干位密码 每一页的密码不同 需要从这个密码本中寻找这样一个最长的密码 从它的末尾开始依次去掉一位得
  • 从零开始学前端(一)

    1 在桌面空白的地方 点击右键新建一个文本文档 2 双击或者右键打开刚刚新建的文件 3 将下面的代码复制到刚刚打开的txt文件中 h1 大家好 我是一只羊 这是我的第一个网页 h1 p Hello world p 4 点击文件 点击另存为
  • Mysql模糊查询like效率,以及更高效的写法

    原文来自 https www cnblogs com chaobest p 6737901 html 在使用msyql进行模糊查询的时候 很自然的会用到like语句 通常情况下 在数据量小的时候 不容易看出查询的效率 但在数据量达到百万级
  • Linux的学习步骤

    linux 基本操作命令 linux 各种配置 环境变量配置 网络配置 服务配置 linux 环境下搭建各种开发环境 Linux 写基本的shell脚本 对linux进行维护 Linux 安全设置 防止攻击 保障服务器的正常运行 能对系统尽
  • 飞腾CPU虚拟化相关代码分析(三)

    飞腾CPU虚拟化相关代码分析 三 函数set cpu boot mode flag 基本描述 根据CPU启动模式 来设置 boot cpu mode全局数组变量 函数输入输出描述 输入 寄存器w0 函数el2 setup的输出 寄存器w0
  • 树形dp(例题)

    树的最长路径带权值 树的直径可能时红色的边 从上图可以看出 每次要两个变量存放以u为根 最长路径d1 和次长路径d2 那么整个树的最长路径就有可能是d1 d2 我们每次要返回以u为根的贯穿试的最长路径 给他的父节点判断使用如下图 inclu
  • 如何求矩阵的逆矩阵

    如何求矩阵的逆矩阵 叮叮当当sunny 博客园 求逆矩阵最有效的方法是初等变换法 虽然还有别的方法 如果要求方阵 AA 的逆矩阵 标准的做法是 将矩阵 AA 与单位矩阵 II 排成一个新的矩阵 AI AI 将此新矩阵 AI AI 做初等行变
  • 埋点是什么?有什么作用?前端如何埋点?

    一 什么是埋点 埋点 tracking 是指在应用程序中插入代码或工具来记录某些事件的行为和属性 例如用户在应用中的点击 浏览 购买 注册等操作行为 这些数据可以被用来分析用户行为 优化产品功能 改进用户体验等 通过埋点 开发人员可以采集用
  • /Library/Developer/CommandLineTools/usr/bin/python3 :NO module named pytest解决

    报错场景 已经用pip3 install pytest 成功下载pytest 结果运行python3 m pytest xxx py还是报错 Library Developer CommandLineTools usr bin python
  • *python解决狼羊菜过河问题

    python解决狼羊菜过河问题 A岸有菜 羊 狼 农夫农夫必须将他们都送到B岸每次只能送一个 在保证他们不会被吃的前提下 完成任务 并得出步骤 代码 A 狼 1 羊 1 菜 1 B 狼 0 羊 0 菜 0 size len A count
  • 没有与这些操作数匹配的`“>>“`运算符错误;

    报错信息 没有与这些操作数匹配的 gt gt 运算符错误 网上查询大多是少了头文件
  • python反混淆javascript代码

    JavaScript代码一般都是可见的 一些关键的加密算法写在JS里其实很不安全 代码混淆能将Js进行压缩 使之变成不易读的代码 如下图所示 当然这难不倒我们 网上有很多js反混淆的工具 作者推荐使用jsbeautifier 因为最近项目用
  • CSDN上传付费资源需要创作者等级Lv4,我的升级之路,本文持续更新,欢迎各位分享自己的升级经验

    首先来看看官方的要求 创作者等级Lv4 实名认证 原力等级 5 目前惟一满足的实名认证 创作者等级升级官方说明 计分标准 计分规则 分值 说明 资源量 每上传1个资源 审核通过 5分 若自行或被平台删除及下架则扣除对应分数 分数实时更新 阅
  • 【React】react-router-dom

    文章目录 1 路由器组件 lt HashRouter gt lt BrowserRouter gt 2 路由 2 1 lt Route gt 2 1 1 lt Route element gt 2 1 2 lt Route path gt
  • 函数内的ajax同步请求导致遮罩层失效、或者导致loading正在加载提示失效问题

    功能需求 编写点击按钮 弹出loading遮罩层提示正在加载中 同时查询后台信息 拼接数据后渲染到列表时 为了保障渲染时 列表中的数据已经拼接完成 所以在for循环中使用同步ajax进行请求 在success方法中进行拼接 function
  • JUC多线程

    JUC多线程 1 读写锁 ReadWriteLock 2 线程八锁 3 线程池 4 线程池调度 分支合并框架 ForkJoinPool 1 读写锁 ReadWriteLock 读读之间不需要互斥 读写 写写之间需要互斥 通过readWrit
  • GCC的-fomit-frame-pointer编译选项的含义

    GCC的 fomit frame pointer编译选项的含义 优化你的软件时 发觉 fomit frame pointer 这个选项还是蛮有用的 GCC手册上面这么说 Don t keep the frame pointer in a r
  • LVS DR模式负载均衡群集部署

    目录 1 LVS DR 模式的特点 1 1 数据包流向分析 1 2 DR 模式的特点 2 DR模式 LVS负载均衡群集部署 2 1 配置负载调度器 2 1 1 配置虚拟 IP 地址 2 1 2 调整 proc 响应参数 2 1 3 配置负载
  • Linux Top 命令解析

    转自 http www jb51 net LINUXjishu 34604 html TOP是一个动态显示过程 即可以通过用户按键来不断刷新当前状态 如果在前台执行该命令 它将独占前台 直到用户终止该程序为止 比较准确的说 top命令提供了