当前位置: 首页 > news >正文

Oracle Patch清理

场景:
在对Oracle安装补丁后,会发现OS上被占用了大量的空间,本文档清理Opatch过程中的一些文件,释放空间

参考文档:
Can You Delete $ORACLE_HOME/.patch_storage Directory ? (Doc ID 403218.1)
How To Avoid Disk Full Issues Because OPatch Backups Take Big Amount Of Disk Space. (Doc ID 550522.1)

-- 查看$ORACLE_HOME下的隐藏文件夹.patch_storage。 可以看到之前的补丁过程,产生的一些文件。这些文件主要用于rollback补丁,如果不需要,可以清除,以释放空间。

[oracle@19ctest .patch_storage]$ du -sm *
1       29517242_Apr_17_2019_23_27_10
1       29585399_Apr_9_2019_19_12_47
2314    35042068_Apr_6_2023_15_25_04
1941    35320081_Jul_15_2023_12_54_11
2071    35643107_Oct_3_2023_13_34_29
1939    35943157_Jan_13_2024_05_42_55
2138    36233263_Apr_8_2024_17_16_56
1       interim_inventory.txt
1       LatestOPatchSession.properties
1       NApply
1       newdirs.txt
1       record_inventory.txt
[oracle@19ctest .patch_storage]$ pwd
/u01/app/oracle/product/19.0.0/db_1/.patch_storage
[oracle@19ctest .patch_storage]$ 

-- /u01目录剩余17G 

[oracle@19ctest .patch_storage]$ df -h
Filesystem                   Size  Used Avail Use% Mounted on
devtmpfs                     4.3G     0  4.3G   0% /dev
tmpfs                        4.4G     0  4.4G   0% /dev/shm
tmpfs                        4.4G  8.8M  4.4G   1% /run
tmpfs                        4.4G     0  4.4G   0% /sys/fs/cgroup
/dev/mapper/ol_19cdg01-root   17G  4.1G   13G  24% /
/dev/sdc1                    120G   74G   47G  62% /oradata
/dev/sdd1                    120G   60G   61G  50% /arch
/dev/sda1                   1014M  169M  846M  17% /boot
/dev/sde1                    100G   24G   76G  24% /mysql
/dev/sdf1                    120G   47G   74G  39% /oradatapdb
/dev/sdb1                     40G   24G   17G  59% /u01
tmpfs                        883M     0  883M   0% /run/user/0
[oracle@19ctest .patch_storage]$ 

-- opatch clean的帮助,该命令清除.patch_storage directory文件夹下的'restore.sh,make.txt' files and 'scratch,backup' 

[oracle@19ctest ~]$ opatch util cleanup -help
Oracle Interim Patch Installer version 12.2.0.1.41
Copyright (c) 2024, Oracle Corporation.  All rights reserved.DESCRIPTIONThis utility cleans up 'restore.sh,make.txt' files and 'scratch,backup' directories of the.patch_storage directory of Oracle Home.If -ps option is used, then, it cleans the above specified areas only for that patch, else for all patches under ORACLE_HOME/.patch_storage. You will be still able torollback patches after this cleanup.SYNTAX
opatch util cleanup  [-invPtrLoc <Path to oraInst.loc> ][-jre <LOC> ] [-oh <ORACLE_HOME> ][-silent] [-report][-ps <patch ID with time stamp>, this willbe located under ORACLE_HOME/.patch_storage/]OPTIONS   -invPtrLocUsed to locate the oraInst.loc file. Needed when theinstallation used the -invPtrLoc flag. This should bethe path to the oraInst.loc file.-jreThis option tells OPatch to use JRE (java) from thespecified location instead of the default locationunder Oracle Home. Both -jdk and -jre options cannotbe specified together. OPatch will display error inthat case.-ohThe oracle home to work on. This takes precedence overthe environment variable ORACLE_HOME.-psThis option is used to specify the Patch ID with timestamp.This Patch ID with timestamp should be the same as in.patch_storage directory.A directory by this name will be present underORACLE_HOME/.patch_storage. If this directory is specifiedand is valid, then the contents specified in the descriptionwill be cleaned up only for this patch. Otherwise, all patchrelated directories will be acted upon by this utility.-silent In silent mode, the cleanup always takes place.-report Prints the operations without actually executing them.OPatch succeeded.
[oracle@19ctest ~]$ 

-- 从清理过程看,会清理'restore.sh,make.txt' files and 'scratch,backup' directories.但仍然可以对补丁进行rollback 

[oracle@19ctest ~]$ opatch util cleanup
Oracle Interim Patch Installer version 12.2.0.1.41
Copyright (c) 2024, Oracle Corporation.  All rights reserved.Oracle Home       : /u01/app/oracle/product/19.0.0/db_1
Central Inventory : /u01/app/oraInventoryfrom           : /u01/app/oracle/product/19.0.0/db_1/oraInst.loc
OPatch version    : 12.2.0.1.41
OUI version       : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.0.0/db_1/cfgtoollogs/opatch/opatch2024-05-08_13-30-06PM_1.logInvoking utility "cleanup"
OPatch will clean up 'restore.sh,make.txt' files and 'scratch,backup' directories.
You will be still able to rollback patches after this cleanup.
Do you want to proceed? [y|n]
y
User Responded with: YBackup area for restore has been cleaned up. For a complete list of files/directories
deleted, Please refer log file.OPatch succeeded.
[oracle@19ctest ~]$ 

一些log 

[May 8, 2024 1:30:11 PM] [INFO]     [OPSR-MEMORY] Loaded all one offs from inventory. Heap memory in use: 29 (MB)
[May 8, 2024 1:30:11 PM] [INFO]     [OPSR-TIME] Raw inventory loaded successfully
[May 8, 2024 1:30:11 PM] [INFO]     Invoking utility "cleanup"
[May 8, 2024 1:30:11 PM] [INFO]     [OPSR-TIME] Cleaning up backup
[May 8, 2024 1:30:11 PM] [INFO]     OPatch will clean up 'restore.sh,make.txt' files and 'scratch,backup' directories.You will be still able to rollback patches after this cleanup.Do you want to proceed? [y|n]

-- 执行完毕后,貌似没有变化,可能和自己环境有关(19年开始测试补丁,基本上每个季度都测试,后面把又把数据库用RMAN做了迁移,又转换成了PDB模式)。

[oracle@19ctest ~]$ df -h
Filesystem                   Size  Used Avail Use% Mounted on
devtmpfs                     4.3G     0  4.3G   0% /dev
tmpfs                        4.4G     0  4.4G   0% /dev/shm
tmpfs                        4.4G  8.8M  4.4G   1% /run
tmpfs                        4.4G     0  4.4G   0% /sys/fs/cgroup
/dev/mapper/ol_19cdg01-root   17G  4.1G   13G  24% /
/dev/sdc1                    120G   74G   47G  62% /oradata
/dev/sdd1                    120G   60G   61G  50% /arch
/dev/sda1                   1014M  169M  846M  17% /boot
/dev/sde1                    100G   24G   76G  24% /mysql
/dev/sdf1                    120G   47G   74G  39% /oradatapdb
/dev/sdb1                     40G   24G   17G  59% /u01
tmpfs                        883M     0  883M   0% /run/user/0
[oracle@19ctest ~]$ 

-- 也可能和log中的以下有关 

[oracle@19ctest db_1]$ tail -f /u01/app/oracle/product/19.0.0/db_1/cfgtoollogs/opatch/opatch2024-05-08_13-30-06PM_1.log
[May 8, 2024 1:30:59 PM] [INFO]     Cannot delete as either pathToBeDeleted is empty or it does not contain .patch_storage :
[May 8, 2024 1:30:59 PM] [INFO]     Cannot delete as either pathToBeDeleted is empty or it does not contain .patch_storage :
[May 8, 2024 1:30:59 PM] [INFO]     Cannot delete as either pathToBeDeleted is empty or it does not contain .patch_storage :
[May 8, 2024 1:30:59 PM] [INFO]     Cannot delete as either pathToBeDeleted is empty or it does not contain .patch_storage :
[May 8, 2024 1:30:59 PM] [INFO]     Cannot delete as either pathToBeDeleted is empty or it does not contain .patch_storage :
[May 8, 2024 1:30:59 PM] [INFO]     Cannot delete as either pathToBeDeleted is empty or it does not contain .patch_storage :
[May 8, 2024 1:30:59 PM] [INFO]     Cannot delete as either pathToBeDeleted is empty or it does not contain .patch_storage :
[May 8, 2024 1:30:59 PM] [INFO]     Cannot delete as either pathToBeDeleted is empty or it does not contain .patch_storage :
[May 8, 2024 1:30:59 PM] [INFO]     [OPSR-TIME] Loading cooked inventory

-- 查看到的补丁

SYS@cdbtest SQL> select comments from dba_registry_history;COMMENTS
--------------------------------------------------------------------------------
RDBMS_19.23.0.0.0DBRU_LINUX.X64_240405
Patch applied from 19.3.0.0.0 to 19.21.0.0.0: Release_Update - 230930151951
Patch applied from 19.21.0.0.0 to 19.22.0.0.0: Release_Update - 240104023954
Patch applied from 19.22.0.0.0 to 19.23.0.0.0: Release_Update - 240406004238SYS@cdbtest SQL> alter session set container =test;Session altered.SYS@cdbtest SQL> select comments from dba_registry_history;COMMENTS
--------------------------------------------------------------------------------
RDBMS_19.23.0.0.0DBRU_LINUX.X64_240405
Patch applied on 19.3.0.0.0: Release_Update - 190410122720
Patch applied from 19.3.0.0.0 to 19.5.0.0.0: Release_Update - 190909180549
Patch applied from 19.5.0.0.0 to 19.11.2.0.0: Release_Update_Revision - 21100717
1159RAN jvmpsu.sql
OJVM RU post-install
Patch rolled back from 19.11.2.0.0 to 19.11.0.0.0: Release_Update - 210413004009
Patch applied from 19.11.0.0.0 to 19.14.0.0.0: Release_Update - 211225122123
Patch applied from 19.14.0.0.0 to 19.15.0.0.0: Release_Update - 220331125408COMMENTS
--------------------------------------------------------------------------------
Patch applied from 19.15.0.0.0 to 19.17.0.0.0: Release_Update - 220924224051
Patch applied from 19.17.0.0.0 to 19.18.0.0.0: Release_Update - 230111171738
Patch applied on 19.18.0.0.0: Release_Update - 230111171738
Patch applied on 19.18.0.0.0: Release_Update - 230111171738
Patch applied from 19.18.0.0.0 to 19.19.0.0.0: Release_Update - 230322020406
Patch applied from 19.19.0.0.0 to 19.20.0.0.0: Release_Update - 230715022800
Patch applied from 19.20.0.0.0 to 19.21.0.0.0: Release_Update - 230930151951
Patch applied on 19.21.0.0.0: Release_Update - 230930151951
Patch applied on 19.21.0.0.0: Release_Update - 230930151951
Patch applied on 19.21.0.0.0: Release_Update - 230930151951
Patch applied on 19.21.0.0.0: Release_Update - 230930151951COMMENTS
--------------------------------------------------------------------------------
Patch applied on 19.21.0.0.0: Release_Update - 230930151951
Patch applied on 19.21.0.0.0: Release_Update - 230930151951
Patch applied on 19.21.0.0.0: Release_Update - 230930151951
OJVM RU post-deinstall
Patch applied on 19.21.0.0.0: Release_Update - 230930151951
Patch applied from 19.21.0.0.0 to 19.22.0.0.0: Release_Update - 240104023954
Patch applied from 19.22.0.0.0 to 19.23.0.0.0: Release_Update - 24040600423827 rows selected.SYS@cdbtest SQL> 

-- 也可以手工清除,官网上对于手工清除,是这样说明的 

Additionally, further cleanup of the $ORACLE_HOME/.patch_storage is possible if there are directories from patches applied to previous versions. This can be done manually as follows:

1.  run command:

$ opatch lsinventory

2.  Remove all the sub-directories from $ORACLE_HOME/.patch_storage that are not present in the list of installed patches. Directory names would be prefaced with the patchid for example:

13343438_<timestamp>

example to find sub-directories : $ opatch lsinventory | grep -E "(^Patch.*applied)|(^Sub-patch)"

Note: List of patches include the sub patches of install Bundle patches, PSU, GI PSU.  Hence you should NOT remove the sub patch folders.

[oracle@19ctest ~]$ opatch lsinventory | grep -E "(^Patch.*applied)|(^Sub-patch)"
Patch  36233263     : applied on Fri Apr 19 08:54:31 CST 2024
Patch  29585399     : applied on Thu Apr 18 15:21:33 CST 2019
[oracle@19ctest ~]$ 

-- 手工清理掉

rm -rf  29517242_Apr_17_2019_23_27_10
rm -rf  35042068_Apr_6_2023_15_25_04
rm -rf  35320081_Jul_15_2023_12_54_11
rm -rf  35643107_Oct_3_2023_13_34_29
rm -rf  35943157_Jan_13_2024_05_42_55

--清理后空间,剩余25G 

[oracle@19ctest .patch_storage]$ df -h
Filesystem                   Size  Used Avail Use% Mounted on
devtmpfs                     4.3G     0  4.3G   0% /dev
tmpfs                        4.4G     0  4.4G   0% /dev/shm
tmpfs                        4.4G  8.8M  4.4G   1% /run
tmpfs                        4.4G     0  4.4G   0% /sys/fs/cgroup
/dev/mapper/ol_19cdg01-root   17G  4.1G   13G  24% /
/dev/sdc1                    120G   74G   47G  62% /oradata
/dev/sdd1                    120G   60G   61G  50% /arch
/dev/sda1                   1014M  169M  846M  17% /boot
/dev/sde1                    100G   24G   76G  24% /mysql
/dev/sdf1                    120G   47G   74G  39% /oradatapdb
/dev/sdb1                     40G   16G   25G  39% /u01
tmpfs                        883M     0  883M   0% /run/user/0
[oracle@19ctest .patch_storage]$ 

END

相关文章:

Oracle Patch清理

场景&#xff1a; 在对Oracle安装补丁后&#xff0c;会发现OS上被占用了大量的空间&#xff0c;本文档清理Opatch过程中的一些文件&#xff0c;释放空间 参考文档&#xff1a; Can You Delete $ORACLE_HOME/.patch_storage Directory ? (Doc ID 403218.1) How To Avoid Disk …...

Redis-三主三从高可用集群搭建

正式搭建之前&#xff0c;注意事项&#xff08;坑&#xff09;提前放到最开始&#xff0c;也可以出问题回来看&#xff0c; &#xff08;1&#xff09;第二步中最好将配置文件中的logfile自定义一个目录&#xff0c;以便于在第五步中启动出错的时候迅速定位错误。 &#xff0…...

ImageMagick

Linux 安装 sudo apt install php8.2-imagick Windows 安装 下载 ImageMagick ImageMagick – Download 安装并将 D:\Program Files\ImageMagick-7.1.1-Q16-HDRI 加入到系统环境变量 path 中&#xff0c; 或者将 CORE_RL_*.dll 复制到 c:\windows\system32 下 下载 php 扩展…...

攻防世界-web-command_execution

题目&#xff1a; 原理&#xff1a; | 的作用为将前一个命令的结果传递给后一个命令作为输入 &&的作用是前一条命令执行成功时&#xff0c;才执行后一条命令 方法一&#xff1a; 第一步&#xff1a; 1.打开浏览器&#xff0c;在文本框内输入127.0.0.1 | find / -name…...

go语言自定义排序接口Interface实现示例 sort.Sort(data Interface) 快速排序 pdqsort

go语言sort.Sort(data Interface) 排序接口自定义排序实现&#xff0c;golang里面的sort包中的Sort方法底层使用的是 pdqsort的一个快速排序算法&#xff0c; 我们可以将要排序的对象实现Interface接口后直接丢个这个函数即可自动按照我们指定的方式进行数据快速排序。 sort函…...

RIP动态路由协议详解

目录 一&#xff1a;RIP协议的基本信息 二&#xff1a;RIP协议中的更新方式 三&#xff1a;RIP协议中的计时器 定时更新器&#xff08;UPDATE timer&#xff09; 无效定时器&#xff08;invalid Timer&#xff09; 垃圾收集定时器&#xff08;garbage collection timer&a…...

ROS2 安装与测试

文章目录 ROS2 安装与测试ROS2 安装1. 设置编码2. 添加源3. 安装 ROS24. 设置环境变量 ROS2 示例测试实例一&#xff1a;命令行实例实例二&#xff1a;小海龟仿真实例 参考链接 ROS2 安装与测试 ROS2 安装 基于 Ubuntu 22.04 LTS 操作系统。 1. 设置编码 sudo apt update &…...

MySQL数据分组技术深度解析及实践

在处理大量数据库记录时,数据分组是一种强大的工具,它允许我们按照特定列的值将数据划分为逻辑上的集合,进而对每个集合执行聚合操作,如计数、求和或平均值等。MySQL中的​​GROUP BY​​​子句正是实现这一功能的关键所在。本文将详细介绍​​GROUP BY​​的使用方法,结合…...

【敦煌网注册/登录安全分析报告】

敦煌网注册/登录安全分析报告 前言 由于网站注册入口容易被黑客攻击&#xff0c;存在如下安全问题&#xff1a; 暴力破解密码&#xff0c;造成用户信息泄露短信盗刷的安全问题&#xff0c;影响业务及导致用户投诉带来经济损失&#xff0c;尤其是后付费客户&#xff0c;风险巨大…...

Python读取ASC文件并转换成Excel文件(坐标)

import pandas as pd# 读取asc文件&#xff0c;指定空格为分隔符 df pd.read_csv(out_view2.asc, sep , headerNone)# 去掉空列 df df.dropna(howall, axis1)# 将数据保存到Excel文件 df.to_excel(out_view2.xlsx, indexFalse, headerFalse)效果图...

Rust 的 Warp 库编写的 restful api 参数传递与解析方法

Warp是一个用 Rust 编写的流行的异步 web 框架。在使用 warp 构建 RESTful API 时&#xff0c;可以通过多种方式传递参数到你的处理函数中。 以下是一些常见的方法&#xff0c;说明如何在 warp 中传递参数&#xff1a; 路径参数&#xff1a; 你可以使用 warp::path 和 warp::…...

关不掉的弹窗

这里分两种方式 第一种 #include<Windows.h> int main(){system("mode 15,14");while(1){MessageBox(NULL,TEXT("关不掉吧!"),TEXT("中病毒啦~~你这个SB!"),MB_OK);}} 实际上不是关不掉&#xff0c;而是关不完 解决方法&#xff1a;找…...

【JVM】类加载机制及双亲委派模型

目录 一、类加载过程 1. 加载 2. 连接 a. 验证 b. 准备 c. 解析 3. 初始化 二、双亲委派模型 类加载器 双亲委派模型的工作过程 双亲委派模型的优点 一、类加载过程 JVM的类加载机制是JVM在运行时&#xff0c;将 .class 文件加载到内存中并转换为Java类的过程。它…...

WordPress插件:链接自动识别转为超链接

WordPress插件&#xff1a;链接自动识别转为超链接 <?phpfunction open_links_in_new_tab() {add_filter(the_content, make_clickable);function autoblank($text) {$return str_replace(<a, <a target"_blank", $text);return $return;}add_filter(th…...

Java----数组的定义和使用

1.数组的定义 在Java中&#xff0c;数组是一种相同数据类型的集合。数组在内存中是一段连续的空间。 2.数组的创建和初始化 2.1数组的创建 在Java中&#xff0c;数组创建的形式与C语言又所不同。 Java中数组创建的形式 T[] 数组名 new T[N]; 1.T表示数组存放的数据类型…...

【C++】-QT多线程-006

1【QT】多线程 #ifndef MYWIDGET_H #define MYWIDGET_H#include <QWidget>namespace Ui { class MyWidget; }class MyWidget : public QWidget {Q_OBJECTpublic:explicit MyWidget(QWidget *parent 0);~MyWidget();/* 5 自定义信号*/ /*所有的信号函数只声明不定义&…...

vscode go语言开发中在任意包运行和调试代码 Example使用方法

一般情况下我们在进行go语言开发的时候我们都需要创建一个main方法和main包才能运行go代码&#xff0c; 针对这个问题&#xff0c;go语言给我们内置了功能强大的testing测试框架&#xff0c; 其中一个很有意思的Example测试就非常的方便使用。 他不管你在什么包&#xff0c;也…...

数据库查询--条件查询

目录 1.关系运算条件的查询 2.逻辑运算符条件的查询 3.带关键字IN的查询 4.带BETWEEN AND关键字的查询 5.空值查询 6.带LIKE关键字的模糊查询 1.关系运算条件的查询 在SELECT语句中&#xff0c;最常见的是使用WHERE字句指定关系运算条件对数据进行过滤。 语法格式&#x…...

用 Python 和 AkShare 进行个股数据清洗:源码剖析和建议优化

这是《个股清洗源码》一个获取股票买卖盘信息并将其打印到控制台并保存到文件的脚本。 下面我们来对源码进行剖析 先复习一下源码 import os import akshare as ak from akshare import stock_bid_ask_em from datetime import datetime import pandas as pd from io import …...

颍川诞生了两个帝王的仲父

伯、仲、叔、季是古代兄弟的长幼排行顺序&#xff0c;《释名释亲属》载&#xff1a;“父之弟曰仲父……仲父之弟曰叔父”。也就是古代称父亲的兄弟为仲父&#xff0c;多用于帝王对宰相重臣的尊称。 历史上最有名的、有正史记载的帝王“仲父”有两位&#xff0c;而且都出自颍川…...

KubeSphere 容器平台高可用:环境搭建与可视化操作指南

Linux_k8s篇 欢迎来到Linux的世界&#xff0c;看笔记好好学多敲多打&#xff0c;每个人都是大神&#xff01; 题目&#xff1a;KubeSphere 容器平台高可用&#xff1a;环境搭建与可视化操作指南 版本号: 1.0,0 作者: 老王要学习 日期: 2025.06.05 适用环境: Ubuntu22 文档说…...

微信小程序之bind和catch

这两个呢&#xff0c;都是绑定事件用的&#xff0c;具体使用有些小区别。 官方文档&#xff1a; 事件冒泡处理不同 bind&#xff1a;绑定的事件会向上冒泡&#xff0c;即触发当前组件的事件后&#xff0c;还会继续触发父组件的相同事件。例如&#xff0c;有一个子视图绑定了b…...

安宝特方案丨XRSOP人员作业标准化管理平台:AR智慧点检验收套件

在选煤厂、化工厂、钢铁厂等过程生产型企业&#xff0c;其生产设备的运行效率和非计划停机对工业制造效益有较大影响。 随着企业自动化和智能化建设的推进&#xff0c;需提前预防假检、错检、漏检&#xff0c;推动智慧生产运维系统数据的流动和现场赋能应用。同时&#xff0c;…...

关于nvm与node.js

1 安装nvm 安装过程中手动修改 nvm的安装路径&#xff0c; 以及修改 通过nvm安装node后正在使用的node的存放目录【这句话可能难以理解&#xff0c;但接着往下看你就了然了】 2 修改nvm中settings.txt文件配置 nvm安装成功后&#xff0c;通常在该文件中会出现以下配置&…...

基于Uniapp开发HarmonyOS 5.0旅游应用技术实践

一、技术选型背景 1.跨平台优势 Uniapp采用Vue.js框架&#xff0c;支持"一次开发&#xff0c;多端部署"&#xff0c;可同步生成HarmonyOS、iOS、Android等多平台应用。 2.鸿蒙特性融合 HarmonyOS 5.0的分布式能力与原子化服务&#xff0c;为旅游应用带来&#xf…...

相机从app启动流程

一、流程框架图 二、具体流程分析 1、得到cameralist和对应的静态信息 目录如下: 重点代码分析: 启动相机前,先要通过getCameraIdList获取camera的个数以及id,然后可以通过getCameraCharacteristics获取对应id camera的capabilities(静态信息)进行一些openCamera前的…...

sqlserver 根据指定字符 解析拼接字符串

DECLARE LotNo NVARCHAR(50)A,B,C DECLARE xml XML ( SELECT <x> REPLACE(LotNo, ,, </x><x>) </x> ) DECLARE ErrorCode NVARCHAR(50) -- 提取 XML 中的值 SELECT value x.value(., VARCHAR(MAX))…...

论文解读:交大港大上海AI Lab开源论文 | 宇树机器人多姿态起立控制强化学习框架(一)

宇树机器人多姿态起立控制强化学习框架论文解析 论文解读&#xff1a;交大&港大&上海AI Lab开源论文 | 宇树机器人多姿态起立控制强化学习框架&#xff08;一&#xff09; 论文解读&#xff1a;交大&港大&上海AI Lab开源论文 | 宇树机器人多姿态起立控制强化…...

【服务器压力测试】本地PC电脑作为服务器运行时出现卡顿和资源紧张(Windows/Linux)

要让本地PC电脑作为服务器运行时出现卡顿和资源紧张的情况&#xff0c;可以通过以下几种方式模拟或触发&#xff1a; 1. 增加CPU负载 运行大量计算密集型任务&#xff0c;例如&#xff1a; 使用多线程循环执行复杂计算&#xff08;如数学运算、加密解密等&#xff09;。运行图…...

分布式增量爬虫实现方案

之前我们在讨论的是分布式爬虫如何实现增量爬取。增量爬虫的目标是只爬取新产生或发生变化的页面&#xff0c;避免重复抓取&#xff0c;以节省资源和时间。 在分布式环境下&#xff0c;增量爬虫的实现需要考虑多个爬虫节点之间的协调和去重。 另一种思路&#xff1a;将增量判…...