20241225在ubuntu22.04.5下使用smartmontools命令查看ssd的寿命

20241225在ubuntu22.04.5下使用smartmontools命令查看ssd的寿命
2024/12/25 15:10


rootroot@rootroot-ThinkBook-16-G5-IRH:~$ sudo apt install smartmontools
rootroot@rootroot-ThinkBook-16-G5-IRH:~$ sudo fdisk -l
Disk /dev/nvme0n1: 3.73 TiB, 4096805658624 bytes, 8001573552 sectors
rootroot@rootroot-ThinkBook-16-G5-IRH:~$ sudo smartctl -l devstat /dev/nvme0n1 -a
rootroot@rootroot-ThinkBook-16-G5-IRH:~$ smartctl -version
rootroot@rootroot-ThinkBook-16-G5-IRH:~$ sudo hdparm -I /dev/nvme0n1


rootroot@rootroot-ThinkBook-16-G5-IRH:~$ 
rootroot@rootroot-ThinkBook-16-G5-IRH:~$ sudo apt install smartmontools
[sudo] password for rootroot: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  chromium-codecs-ffmpeg-extra gstreamer1.0-vaapi libaacs0 libass9 libavformat58 libbdplus0 libblas3 libbluray2 libbs2b0 libchromaprint1 libflashrom1 libflite1 libftdi1-2 libgme0
  libgstreamer-plugins-bad1.0-0 liblilv-0-0 libllvm13 libmysofa1 libnorm1 libopenmpt0 libpgm-5.3-0 libpostproc55 librabbitmq4 librubberband2 libserd-0-0 libsord-0-0 libsratom-0-0 libsrt1.4-gnutls
  libssh-gcrypt-4 libswscale5 libudfread0 libva-wayland2 libvidstab1.1 libzimg2 libzmq5 pocketsphinx-en-us
Use 'sudo apt autoremove' to remove them.
Suggested packages:
  gsmartcontrol smart-notifier mailx | mailutils
The following NEW packages will be installed:
  smartmontools
0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
Need to get 583 kB of archives.
After this operation, 1,980 kB of additional disk space will be used.
0% [Working]y
Get:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-updates/main amd64 smartmontools amd64 7.2-1ubuntu0.1 [583 kB]
Fetched 583 kB in 21s (27.3 kB/s)              
Selecting previously unselected package smartmontools.
(Reading database ... 218828 files and directories currently installed.)
Preparing to unpack .../smartmontools_7.2-1ubuntu0.1_amd64.deb ...
Unpacking smartmontools (7.2-1ubuntu0.1) ...
Setting up smartmontools (7.2-1ubuntu0.1) ...
Created symlink /etc/systemd/system/smartd.service → /lib/systemd/system/smartmontools.service.
Created symlink /etc/systemd/system/multi-user.target.wants/smartmontools.service → /lib/systemd/system/smartmontools.service.
Processing triggers for man-db (2.10.2-1) ...
rootroot@rootroot-ThinkBook-16-G5-IRH:~$ 

rootroot@rootroot-ThinkBook-16-G5-IRH:~$ cat /etc/issue
Ubuntu 22.04.5 LTS \n \l

rootroot@rootroot-ThinkBook-16-G5-IRH:~$ 
rootroot@rootroot-ThinkBook-16-G5-IRH:~$ uname -a
Linux rootroot-ThinkBook-16-G5-IRH 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov  6 17:42:15 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
rootroot@rootroot-ThinkBook-16-G5-IRH:~$ 
rootroot@rootroot-ThinkBook-16-G5-IRH:~$ 


参考资料:
百度:ubuntu查看ssd寿命


https://www.sysgeek.cn/check-ssd-health-in-linux/
5 种简单方法,在 Linux 中检查 SSD 健康状态
发布日期:2023-11-15 分类:Linux 阅读(12786) 评论(0) 赞(1)


https://blog.csdn.net/zhzgbf/article/details/128868847
linux 查看 SSD 固态硬盘 使用寿命

linux 下面只有 smartmontools 这一个工具,并且只对像三星和 intel 这样的大厂支持良好,其它品牌可能会出现无法获取数据的情况

安装 smartmontools

apt install smartmontools -y   # ubuntu 系统命令
yum install -y smartmontools   # centos 系统命令
使用以下命令查看SSD硬盘输出( /dev/sdb 是需要查看的SSD固态硬盘),其中最后一个最重要和直观 “ Percentage Used Endurance Indicator ” ,单位是百分比,新的是 0%,我现在的是 1%。

smartctl -l devstat /dev/sdb


详细的LOG:
rootroot@rootroot-ThinkBook-16-G5-IRH:~$ 
rootroot@rootroot-ThinkBook-16-G5-IRH:~$ 
rootroot@rootroot-ThinkBook-16-G5-IRH:~$ sudo apt install smartmontools
[sudo] password for rootroot: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  chromium-codecs-ffmpeg-extra gstreamer1.0-vaapi libaacs0 libass9 libavformat58 libbdplus0 libblas3 libbluray2 libbs2b0 libchromaprint1 libflashrom1 libflite1 libftdi1-2 libgme0
  libgstreamer-plugins-bad1.0-0 liblilv-0-0 libllvm13 libmysofa1 libnorm1 libopenmpt0 libpgm-5.3-0 libpostproc55 librabbitmq4 librubberband2 libserd-0-0 libsord-0-0 libsratom-0-0 libsrt1.4-gnutls
  libssh-gcrypt-4 libswscale5 libudfread0 libva-wayland2 libvidstab1.1 libzimg2 libzmq5 pocketsphinx-en-us
Use 'sudo apt autoremove' to remove them.
Suggested packages:
  gsmartcontrol smart-notifier mailx | mailutils
The following NEW packages will be installed:
  smartmontools
0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
Need to get 583 kB of archives.
After this operation, 1,980 kB of additional disk space will be used.
0% [Working]y
Get:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-updates/main amd64 smartmontools amd64 7.2-1ubuntu0.1 [583 kB]
Fetched 583 kB in 21s (27.3 kB/s)              
Selecting previously unselected package smartmontools.
(Reading database ... 218828 files and directories currently installed.)
Preparing to unpack .../smartmontools_7.2-1ubuntu0.1_amd64.deb ...
Unpacking smartmontools (7.2-1ubuntu0.1) ...
Setting up smartmontools (7.2-1ubuntu0.1) ...
Created symlink /etc/systemd/system/smartd.service → /lib/systemd/system/smartmontools.service.
Created symlink /etc/systemd/system/multi-user.target.wants/smartmontools.service → /lib/systemd/system/smartmontools.service.
Processing triggers for man-db (2.10.2-1) ...
rootroot@rootroot-ThinkBook-16-G5-IRH:~$ 

rootroot@rootroot-ThinkBook-16-G5-IRH:~$ cat /etc/issue
Ubuntu 22.04.5 LTS \n \l

rootroot@rootroot-ThinkBook-16-G5-IRH:~$ 
rootroot@rootroot-ThinkBook-16-G5-IRH:~$ uname -a
Linux rootroot-ThinkBook-16-G5-IRH 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov  6 17:42:15 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
rootroot@rootroot-ThinkBook-16-G5-IRH:~$ 
rootroot@rootroot-ThinkBook-16-G5-IRH:~$ 
rootroot@rootroot-ThinkBook-16-G5-IRH:~$ sudo fdisk -l
Disk /dev/loop0: 61.89 MiB, 64901120 bytes, 126760 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop1: 4 KiB, 4096 bytes, 8 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop2: 63.7 MiB, 66789376 bytes, 130448 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop3: 73.87 MiB, 77459456 bytes, 151288 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop4: 155.63 MiB, 163188736 bytes, 318728 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop5: 349.7 MiB, 366682112 bytes, 716176 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop6: 248.76 MiB, 260841472 bytes, 509456 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop7: 505.09 MiB, 529625088 bytes, 1034424 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/nvme0n1: 3.73 TiB, 4096805658624 bytes, 8001573552 sectors
Disk model: Lexar SSD ARES 4TB                      
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: B13A60C4-1CCC-4222-9F95-76DFC122ED97

Device              Start        End    Sectors   Size Type
/dev/nvme0n1p1       2048     206847     204800   100M EFI System
/dev/nvme0n1p2     206848     239615      32768    16M Microsoft reserved
/dev/nvme0n1p3     239616  875161852  874922237 417.2G Microsoft basic data
/dev/nvme0n1p4  875163648 2017761279 1142597632 544.8G Microsoft basic data
/dev/nvme0n1p5 8000360448 8001570815    1210368   591M Windows recovery environment
/dev/nvme0n1p6 2017761280 2018719743     958464   468M Linux filesystem
/dev/nvme0n1p7 2018719744 2049970175   31250432  14.9G Linux swap
/dev/nvme0n1p8 2049970176 7863642111 5813671936   2.7T Linux filesystem
/dev/nvme0n1p9 7863642112 8000360447  136718336  65.2G Linux filesystem

Partition table entries are not in disk order.


Disk /dev/loop8: 81.26 MiB, 85209088 bytes, 166424 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop9: 91.69 MiB, 96141312 bytes, 187776 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop10: 45.86 MiB, 48087040 bytes, 93920 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop11: 44.3 MiB, 46448640 bytes, 90720 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop12: 284 KiB, 290816 bytes, 568 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop13: 568 KiB, 581632 bytes, 1136 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop14: 12.2 MiB, 12791808 bytes, 24984 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
rootroot@rootroot-ThinkBook-16-G5-IRH:~$ 

rootroot@rootroot-ThinkBook-16-G5-IRH:~$ 
rootroot@rootroot-ThinkBook-16-G5-IRH:~$ smartctl -l devstat /dev/nvme0n1
smartctl 7.2 2020-12-30 r5155 [x86_64-linux-6.8.0-49-generic] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

Smartctl open device: /dev/nvme0n1 failed: Permission denied
rootroot@rootroot-ThinkBook-16-G5-IRH:~$ 
rootroot@rootroot-ThinkBook-16-G5-IRH:~$ sudo smartctl -l devstat /dev/nvme0n1
smartctl 7.2 2020-12-30 r5155 [x86_64-linux-6.8.0-49-generic] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

NVMe device successfully opened

Use 'smartctl -a' (or '-x') to print SMART (and more) information

rootroot@rootroot-ThinkBook-16-G5-IRH:~$ sudo smartctl -l devstat /dev/nvme0n1 -a
smartctl 7.2 2020-12-30 r5155 [x86_64-linux-6.8.0-49-generic] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Number:                       Lexar SSD ARES 4TB
Serial Number:                      PB1602R001379P2202
Firmware Version:                   12237
PCI Vendor/Subsystem ID:            0x1d97
IEEE OUI Identifier:                0xcaf25b
Total NVM Capacity:                 4,096,805,658,624 [4.09 TB]
Unallocated NVM Capacity:           0
Controller ID:                      0
NVMe Version:                       2.0
Number of Namespaces:               1
Namespace 1 Size/Capacity:          4,096,805,658,624 [4.09 TB]
Namespace 1 Formatted LBA Size:     512
Namespace 1 IEEE EUI-64:            caf25b 035e0001a4
Local Time is:                      Wed Dec 25 15:14:23 2024 CST
Firmware Updates (0x14):            2 Slots, no Reset required
Optional Admin Commands (0x0017):   Security Format Frmw_DL Self_Test
Optional NVM Commands (0x005f):     Comp Wr_Unc DS_Mngmt Wr_Zero Sav/Sel_Feat Timestmp
Log Page Attributes (0x0a):         Cmd_Eff_Lg Telmtry_Lg
Maximum Data Transfer Size:         128 Pages
Warning  Comp. Temp. Threshold:     90 Celsius
Critical Comp. Temp. Threshold:     95 Celsius

Supported Power States
St Op     Max   Active     Idle   RL RT WL WT  Ent_Lat  Ex_Lat
 0 +     6.50W       -        -    0  0  0  0        0       0
 1 +     5.80W       -        -    1  1  1  1        0       0
 2 +     3.60W       -        -    2  2  2  2        0       0
 3 -   0.0500W       -        -    3  3  3  3     5000   10000
 4 -   0.0025W       -        -    4  4  4  4     8000   41000

Supported LBA Sizes (NSID 0x1)
Id Fmt  Data  Metadt  Rel_Perf
 0 +     512       0         0

=== START OF SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

SMART/Health Information (NVMe Log 0x02)
Critical Warning:                   0x00
Temperature:                        34 Celsius
Available Spare:                    100%
Available Spare Threshold:          10%

Percentage Used:                    0%
Data Units Read:                    3,045,211 [1.55 TB]
Data Units Written:                 3,637,083 [1.86 TB]

Host Read Commands:                 23,836,528
Host Write Commands:                19,141,439
Controller Busy Time:               19
Power Cycles:                       12
Power On Hours:                     12
Unsafe Shutdowns:                   3
Media and Data Integrity Errors:    0
Error Information Log Entries:      0
Warning  Comp. Temperature Time:    0
Critical Comp. Temperature Time:    0
Temperature Sensor 1:               34 Celsius
Temperature Sensor 2:               28 Celsius

Error Information (NVMe Log 0x01, 16 of 64 entries)
No Errors Logged

rootroot@rootroot-ThinkBook-16-G5-IRH:~$ 
rootroot@rootroot-ThinkBook-16-G5-IRH:~$ smartctl -version
smartctl 7.2 2020-12-30 r5155 [x86_64-linux-6.8.0-49-generic] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=======> INVALID ARGUMENT TO -v: ersion
=======> VALID ARGUMENTS ARE:
    help
    N,raw8[:012345rvwz][,ATTR_NAME]
    N,raw16[:012345rvwz][,ATTR_NAME]
    N,raw48[:012345rvwz][,ATTR_NAME]
    N,hex48[:012345rvwz][,ATTR_NAME]
    N,raw56[:012345rvwz][,ATTR_NAME]
    N,hex56[:012345rvwz][,ATTR_NAME]
    N,raw64[:012345rvwz][,ATTR_NAME]
    N,hex64[:012345rvwz][,ATTR_NAME]
    N,raw16(raw16)[:012345rvwz][,ATTR_NAME]
    N,raw16(avg16)[:012345rvwz][,ATTR_NAME]
    N,raw24(raw8)[:012345rvwz][,ATTR_NAME]
    N,raw24/raw24[:012345rvwz][,ATTR_NAME]
    N,raw24/raw32[:012345rvwz][,ATTR_NAME]
    N,sec2hour[:012345rvwz][,ATTR_NAME]
    N,min2hour[:012345rvwz][,ATTR_NAME]
    N,halfmin2hour[:012345rvwz][,ATTR_NAME]
    N,msec24hour32[:012345rvwz][,ATTR_NAME]
    N,tempminmax[:012345rvwz][,ATTR_NAME]
    N,temp10x[:012345rvwz][,ATTR_NAME]
    9,halfminutes
    9,minutes
    9,seconds
    9,temp
    192,emergencyretractcyclect
    193,loadunload
    194,10xCelsius
    194,unknown
    197,increasing
    198,offlinescanuncsectorct
    198,increasing
    200,writeerrorcount
    201,detectedtacount
    220,temp
<=======

Use smartctl -h to get a usage summary

rootroot@rootroot-ThinkBook-16-G5-IRH:~$ 
rootroot@rootroot-ThinkBook-16-G5-IRH:~$ sudo hdparm -I /dev/nvme0n1
[sudo] password for rootroot: 

/dev/nvme0n1:
rootroot@rootroot-ThinkBook-16-G5-IRH:~$ 


fdisk

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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

大数据学习之Redis 缓存数据库二,Scala分布式语言一

一.Redis 缓存数据库二 26.Redis数据安全_AOF持久化机制 27.Redis数据安全_企业中该如何选择持久化机制 28.Redis集群_主从复制概念 29.Redis集群_主从复制搭建 30.Redis集群_主从复制原理剖析 31.Redis集群_哨兵监控概述 32.Redis集群_配置哨兵监控 33.Redis集群_哨兵监控原理…

Datawhale AI 冬令营学习笔记-零编程基础制作井字棋小游戏

井字棋小游戏是通过豆包MarsCode实现的&#xff0c;没有改动任何的代码&#xff0c;全部是通过对话让AI进行优化和改进。 开始进入正题&#xff1a;进入豆包MarsCode在线IDE&#xff0c;直接点击上方蓝字&#xff0c;或复制链接打开: 豆包 MarsCode - 编程助手。 IDE界面&…

vscode+编程AI配置、使用说明

文章目录 [toc]1、概述2、github copilot2.1 配置2.2 使用文档2.3 使用说明 3、文心快码&#xff08;Baidu Comate&#xff09;3.1 配置3.2 使用文档3.3 使用说明 4、豆包&#xff08;MarsCode&#xff09;4.1 配置4.2 使用文档4.3 使用说明 5、通义灵码&#xff08;TONGYI Lin…

Redis数据结构和内部编码以及单线程架构

个人主页&#xff1a;C忠实粉丝 欢迎 点赞&#x1f44d; 收藏✨ 留言✉ 加关注&#x1f493;本文由 C忠实粉丝 原创 Redis数据结构和内部编码以及单线程架构 收录于专栏[redis] 本专栏旨在分享学习Redis的一点学习笔记&#xff0c;欢迎大家在评论区交流讨论&#x1f48c; 目录 …

虚拟机Hyper-V,安装网络宝塔Docker

我下载的是centos-min大小1G&#xff0c;安装后没网络&#xff0c; 关闭防火墙&#xff0c;网络&#xff0c;修改onBootyes,这里需要看下network-Scripts下有什么文件。 然后就可以访问网络了 虚拟机的设置也是默认就好 网络需要设置允许共享-重要 urlhttps://download.bt.cn/i…

红魔电竞PadPro平板解BL+ROOT权限-KernelSU+LSPosed框架支持

红魔Padpro设备目前官方未开放解锁BL&#xff0c;也阉割了很多解锁BL指令&#xff0c;造成大家都不能自主玩机。此规则从红魔8开始&#xff0c;就一直延续下来&#xff0c;后续的机型大概率也是一样的情况。好在依旧有开发者进行适配研究&#xff0c;目前红魔PadPro平板&#x…

Linux-----进程处理(文件IO资源使用)

下面代码是通过父进程和子进程对同一个文件IO资源进行操作&#xff0c;父进程和子进程都对这个进程进行写入操作&#xff0c;我们都知道这两个进程实际上是并发的&#xff0c;所以需要一个同步机制来去操作同一个资源&#xff08;后面再深入去说明同步的api&#xff0c;这里使用…

EdgeX Core Service 核心服务之 Core Command 命令

EdgeX Core Service 核心服务之 Core Command 命令 一、概述 Core-command(通常称为命令和控制微服务)可以代表以下角色向设备和传感器发出命令或动作: EdgeX Foundry中的其他微服务(例如,本地边缘分析或规则引擎微服务)EdgeX Foundry与同一系统上可能存在的其他应用程序…

【LeetCode】94.二叉树的中序遍历

题目链接&#xff1a; 94.二叉树的中序遍历 题目描述&#xff1a; 题解&#xff1a;&#xff08;递归算法实现二叉树中序遍历&#xff09; 二叉树的中序遍历&#xff1a;按照访问左子树——根节点——右子树的方式遍历这棵树&#xff0c;而在访问左子树或者右子树的时候我们按…

LeetCode:404.左叶子之和

跟着carl学算法&#xff0c;本系列博客仅做个人记录&#xff0c;建议大家都去看carl本人的博客&#xff0c;写的真的很好的&#xff01; 代码随想录 LeetCode&#xff1a;404.左叶子之和 给定二叉树的根节点 root &#xff0c;返回所有左叶子之和。 示例 1&#xff1a; 输入: …

AI对话机器人简单实现--智谱BigModel+SpringBoot+Vue2+ElementUI

成品展示 一、首先去注册个账号然后申请个API keys 二、引入依赖 <dependency><groupId>cn.bigmodel.openapi</groupId><artifactId>oapi-java-sdk</artifactId><version>release-V4-2.3.0</version></dependency><depend…

每天40分玩转Django:Django静态文件

Django静态文件 一、今日学习内容概述 学习模块重要程度主要内容静态文件配置⭐⭐⭐⭐⭐基础设置、路径配置CDN集成⭐⭐⭐⭐⭐CDN配置、资源优化静态文件处理⭐⭐⭐⭐压缩、版本控制部署优化⭐⭐⭐⭐性能优化、缓存策略 二、基础配置 # settings.py import os# 静态文件配置…

改进爬山算法之一:随机化爬山法(Stochastic Hill Climbing,SHC)

随机化爬山法(Stochastic Hill Climbing),也被称为随机爬山法,是一种基于搜索算法的优化方法,是爬山算法的一个变种,它通过引入随机性来减少算法陷入局部最优解的风险,并增加搜索解空间的能力。这种方法特别适合于解决那些具有多个局部最优解的优化问题。 一、算法思想 …

农家乐系统|Java|SSM|VUE| 前后端分离

【技术栈】 1⃣️&#xff1a;架构: B/S、MVC 2⃣️&#xff1a;系统环境&#xff1a;Windowsh/Mac 3⃣️&#xff1a;开发环境&#xff1a;IDEA、JDK1.8、Maven、Mysql5.7 4⃣️&#xff1a;技术栈&#xff1a;Java、Mysql、SSM、Mybatis-Plus、VUE、jquery,html 5⃣️数据库可…

探究音频丢字位置和丢字时间对pesq分数的影响

丢字的本质 丢字的本质是在一段音频中一小段数据变为0 丢字对主观感受的影响 1. 丢字位置 丢字的位置对感知效果有很大影响。如果丢字发生在音频信号的静音部分或低能量部分&#xff0c;感知可能不明显&#xff1b;而如果丢字发生在高能量部分或关键音素上&#xff0c;感知…

《Java源力物语》-3.空值猎手

~犬&#x1f4f0;余~ “我欲贱而贵&#xff0c;愚而智&#xff0c;贫而富&#xff0c;可乎&#xff1f; 曰&#xff1a;其唯学乎” \quad 夜色渐深&#xff0c;在一处偏僻小径上&#xff0c;月光透过浓密的源力云层&#xff0c;在地面上投下斑驳的光影。String正独自练习着刚从…

产品初探Devops!以及AI如何赋能Devops?

DevOps源自Development&#xff08;开发&#xff09;和Operations&#xff08;运维&#xff09;的组合&#xff0c;是一种新的软件工程理念&#xff0c;旨在打破传统软件工程方法中“开发->测试->运维”的割裂模式&#xff0c;强调端到端高效一致的交付流程&#xff0c;实…

使用 OpenCV 在图像中添加文字

在图像处理任务中&#xff0c;我们经常需要将文本添加到图像中。OpenCV 提供了 cv2.putText() 函数&#xff0c;可以很方便地在图像上绘制文本&#xff0c;支持多种字体、颜色、大小和位置等参数。 本文将详细介绍如何使用 OpenCV 在图像中添加文字&#xff0c;介绍 cv2.putTe…

接口测试Day-02-安装postman项目推送Gitee仓库

postman安装 下载 Postman&#xff08;已提供安装包&#xff0c;此步可以跳过&#xff09; https://www.postman.com/downloads/安装 Postman 安装Postman插件newman 要想给 postman 安装 newman 插件&#xff0c;必须 先 安装 node.js。 这是前提&#xff01; 安装node.js 可能…

MySQL索引为什么是B+树

MySQL索引为什么是B树 索引是帮助MySQL高效获取数据的数据结构&#xff0c;在数据之外&#xff0c;数据库还维护着满足特定查找算法的数据结构B树&#xff0c;这些数据结果以某种特定的方式引用数据&#xff0c;这样就可以在这些数据结构上实现高级查找算法&#xff0c;提升数据…