Linux命令(141)之sar

linux命令之sar

1.sar介绍

linux命令sar是用来从各个方面对系统的活动进行监控报告,包括:CPU使用率,内存使用,磁盘I/O等

2.sar用法

sar [参数] [ <时间间隔> [ <次数> ] ]

sar参数
参数说明
-A显示系统所有资源设备(CPU/内存/磁盘)的运行情况
-u显示系统所有CPU在采样时间内的负载情况
-d显示系统所有硬盘在采样时间内的使用情况
-r显示系统内存在采样时间内的使用情况
-b显示缓存区在采样时间内的使用情况
-v显示内核表的统计信息
-q显示运行列表中的进程数、进程大小、系统平均负载等
-B显示内存分页监控的使用情况
-w显示系统交换活动在采样时间内的状态
-n显示网络运行状态,E.g:DEV(显示网络接口信息)/EDEV(显示网络错误的统计数据)/SOCK(显示套接字信息)/FULL(等价于DEV/EDEV/SOCK)

3.实例

3.1.显示系统所有资源设备的运行情况

命令:

sar -A

[root@centos79 ~]# sar -A
Linux 3.10.0-1160.102.1.el7.x86_64 (centos79) 	2023年12月01日 	_x86_64_	(2 CPU)08时53分14秒       LINUX RESTART09时00分01秒     CPU      %usr     %nice      %sys   %iowait    %steal      %irq     %soft    %guest    %gnice     %idle
09时10分01秒     all      1.93      0.00      0.40      0.03      0.00      0.00      0.04      0.00      0.00     97.60
09时10分01秒       0      1.94      0.00      0.38      0.03      0.00      0.00      0.04      0.00      0.00     97.61
09时10分01秒       1      1.92      0.00      0.41      0.04      0.00      0.00      0.04      0.00      0.00     97.5909时10分01秒     CPU      %usr     %nice      %sys   %iowait    %steal      %irq     %soft    %guest    %gnice     %idle
09时20分01秒     all      1.17      0.01      0.56      0.11      0.00      0.00      0.04      0.00      0.00     98.12
09时20分01秒       0      1.24      0.00      0.45      0.10      0.00      0.00      0.04      0.00      0.00     98.16
09时20分01秒       1      1.10      0.02      0.67      0.11      0.00      0.00      0.04      0.00      0.00     98.0709时20分01秒     CPU      %usr     %nice      %sys   %iowait    %steal      %irq     %soft    %guest    %gnice     %idle
09时30分01秒     all      1.17      0.00      0.31      0.01      0.00      0.00      0.04      0.00      0.00     98.47
09时30分01秒       0      1.17      0.00      0.30      0.02      0.00      0.00      0.04      0.00      0.00     98.47
09时30分01秒       1      1.17      0.00      0.32      0.01      0.00      0.00      0.04      0.00      0.00     98.4709时30分01秒     CPU      %usr     %nice      %sys   %iowait    %steal      %irq     %soft    %guest    %gnice     %idle
09时40分01秒     all      0.90      0.00      0.28      0.01      0.00      0.00      0.04      0.00      0.00     98.77
09时40分01秒       0      0.85      0.00      0.27      0.02      0.00      0.00      0.04      0.00      0.00     98.81
09时40分01秒       1      0.95      0.00      0.29      0.00      0.00      0.00      0.04      0.00      0.00     98.7209时40分01秒     CPU      %usr     %nice      %sys   %iowait    %steal      %irq     %soft    %guest    %gnice     %idle
09时50分02秒     all      0.93      0.00      0.29      0.04      0.00      0.00      0.04      0.00      0.00     98.70
09时50分02秒       0      0.91      0.00      0.28      0.04      0.00      0.00      0.04      0.00      0.00     98.73
09时50分02秒       1      0.95      0.00      0.30      0.04      0.00      0.00      0.04      0.00      0.00     98.6809时50分02秒     CPU      %usr     %nice      %sys   %iowait    %steal      %irq     %soft    %guest    %gnice     %idle
10时00分01秒     all      0.67      0.00      0.23      0.00      0.00      0.00      0.04      0.00      0.00     99.06
10时00分01秒       0      0.66      0.00      0.23      0.00      0.00      0.00      0.04      0.00      0.00     99.08
10时00分01秒       1      0.68      0.00      0.24      0.01      0.00      0.00      0.04      0.00      0.00     99.0410时00分01秒     CPU      %usr     %nice      %sys   %iowait    %steal      %irq     %soft    %guest    %gnice     %idle
10时10分01秒     all      0.65      0.00      0.22      0.01      0.00      0.00      0.04      0.00      0.00     99.09
10时10分01秒       0      0.63      0.00      0.21      0.01      0.00      0.00      0.04      0.00      0.00     99.12
10时10分01秒       1      0.67      0.00      0.23      0.00      0.00      0.00      0.04      0.00      0.00     99.0710时10分01秒     CPU      %usr     %nice      %sys   %iowait    %steal      %irq     %soft    %guest    %gnice     %idle
10时20分01秒     all      0.57      0.00      0.20      0.00      0.00      0.00      0.04      0.00      0.00     99.20
10时20分01秒       0      0.55      0.00      0.20      0.00      0.00      0.00      0.04      0.00      0.00     99.21
10时20分01秒       1      0.58      0.00      0.20      0.00      0.00      0.00      0.04      0.00      0.00     99.1810时20分01秒     CPU      %usr     %nice      %sys   %iowait    %steal      %irq     %soft    %guest    %gnice     %idle
10时30分01秒     all      0.59      0.00      0.22      0.01      0.00      0.00      0.04      0.00      0.00     99.15
10时30分01秒       0      0.63      0.00      0.21      0.00      0.00      0.00      0.04      0.00      0.00     99.12
10时30分01秒       1      0.55      0.00      0.22      0.01      0.00      0.00      0.04      0.00      0.00     99.18平均时间:     CPU      %usr     %nice      %sys   %iowait    %steal      %irq     %soft    %guest    %gnice     %idle
平均时间:     all      0.95      0.00      0.30      0.02      0.00      0.00      0.04      0.00      0.00     98.69
平均时间:       0      0.95      0.00      0.28      0.02      0.00      0.00      0.04      0.00      0.00     98.70
平均时间:       1      0.95      0.00      0.32      0.02      0.00      0.00      0.04      0.00      0.00     98.6709时00分01秒    proc/s   cswch/s
09时10分01秒      0.22    857.15
09时20分01秒      0.25    876.92
09时30分01秒      0.17    786.82
09时40分01秒      0.30    806.04
09时50分02秒      0.27    801.23
10时00分01秒      0.19    789.30
10时10分01秒      0.23    757.36
10时20分01秒      0.20    789.10
10时30分01秒      0.18    757.96
平均时间:      0.22    802.4409时00分01秒  pswpin/s pswpout/s
09时10分01秒      0.00      0.00
09时20分01秒      0.00      0.00
09时30分01秒      0.00      0.00
09时40分01秒      0.00      0.00
09时50分02秒      0.00      0.00
10时00分01秒      0.00      0.00
10时10分01秒      0.00      0.00
10时20分01秒      0.00      0.00
10时30分01秒      0.00      0.00
平均时间:      0.00      0.0009时00分01秒  pgpgin/s pgpgout/s   fault/s  majflt/s  pgfree/s pgscank/s pgscand/s pgsteal/s    %vmeff
09时10分01秒      0.81     14.65    230.48      0.01    199.35      0.00      0.00      0.00      0.00
09时20分01秒    198.86     39.04    203.33      0.08    157.73      0.00      0.00      0.00      0.00
09时30分01秒      0.03     11.74    174.47      0.00    145.38      0.00      0.00      0.00      0.00
09时40分01秒      0.08     12.57    231.92      0.00    183.07      0.00      0.00      0.00      0.00
09时50分02秒      2.39     12.86    216.33      0.01    199.36      0.00      0.00      0.00      0.00
10时00分01秒      0.00     11.42    199.12      0.00    137.01      0.00      0.00      0.00      0.00
10时10分01秒      0.00     12.37    187.29      0.00    151.01      0.00      0.00      0.00      0.00
10时20分01秒      0.00     11.02    178.99      0.00    145.38      0.00      0.00      0.00      0.00
10时30分01秒      0.00     11.61    163.72      0.00    154.64      0.00      0.00      0.00      0.00
平均时间:     22.46     15.25    198.41      0.01    163.67      0.00      0.00      0.00      0.0009时00分01秒       tps      rtps      wtps   bread/s   bwrtn/s
09时10分01秒      1.57      0.05      1.51      1.61     29.29
09时20分01秒     15.20     13.37      1.82    397.71     78.09
09时30分01秒      1.27      0.00      1.27      0.07     23.48
09时40分01秒      1.40      0.00      1.39      0.16     25.14
09时50分02秒      1.46      0.08      1.38      4.78     25.71
10时00分01秒      1.27      0.00      1.27      0.00     22.84
10时10分01秒      1.42      0.00      1.42      0.00     24.74
10时20分01秒      1.25      0.00      1.25      0.00     22.04
10时30分01秒      1.36      0.00      1.36      0.00     23.21
平均时间:      2.91      1.50      1.41     44.93     30.5109时00分01秒   frmpg/s   bufpg/s   campg/s
09时10分01秒    -15.75      0.00      0.25
09时20分01秒    -98.15      0.00      6.47
09时30分01秒    -15.29      0.00      0.07
09时40分01秒     -8.90      0.00      0.02
09时50分02秒     -3.72      0.00      0.58
10时00分01秒    -34.01      0.00     -0.01
10时10分01秒      0.68      0.00      0.07
10时20分01秒     -2.49      0.00      0.01
10时30分01秒     -3.27      0.00     -0.03
平均时间:    -20.10      0.00      0.8309时00分01秒 kbmemfree kbmemused  %memused kbbuffers  kbcached  kbcommit   %commit  kbactive   kbinact   kbdirty
09时10分01秒   2193324   8025772     78.54      1080   1066964  11986316     89.69   6641260    883652        56
09时20分01秒   1957704   8261392     80.84      1080   1082500  12053884     90.19   6683008    896224       128
09时30分01秒   1920992   8298104     81.20      1080   1082664  12062324     90.25   6716808    896252        60
09时40分01秒   1899628   8319468     81.41      1080   1082712  12098428     90.52   6740188    894260       116
09时50分02秒   1890700   8328396     81.50      1080   1084112  12077592     90.37   6747184    894980        56
10时00分01秒   1809184   8409912     82.30      1080   1084088  12082460     90.40   6831776    894976       140
10时10分01秒   1810824   8408272     82.28      1080   1084260  12025084     89.98   6830056    895004        52
10时20分01秒   1804836   8414260     82.34      1080   1084296  12084976     90.42   6837172    894112        56
10时30分01秒   1796996   8422100     82.42      1080   1084212  12087600     90.44   6840192    894100        32
平均时间:   1898243   8320853     81.42      1080   1081756  12062074     90.25   6763072    893729        7709时00分01秒 kbswpfree kbswpused  %swpused  kbswpcad   %swpcad
09时10分01秒   3145724         0      0.00         0      0.00
09时20分01秒   3145724         0      0.00         0      0.00
09时30分01秒   3145724         0      0.00         0      0.00
09时40分01秒   3145724         0      0.00         0      0.00
09时50分02秒   3145724         0      0.00         0      0.00
10时00分01秒   3145724         0      0.00         0      0.00
10时10分01秒   3145724         0      0.00         0      0.00
10时20分01秒   3145724         0      0.00         0      0.00
10时30分01秒   3145724         0      0.00         0      0.00
平均时间:   3145724         0      0.00         0      0.0009时00分01秒 kbhugfree kbhugused  %hugused
09时10分01秒         0         0      0.00
09时20分01秒         0         0      0.00
09时30分01秒         0         0      0.00
09时40分01秒         0         0      0.00
09时50分02秒         0         0      0.00
10时00分01秒         0         0      0.00
10时10分01秒         0         0      0.00
10时20分01秒         0         0      0.00
10时30分01秒         0         0      0.00
平均时间:         0         0      0.0009时00分01秒 dentunusd   file-nr  inode-nr    pty-nr
09时10分01秒    138396      6784     83531         5
09时20分01秒    195455      6752    139763         5
09时30分01秒    196056      6752    139779         5
09时40分01秒    197136      6912    139973         6
09时50分02秒    197936      6848    139955         6
10时00分01秒    198701      6816    139961         6
10时10分01秒    199354      6880    139994         6
10时20分01秒    200093      6816    139989         6
10时30分01秒    200740      6816    139941         6
平均时间:    191541      6820    133654         609时00分01秒   runq-sz  plist-sz   ldavg-1   ldavg-5  ldavg-15   blocked
09时10分01秒         1       694      0.07      0.24      0.49         0
09时20分01秒         1       692      0.11      0.35      0.42         0
09时30分01秒         4       692      0.00      0.06      0.24         0
09时40分01秒        10       697      0.04      0.06      0.15         0
09时50分02秒         7       693      0.11      0.10      0.13         0
10时00分01秒         1       694      0.07      0.06      0.11         0
10时10分01秒         3       694      0.01      0.07      0.10         0
10时20分01秒         1       694      0.10      0.06      0.06         0
10时30分01秒         8       694      0.02      0.04      0.05         0
平均时间:         4       694      0.06      0.12      0.19         009时00分01秒       DEV       tps  rd_sec/s  wr_sec/s  avgrq-sz  avgqu-sz     await     svctm     %util
09时10分01秒   dev11-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时10分01秒    dev8-0      1.57      1.61     29.29     19.74      0.01      3.90      3.07      0.48
09时10分01秒  dev253-0      1.71      1.61     29.29     18.08      0.01      3.71      2.81      0.48
09时10分01秒  dev253-1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时10分01秒  dev253-2      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时20分01秒   dev11-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时20分01秒    dev8-0     15.20    397.71     78.09     31.31      0.28     18.43     17.78     27.02
09时20分01秒  dev253-0     15.39    397.03     78.09     30.86      0.28     18.28     17.54     27.01
09时20分01秒  dev253-1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时20分01秒  dev253-2      0.02      0.47      0.00     25.45      0.00     28.27     28.27      0.05
09时30分01秒   dev11-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时30分01秒    dev8-0      1.27      0.07     23.48     18.54      0.00      2.65      2.02      0.26
09时30分01秒  dev253-0      1.37      0.07     23.48     17.17      0.00      2.54      1.87      0.26
09时30分01秒  dev253-1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时30分01秒  dev253-2      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时40分01秒   dev11-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时40分01秒    dev8-0      1.40      0.16     25.14     18.09      0.00      2.80      2.25      0.31
09时40分01秒  dev253-0      1.52      0.16     25.14     16.63      0.00      2.66      2.07      0.31
09时40分01秒  dev253-1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时40分01秒  dev253-2      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.0009时40分01秒       DEV       tps  rd_sec/s  wr_sec/s  avgrq-sz  avgqu-sz     await     svctm     %util
09时50分02秒   dev11-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时50分02秒    dev8-0      1.46      4.78     25.71     20.94      0.00      2.72      2.22      0.32
09时50分02秒  dev253-0      1.58      4.78     25.71     19.24      0.00      2.56      2.04      0.32
09时50分02秒  dev253-1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时50分02秒  dev253-2      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时00分01秒   dev11-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时00分01秒    dev8-0      1.27      0.00     22.84     18.00      0.00      2.54      2.15      0.27
10时00分01秒  dev253-0      1.38      0.00     22.84     16.52      0.00      2.38      1.97      0.27
10时00分01秒  dev253-1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时00分01秒  dev253-2      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时10分01秒   dev11-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时10分01秒    dev8-0      1.42      0.00     24.74     17.39      0.00      2.39      2.00      0.28
10时10分01秒  dev253-0      1.53      0.00     24.74     16.19      0.00      2.30      1.86      0.28
10时10分01秒  dev253-1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时10分01秒  dev253-2      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时20分01秒   dev11-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时20分01秒    dev8-0      1.25      0.00     22.04     17.68      0.00      2.28      1.90      0.24
10时20分01秒  dev253-0      1.35      0.00     22.04     16.29      0.00      2.17      1.75      0.24
10时20分01秒  dev253-1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时20分01秒  dev253-2      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.0010时20分01秒       DEV       tps  rd_sec/s  wr_sec/s  avgrq-sz  avgqu-sz     await     svctm     %util
10时30分01秒   dev11-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时30分01秒    dev8-0      1.36      0.00     23.21     17.05      0.00      2.76      2.24      0.31
10时30分01秒  dev253-0      1.46      0.00     23.21     15.94      0.00      2.65      2.10      0.31
10时30分01秒  dev253-1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时30分01秒  dev253-2      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
平均时间:   dev11-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
平均时间:    dev8-0      2.91     44.93     30.51     25.93      0.03     11.87     11.26      3.28
平均时间:  dev253-0      3.03     44.85     30.51     24.84      0.03     11.46     10.80      3.28
平均时间:  dev253-1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
平均时间:  dev253-2      0.00      0.05      0.00     25.45      0.00     28.27     28.27      0.0109时00分01秒     IFACE   rxpck/s   txpck/s    rxkB/s    txkB/s   rxcmp/s   txcmp/s  rxmcst/s
09时10分01秒 br-63af6643aa54      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时10分01秒     ens32      0.41      0.31      0.04      0.13      0.00      0.00      0.00
09时10分01秒 vetha6a8a46      6.19      7.39      1.20      3.55      0.00      0.00      0.00
09时10分01秒 vethc265dbe      0.37      0.33      0.33      0.06      0.00      0.00      0.00
09时20分01秒 br-63af6643aa54      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时20分01秒     ens32      0.47      0.31      0.04      0.04      0.00      0.00      0.00
09时20分01秒 vetha6a8a46      5.90      7.05      1.07      3.63      0.00      0.00      0.00
09时20分01秒 vethc265dbe      0.36      0.33      0.44      0.06      0.00      0.00      0.00
09时30分01秒 br-63af6643aa54      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时30分01秒     ens32      0.25      0.19      0.02      0.02      0.00      0.00      0.00
09时30分01秒 vetha6a8a46      5.92      7.07      1.07      3.62      0.00      0.00      0.00
09时30分01秒 vethc265dbe      0.36      0.33      0.44      0.06      0.00      0.00      0.00
09时40分01秒 br-63af6643aa54      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时40分01秒     ens32      1.24      0.38      0.11      0.23      0.00      0.00      0.00
09时40分01秒 vetha6a8a46      5.94      7.09      1.08      3.63      0.00      0.00      0.00
09时40分01秒 vethc265dbe      0.37      0.33      0.44      0.06      0.00      0.00      0.00
09时50分02秒 br-63af6643aa54      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时50分02秒     ens32      0.97      0.62      0.08      0.14      0.00      0.00      0.00
09时50分02秒 vetha6a8a46      5.92      7.07      1.07      3.63      0.00      0.00      0.00
09时50分02秒 vethc265dbe      0.37      0.33      0.45      0.06      0.00      0.00      0.00
10时00分01秒 br-63af6643aa54      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时00分01秒     ens32      0.35      0.22      0.03      0.02      0.00      0.00      0.00
10时00分01秒 vetha6a8a46      5.94      7.12      1.09      3.65      0.00      0.00      0.00
10时00分01秒 vethc265dbe      0.37      0.33      0.44      0.06      0.00      0.00      0.00
10时10分01秒 br-63af6643aa54      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时10分01秒     ens32      0.35      0.21      0.03      0.04      0.00      0.00      0.00
10时10分01秒 vetha6a8a46      5.93      7.09      1.08      3.64      0.00      0.00      0.00
10时10分01秒 vethc265dbe      0.37      0.33      0.44      0.06      0.00      0.00      0.00
10时20分01秒 br-63af6643aa54      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时20分01秒     ens32      0.25      0.13      0.02      0.02      0.00      0.00      0.00
10时20分01秒 vetha6a8a46      5.92      7.08      1.07      3.63      0.00      0.00      0.00
10时20分01秒 vethc265dbe      0.37      0.33      0.44      0.06      0.00      0.00      0.0010时20分01秒     IFACE   rxpck/s   txpck/s    rxkB/s    txkB/s   rxcmp/s   txcmp/s  rxmcst/s
10时30分01秒 br-63af6643aa54      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时30分01秒     ens32      0.27      0.21      0.02      0.14      0.00      0.00      0.00
10时30分01秒 vetha6a8a46      5.92      7.09      1.08      3.63      0.00      0.00      0.00
10时30分01秒 vethc265dbe      0.37      0.33      0.44      0.06      0.00      0.00      0.00
平均时间: br-63af6643aa54      0.00      0.00      0.00      0.00      0.00      0.00      0.00
平均时间:     ens32      0.51      0.29      0.04      0.09      0.00      0.00      0.00
平均时间: vetha6a8a46      5.95      7.12      1.09      3.62      0.00      0.00      0.00
平均时间: vethc265dbe      0.37      0.33      0.43      0.06      0.00      0.00      0.0009时00分01秒     IFACE   rxerr/s   txerr/s    coll/s  rxdrop/s  txdrop/s  txcarr/s  rxfram/s  rxfifo/s  txfifo/s
09时10分01秒 br-63af6643aa54      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时10分01秒     ens32      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时10分01秒 vetha6a8a46      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时10分01秒 vethc265dbe      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时20分01秒 br-63af6643aa54      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时20分01秒     ens32      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时20分01秒 vetha6a8a46      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时20分01秒 vethc265dbe      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时30分01秒 br-63af6643aa54      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时30分01秒     ens32      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时30分01秒 vetha6a8a46      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时30分01秒 vethc265dbe      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时40分01秒 br-63af6643aa54      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时40分01秒     ens32      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时40分01秒 vetha6a8a46      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时40分01秒 vethc265dbe      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时50分02秒 br-63af6643aa54      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时50分02秒     ens32      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时50分02秒 vetha6a8a46      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时50分02秒 vethc265dbe      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时00分01秒 br-63af6643aa54      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时00分01秒     ens32      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时00分01秒 vetha6a8a46      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时00分01秒 vethc265dbe      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时10分01秒 br-63af6643aa54      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时10分01秒     ens32      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时10分01秒 vetha6a8a46      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时10分01秒 vethc265dbe      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时20分01秒 br-63af6643aa54      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时20分01秒     ens32      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时20分01秒 vetha6a8a46      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时20分01秒 vethc265dbe      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.0010时20分01秒     IFACE   rxerr/s   txerr/s    coll/s  rxdrop/s  txdrop/s  txcarr/s  rxfram/s  rxfifo/s  txfifo/s
10时30分01秒 br-63af6643aa54      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时30分01秒     ens32      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时30分01秒 vetha6a8a46      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时30分01秒 vethc265dbe      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
平均时间: br-63af6643aa54      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
平均时间:     ens32      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
平均时间: vetha6a8a46      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
平均时间: vethc265dbe      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.0009时00分01秒    call/s retrans/s    read/s   write/s  access/s  getatt/s
09时10分01秒      0.00      0.00      0.00      0.00      0.00      0.00
09时20分01秒      0.00      0.00      0.00      0.00      0.00      0.00
09时30分01秒      0.00      0.00      0.00      0.00      0.00      0.00
09时40分01秒      0.00      0.00      0.00      0.00      0.00      0.00
09时50分02秒      0.00      0.00      0.00      0.00      0.00      0.00
10时00分01秒      0.00      0.00      0.00      0.00      0.00      0.00
10时10分01秒      0.00      0.00      0.00      0.00      0.00      0.00
10时20分01秒      0.00      0.00      0.00      0.00      0.00      0.00
10时30分01秒      0.00      0.00      0.00      0.00      0.00      0.00
平均时间:      0.00      0.00      0.00      0.00      0.00      0.0009时00分01秒   scall/s badcall/s  packet/s     udp/s     tcp/s     hit/s    miss/s   sread/s  swrite/s saccess/s sgetatt/s
09时10分01秒      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时20分01秒      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时30分01秒      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时40分01秒      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09时50分02秒      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时00分01秒      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时10分01秒      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时20分01秒      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时30分01秒      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
平均时间:      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.0009时00分01秒    totsck    tcpsck    udpsck    rawsck   ip-frag    tcp-tw
09时10分01秒      3261       133         7         0         0         0
09时20分01秒      3260       133         7         0         0         0
09时30分01秒      3260       133         7         0         0         0
09时40分01秒      3270       135         7         0         0         0
09时50分02秒      3264       135         7         0         0         0
10时00分01秒      3264       135         7         0         0         0
10时10分01秒      3264       135         7         0         0         0
10时20分01秒      3264       135         7         0         0         0
10时30分01秒      3264       135         7         0         0         0
平均时间:      3263       134         7         0         0         0
[root@centos79 ~]#

3.2.监控CPU资源

命令:

sar -u 3 2 -o cpu.txt

每3秒采样一次,连续采样2次,并将采样结果以二进制形式存入当前目录下的文件cpu.txt中

[root@centos79 ~]# sar -u 3 2 -o cpu.txt
Linux 3.10.0-1160.102.1.el7.x86_64 (centos79) 	2023年12月01日 	_x86_64_	(2 CPU)10时36分43秒     CPU     %user     %nice   %system   %iowait    %steal     %idle
10时36分46秒     all      0.17      0.00      0.17      0.00      0.00     99.66
10时36分49秒     all      0.51      0.00      0.17      0.00      0.00     99.32
平均时间:     all      0.34      0.00      0.17      0.00      0.00     99.49
[root@centos79 ~]# ls -l cpu.txt 
-rw-r--r-- 1 root root 70808 12月  1 10:36 cpu.txt
[root@centos79 ~]# 

上述文件通过以下命令进行查看

命令:

sar -u -f cpu.txt

[root@centos79 ~]# sar -u -f cpu.txt 
Linux 3.10.0-1160.102.1.el7.x86_64 (centos79) 	2023年12月01日 	_x86_64_	(2 CPU)10时36分43秒     CPU     %user     %nice   %system   %iowait    %steal     %idle
10时36分46秒     all      0.17      0.00      0.17      0.00      0.00     99.66
10时36分49秒     all      0.51      0.00      0.17      0.00      0.00     99.32
平均时间:     all      0.34      0.00      0.17      0.00      0.00     99.49
[root@centos79 ~]# 

其中,

CPU:all表示统计信息为所有CPU的平均值

%user:显示在用户级别运行使用CPU总时间的百分比

%nice:显示在用户级别,用于 nice 操作,所占用 CPU 总时间的百分比

%system:在核心级别运行所使用 CPU 总时间的百分比

%iowait:显示用于等待 I/O 操作占用 CPU 总时间的百分比

%steal:管理程序为另一个虚拟进程提供服务而等待虚拟 CPU 的百分比

%idle:显示 CPU 空闲时间占用 CPU 总时间的百分比

3.3.监控内存和交换空间

命令:

sar -r 3 2

[root@centos79 ~]# sar -r 3 2
Linux 3.10.0-1160.102.1.el7.x86_64 (centos79) 	2023年12月01日 	_x86_64_	(2 CPU)10时43分02秒 kbmemfree kbmemused  %memused kbbuffers  kbcached  kbcommit   %commit  kbactive   kbinact   kbdirty
10时43分05秒   1798928   8420168     82.40      1080   1084440  12019140     89.93   6843824    894104       124
10时43分08秒   1799168   8419928     82.39      1080   1084440  12019140     89.93   6843748    894104        52
平均时间:   1799048   8420048     82.40      1080   1084440  12019140     89.93   6843786    894104        88
[root@centos79 ~]# 

kbmemfree:剩余内存总量

kbmemused:使用的内存总量,使用量=总内存-剩余内存-buffer-cache

%memused:kbmemused 和内存总量(不包括 swap)的一个百分比

kbbuffers:被内核用来作为buffer的内存量

kbcached:被内核用来作为cache的内存量

kbcommit:当前工作负载下,可以保证不出现内存不足的内存量

%commit:指kbcommit占内存/swap的百分率

kbactive:当前活跃内存量。除非万不得已,这部分内存才会被回收

kbinact:当前非活跃内存总量,当内存不足时,这部分内存最容易被内核收回

kbdirty:脏页大小,脏页指的是暂存于内存还没来得及持久化到硬盘的数据

3.4.监控内核表

命令:

sar -v 3 2

[root@centos79 ~]# sar -v 3 2
Linux 3.10.0-1160.102.1.el7.x86_64 (centos79) 	2023年12月01日 	_x86_64_	(2 CPU)10时53分24秒 dentunusd   file-nr  inode-nr    pty-nr
10时53分27秒    202322      6784    139913         6
10时53分30秒    202322      6784    139913         6
平均时间:    202322      6784    139913         6
[root@centos79 ~]# 

3.5.监控内存分页

命令:

sar -B 3 2

[root@centos79 ~]# sar -B 3 2
Linux 3.10.0-1160.102.1.el7.x86_64 (centos79) 	2023年12月01日 	_x86_64_	(2 CPU)10时54分12秒  pgpgin/s pgpgout/s   fault/s  majflt/s  pgfree/s pgscank/s pgscand/s pgsteal/s    %vmeff
10时54分15秒      0.00      5.33    154.33      0.00    207.33      0.00      0.00      0.00      0.00
10时54分18秒      0.00      0.00    934.00      0.00    319.00      0.00      0.00      0.00      0.00
平均时间:      0.00      2.67    544.17      0.00    263.17      0.00      0.00      0.00      0.00
[root@centos79 ~]# 

3.6.监控I/O及传送速率

命令:

sar -b 3 2

[root@centos79 ~]# sar -b 3 2
Linux 3.10.0-1160.102.1.el7.x86_64 (centos79) 	2023年12月01日 	_x86_64_	(2 CPU)10时55分15秒       tps      rtps      wtps   bread/s   bwrtn/s
10时55分18秒      0.00      0.00      0.00      0.00      0.00
10时55分21秒      3.00      0.00      3.00      0.00     76.67
平均时间:      1.50      0.00      1.50      0.00     38.33
[root@centos79 ~]# 

3.7.监控进程队列长度和平均负载状态

命令:

sar -q 3 2

[root@centos79 ~]# sar -q 3 2
Linux 3.10.0-1160.102.1.el7.x86_64 (centos79) 	2023年12月01日 	_x86_64_	(2 CPU)10时56分06秒   runq-sz  plist-sz   ldavg-1   ldavg-5  ldavg-15   blocked
10时56分09秒         0       693      0.09      0.13      0.10         0
10时56分12秒         0       693      0.08      0.13      0.10         0
平均时间:         0       693      0.09      0.13      0.10         0
[root@centos79 ~]# 

3.8.监控系统交换活动在采样时间内的状态

命令:

sar -w 3 2

[root@centos79 ~]# sar -w 3 2
Linux 3.10.0-1160.102.1.el7.x86_64 (centos79) 	2023年12月01日 	_x86_64_	(2 CPU)10时56分52秒    proc/s   cswch/s
10时56分55秒      0.00    770.67
10时56分58秒      0.00    779.67
平均时间:      0.00    775.17
[root@centos79 ~]# 

3.9.监控系统交换活动信息

命令:

sar -W 3 2

[root@centos79 ~]# sar -W 3 2
Linux 3.10.0-1160.102.1.el7.x86_64 (centos79) 	2023年12月01日 	_x86_64_	(2 CPU)10时58分06秒  pswpin/s pswpout/s
10时58分09秒      0.00      0.00
10时58分12秒      0.00      0.00
平均时间:      0.00      0.00
[root@centos79 ~]# 

3.10.监控设备使用情况

命令:

sar -d 3 2

[root@centos79 ~]# sar -d 3 2
Linux 3.10.0-1160.102.1.el7.x86_64 (centos79) 	2023年12月01日 	_x86_64_	(2 CPU)10时59分01秒       DEV       tps  rd_sec/s  wr_sec/s  avgrq-sz  avgqu-sz     await     svctm     %util
10时59分04秒   dev11-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时59分04秒    dev8-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时59分04秒  dev253-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时59分04秒  dev253-1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时59分04秒  dev253-2      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.0010时59分04秒       DEV       tps  rd_sec/s  wr_sec/s  avgrq-sz  avgqu-sz     await     svctm     %util
10时59分07秒   dev11-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时59分07秒    dev8-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时59分07秒  dev253-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时59分07秒  dev253-1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10时59分07秒  dev253-2      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00平均时间:       DEV       tps  rd_sec/s  wr_sec/s  avgrq-sz  avgqu-sz     await     svctm     %util
平均时间:   dev11-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
平均时间:    dev8-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
平均时间:  dev253-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
平均时间:  dev253-1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
平均时间:  dev253-2      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
[root@centos79 ~]# 

3.11.监控网络接口的统计信息

命令:

sar 3 2 -n DEV

[root@centos79 ~]# sar 3 2 -n DEV
Linux 3.10.0-1160.102.1.el7.x86_64 (centos79) 	2023年12月01日 	_x86_64_	(2 CPU)11时00分04秒     IFACE   rxpck/s   txpck/s    rxkB/s    txkB/s   rxcmp/s   txcmp/s  rxmcst/s
11时00分07秒 br-63af6643aa54      0.00      0.00      0.00      0.00      0.00      0.00      0.00
11时00分07秒     ens32      0.00      0.00      0.00      0.00      0.00      0.00      0.00
11时00分07秒 vetha6a8a46      2.67      3.67      0.49      2.37      0.00      0.00      0.00
11时00分07秒 vethc265dbe      0.00      0.00      0.00      0.00      0.00      0.00      0.00
11时00分07秒 veth7bacf9f      0.00      0.00      0.00      0.00      0.00      0.00      0.00
11时00分07秒 veth8e6a01e     54.67     53.67      5.66      3.78      0.00      0.00      0.00
11时00分07秒        lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00
11时00分07秒 virbr0-nic      0.00      0.00      0.00      0.00      0.00      0.00      0.00
11时00分07秒    virbr0      0.00      0.00      0.00      0.00      0.00      0.00      0.00
11时00分07秒 br-806f281c40a3     57.33     57.33      5.37      6.15      0.00      0.00      0.00
11时00分07秒   docker0      0.00      0.00      0.00      0.00      0.00      0.00      0.0011时00分07秒     IFACE   rxpck/s   txpck/s    rxkB/s    txkB/s   rxcmp/s   txcmp/s  rxmcst/s
11时00分10秒 br-63af6643aa54      0.00      0.00      0.00      0.00      0.00      0.00      0.00
11时00分10秒     ens32      0.66      0.66      0.04      0.44      0.00      0.00      0.00
11时00分10秒 vetha6a8a46      4.32      5.98      1.10      3.14      0.00      0.00      0.00
11时00分10秒 vethc265dbe      0.66      0.33      0.10      0.22      0.00      0.00      0.00
11时00分10秒 veth7bacf9f      0.66      0.33      0.10      0.22      0.00      0.00      0.00
11时00分10秒 veth8e6a01e     54.82     53.82      6.17      3.89      0.00      0.00      0.00
11时00分10秒        lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00
11时00分10秒 virbr0-nic      0.00      0.00      0.00      0.00      0.00      0.00      0.00
11时00分10秒    virbr0      0.00      0.00      0.00      0.00      0.00      0.00      0.00
11时00分10秒 br-806f281c40a3     60.47     60.47      6.64      7.47      0.00      0.00      0.00
11时00分10秒   docker0      0.00      0.00      0.00      0.00      0.00      0.00      0.00平均时间:     IFACE   rxpck/s   txpck/s    rxkB/s    txkB/s   rxcmp/s   txcmp/s  rxmcst/s
平均时间: br-63af6643aa54      0.00      0.00      0.00      0.00      0.00      0.00      0.00
平均时间:     ens32      0.33      0.33      0.02      0.22      0.00      0.00      0.00
平均时间: vetha6a8a46      3.49      4.83      0.79      2.76      0.00      0.00      0.00
平均时间: vethc265dbe      0.33      0.17      0.05      0.11      0.00      0.00      0.00
平均时间: veth7bacf9f      0.33      0.17      0.05      0.11      0.00      0.00      0.00
平均时间: veth8e6a01e     54.74     53.74      5.92      3.83      0.00      0.00      0.00
平均时间:        lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00
平均时间: virbr0-nic      0.00      0.00      0.00      0.00      0.00      0.00      0.00
平均时间:    virbr0      0.00      0.00      0.00      0.00      0.00      0.00      0.00
平均时间: br-806f281c40a3     58.90     58.90      6.01      6.81      0.00      0.00      0.00
平均时间:   docker0      0.00      0.00      0.00      0.00      0.00      0.00      0.00
[root@centos79 ~]# 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/194977.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

python scipy.spatial.distance.pdist学习详记——(待完善)

1.Python scipy.spatial.distance.pdist用法及代码示例

分享81个节日PPT,总有一款适合您

分享81个节日PPT&#xff0c;总有一款适合您 81个节日PPT下载链接&#xff1a;https://pan.baidu.com/s/1V0feg5pZ8C1Szycy40CrUw?pwd6666 提取码&#xff1a;6666 Python采集代码下载链接&#xff1a;采集代码.zip - 蓝奏云 学习知识费力气&#xff0c;收集整理更不易…

JDK8特性,Lambda,时间日期,接口增强,Optional,Stream流

目录 JDK8 Lambda 概述 特点 语法 几种基本的写法 方法的引用 几种常见方式 常见的函数式接口 Supplier 生产数据 Consumer 消费数据 Function Predicate LocalDate&LocalTime&LocalDateTime jdk7日期时间存在的问题 设计不合理 时间格式化和解析操作线…

二分类问题中评估模型的示例及释义:召准率、召回率等

1、评估参数定义 1.1、召准率&#xff08;Precision&#xff09; 召准率是衡量模型预测正类标签时的准确度的指标。它计算的是模型预测的正类中真正为正类的比例。换句话说&#xff0c;召准率表示在所有预测为正类的实例中&#xff0c;正确识别为正类的实例所占的比例。 其中…

07_注解与动态代理

注解 什么是注解 注解&#xff08;Annotation&#xff09;&#xff0c;就是 Java 代码里面的特殊标记&#xff0c;例如 Override、Test 等作用&#xff1a;让其他程序根据注解信息来决定怎么执行该程序注意&#xff1a;注解可以用在类上、构造器上、方法上、成员变量上、参数…

SQLserver通过字符串中间截取然后分组

当我们存的数据是json的时候可以全部取出在模糊查询但是有多个重复数据的时候就没办法准确的模糊出来这个时候我们就需要用的字符串截取 --创建函数create FUNCTION [dbo].[Fmax] (str varchar(50),start VARCHAR(50),length VARCHAR(50)) RETURNS varchar(max) AS BEGINDEC…

Spring MVC学习随笔-文件下载和上传(配置文件上传解析器multipartResolver)

学习视频&#xff1a;孙哥说SpringMVC&#xff1a;结合Thymeleaf&#xff0c;重塑你的MVC世界&#xff01;&#xff5c;前所未有的Web开发探索之旅 学习视频&#xff1a;【编程不良人】继spring之后快速入门springmvc,面对SpringMVC不用慌 六、SpringMVC 文件上传下载 6.1 文件…

【最通用版FPGA 实现 SPI 驱动】

最近研究了一下SPI协议的FPGA实现&#xff0c;发现网上很多大佬分享的方法都是针对某一特定的flash芯片或者某一传感器芯片来设计电路结构的。所以想根据SPI&#xff08;Serial Peripheral Interface&#xff09;的基本通讯协议实现一个通用版的SPI Master驱动。SPI在嵌入式领域…

同源策略与跨域

作者简介&#xff1a;大家好&#xff0c;我是smart哥&#xff0c;前中兴通讯、美团架构师&#xff0c;现某互联网公司CTO 联系qq&#xff1a;184480602&#xff0c;加我进群&#xff0c;大家一起学习&#xff0c;一起进步&#xff0c;一起对抗互联网寒冬 不论个人练习还是实际开…

【PUSDN】centos查看日志文件内容,包含某个关键字的前后5行日志内容,centos查看日志的几种方法

简述 centos查看日志的几种方法 centos查看日志文件内容&#xff0c;包含某个关键字的前后5行日志内容 前情提示 系统&#xff1a; 一说 部分截图、链接等因过期、更换域名、MD语法等可能不显示&#xff0c;可联系反馈&#xff08;备注好博文地址&#xff09;&#xff0c…

HR看好的字符函数和字符串处理函数!!!

本篇会加入个人的所谓‘鱼式疯言’❤️❤️❤️鱼式疯言:❤️❤️❤️此疯言非彼疯言,而是理解过并总结出来通俗易懂的大白话,我会尽可能的在每个概念后插入鱼式疯言,帮助大家理解的&#xff0c;可能说的不是那么严谨.但小编初心是能让更多人能接受我们这个概念 前言 在本篇…

mybatis整合(手动添加jar包方式)

操作步骤 创建数据库 建立user表 放入数据 1、创建javaweb工程并添加Jar包 用到的jar包 junit 用于测试 mybatis框架&#xff1a;mybatis-3.5.9.jar mysql数据库&#xff1a;mysql-connector-java-8.0.28.jar 2、添加MyBatis核心配置文件 <?xml version"1.0"…

Leetcode刷题详解——乘积为正数的最长子数组长度

1. 题目链接&#xff1a;1567. 乘积为正数的最长子数组长度 2. 题目描述&#xff1a; 给你一个整数数组 nums &#xff0c;请你求出乘积为正数的最长子数组的长度。 一个数组的子数组是由原数组中零个或者更多个连续数字组成的数组。 请你返回乘积为正数的最长子数组长度。 示…

什么是结构化数据?哪些OCR软件可将图片文字转为结构化数据?

结构化数据是指按照一定的数据模型组织和存储的数据&#xff0c;具有明确的数据类型和数据关系&#xff0c;并且可通过计算机程序进行处理和分析。这种数据通常存储在定义明确的模式中&#xff0c;例如数据库&#xff0c;采用表格的形式存储&#xff0c;每个数据项都有特定的字…

Mover Creator 用户界面

1 “开始”对话框 首次打开 Mover Creator 时&#xff0c;出现的第一个页面是“开始”对话框&#xff0c;如下所示。从这里开始&#xff0c;用户可以选择开始设计飞机、武器或发动机。在上述每种情况下&#xff0c;用户都可以创建新模型或编辑现有模型。 1.1 新建模型 如果用…

Apache Doris 详细教程(二)

5、doris的查询语法 5.1、doris查询语法整体结构 SELECT [ALL | DISTINCT | DISTINCTROW ] -- 对查询字段的结果是否需要去重&#xff0c;还是全部保留等参数 select_expr [, select_expr ...] -- select的查询字段 [FROM table_references [PARTITION…

94基于matlab的蚁群算法 (ACO) 对付的图像边缘检测问题

基于matlab的蚁群算法 (ACO) 对付的图像边缘检测问题。提出基于蚁群算法的边缘检测方法是能够建立一个信息素矩阵表示提出了一种在图像每个像素位置的边缘信息根据大量的蚂蚁的运动有哪些派去在图像上移动。此外&#xff0c;运动这些蚂蚁是由图像的局部变化驱动强度值。数据可更…

U1编译概述

文章目录 基本概念定义一些概念 编译流程词法分析语法分析语义分析、生成中间代码中间代码 代码优化生成目标程序五个阶段中都需要做的两件事符号表管理出错处理 总结 其他概念多层中间表示和遍&#xff08;PASS&#xff09;三端模式课程概述 基本概念 定义 用高级语言编制的…

【Java 基础】18 I/O流

文章目录 1.基本概念2.字节流3.字符流4.标准输入输出5.最佳实践 I/O流&#xff08;Input/Output 流&#xff09;是计算机程序中不可或缺的一部分&#xff0c; 往大了说所有的操作都是IO。Java 提供了强大而灵活的 I/O 框架&#xff0c;支持各种数据的 读取和 写入操作。 1.基…

45 - 多线程性能优化常见问题

1、使用系统命令查看上下文切换 上下文切换常见的监测工具 1.1、Linux 命令行工具之 vmstat 命令 vmstat 是一款指定采样周期和次数的功能性监测工具&#xff0c;我们可以使用它监控进程上下文切换的情况。 vmstat 1 3 命令行代表每秒收集一次性能指标&#xff0c;总共获取 …