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

Oracle系统性能监控工具oswatcher演示

1、关于 OSW

OSWatcher 的使用符合 Oracle 的标准许可条款,并且不需要额外的许可即可使用!!!!

OSWatcher (oswbb) 是一种 UNIX shell 脚本的集合,主要用于收集和归档操作系统和网络的度量,以便为诊断性能问题提供支持。作为最佳实践,用户应当在所有运行着 Oracle 实例的节点安装和运行 OSWatcher。当诊断性能问题的时候, Oracle support 可以采用 OSWatcher 数据来诊断那些可能已经超出数据库之外的性能问题。OSWatcher 可以从 MOS Note 301137.1 下载

作为最佳实践,Oracle Support 建议所有用户在其运行 Oracle 的服务器上部署 OSWatcher。OSWatcher 应被视为任何数据收集可能存在的附加或补充。主要原因是,如果 Oracle Support 不得不向开发提交一个 Bug,那么开发很可能会坚持要求提供 OSWatcher 数据。如果没有,该 Bug 可能无法继续分析,直到安装了 OSWatcher 并且问题再现。此外,比起其他工具,Oracle Support 更熟悉 OSWatcher 并且接受了 OSWatcher 的培训,他们了解基本操作系统诊断实用程序(如 vmstat、iostat、top 等)的输出。Oracle Support 可能不熟悉您现有的其他类型的自定义或特定于操作系统的数据收集工具。最后,Oracle Support 能够使用内部工具分析 OSWatcher 数据,避免耗时的任务比如必须手动检查成堆的文件。这将大大减少问题的解决时间。
Oracle Support 建议您使用默认快照间隔运行 OSWatcher,即 30 秒采样间隔和 48 小时的默认保留期。 以较低的频率采样或者大于 60 秒的采样对于诊断性能问题没有太大用处。

OSWatcher 更适合于小规模的情况,毕竟每台单机都要部署一次,性能都要单独分析!下面我就演示一下最新版本的oswbb840版本的安装及性能报告生成。

2、安装oswbba

上传文件oswbb840.tar到服务器/root目录

[root@rac1 ~]# mkdir -p /osw_monitor
[root@rac1 ~]# chown -R grid:oinstall /osw_monitor/
[root@rac1 ~]# mv /root/oswbb840.tar  /osw_monitor/
[root@rac1 ~]# chown -R grid:oinstall /osw_monitor/oswbb840.tar 
[root@rac1 ~]# su - grid
[grid@rac1 osw_monitor]$ tar -xvf oswbb840.tar 
[grid@rac1 osw_monitor]$ ls
oswbb  oswbb840.tar

3、创建RAC心跳网络监控配置文件

这个仅适用于RAC,如果你是单机,可以不看这节。

这里在oswbb目录提供了一个示例,只需要截取需要的部份并创建private.net文件就行,下面是整个配置文件示例

[grid@rac1 osw_monitor]$ cd oswbb
[grid@rac1 oswbb]$ cat Exampleprivate.net 
######################################################################
# This file contains examples of how to monitor private networks. To
# monitor your private networks create an executable file in this same
# directory named private.net. Use the example for your host os below.
# Make sure not to remove the last line in this file. Your file
# private.net MUST contain the rm lock.file line.
######################################################################
#Solaris Example
######################################################################
echo "zzz ***"`date`
traceroute -r -F <node1-priv>
traceroute -I -r -F <node1-priv>
traceroute -r -F <node2-priv>
traceroute -I -r -F <node2-priv>
######################################################################
#HP Example
######################################################################
echo "zzz ***"`date`
traceroute -r -F <node1-priv> 
traceroute -r -F <node2-priv> ######################################################################
#Linux Example
######################################################################
echo "zzz ***"`date`
traceroute -r -F <node1-priv> 
traceroute -r -F <node2-priv>
######################################################################
#Tru64 Example
######################################################################
echo "zzz ***"`date`
traceroute -r -f <node1-priv>
traceroute -r -f <node2-priv>
######################################################################
#AIX Example
######################################################################
echo "zzz ***"`date`
traceroute -r <node1-priv>
traceroute -r <node2-priv>
######################################################################
# DO NOT DELETE THE FOLLOWING LINE!!!!!!!!!!!!!!!!!!!!!
######################################################################
rm locks/lock.file
[grid@rac1 oswbb]$ 

例如我这里监控的系统是linux,那么需要创建private.net文件内容如下

######################################################################
#Linux Example
######################################################################
echo "zzz ***"`date`
traceroute -r -F rac1-priv
traceroute -r -F rac2-priv
######################################################################
# DO NOT DELETE THE FOLLOWING LINE!!!!!!!!!!!!!!!!!!!!!
######################################################################
rm locks/lock.file

4、运行osw并进行监控

这里要重点说明一下,比如7版本的LINUX默认最小安装后,没有相应的网络命令,要提前安装下net-tools包。

手动启动 OSWbb 实用程序,可以直接在 OSWbb 的安装目录下执行 startOSWbb.sh shell 脚本, 该脚本一共有4个参数,其中两个为可选参数,他们分别是:

$1 = 快照间隔,以秒为单位。
$2 = 要存储的归档数据的小时数。
$3 = (可选)压缩工具的名称,可以自动将生成的文件进行压缩。
$4 = (可选)保存归档的非默认路径,改参数用于替换OSWBB_ARCHIVE_DEST环境变量,

这里设置保留每5s采集一次,保存期限360h/24=15天,后台运行,只需要执行nohup ./startOSWbb.sh 5 360 &即可

(如果不用nohup会在当前屏幕打印一堆)如果想要看输出,可以tail -f nohup.out文件。

[grid@rac1 oswbb]$ nohup ./startOSWbb.sh 5 360  &[grid@rac1 oswbb]$ tail -f nohup.out 
Setting the archive log directory to/osw_monitor/oswbb/archiveTesting for discovery of OS Utilities...
VMSTAT found on your system.
IOSTAT found on your system.
MPSTAT found on your system.
IP found on your system.
TOP found on your system.
PIDSTAT found on your system.
NFSIOSTAT found on your system.
ARP found on your system.
TRACEROUTE found on your system.
Number of RAC Nodes: 2The following Nodes are members of RAC Cluster:
Local Node: rac1
Remote Node(s): rac2CRS is up and running on local Nodessh test is successful on all RAC Nodes.
Private.net configured on local node !Discovery of CPU CORE COUNT
CPU CORE COUNT will be used by oswbba to automatically look for cpu problemsCPU CORE COUNT = 4
VCPUS/THREADS = 4Discovery completed.Starting OSWatcher v8.4.0  on Thu Dec 5 21:50:11 CST 2024
With SnapshotInterval = 5
With ArchiveInterval = 360OSWatcher - Written by Carl Davis, Center of Expertise,
Oracle Corporation
For questions on install/usage please go to MOS (Note:301137.1)Data is stored in directory: /osw_monitor/oswbb/archiveStarting Data Collection...oswbb heartbeat:Thu Dec 5 21:50:16 CST 2024
oswbb heartbeat:Thu Dec 5 21:50:21 CST 2024
oswbb heartbeat:Thu Dec 5 21:50:26 CST 2024
oswbb heartbeat:Thu Dec 5 21:50:31 CST 2024

如果想要停止监控,只要执行stopSWbb.sh即可。

[grid@rac1 oswbb]$ nohup ./stopSWbb.sh

5、如何在windows执行生成报告

当然也是支持在Linux上输出图形报告,这要求你必须安装了x windows,并配置JDK环境,然后执行命令输出图形。

如果你的oracle服务不能安装图形界面且不能安装最新的JDK,那么我推荐你把监控数据打包拷贝到windows上,然后在windows端解析,新版本可以直接生成HTML报告,HTML看起来更友好。

我这里用的是新版本840的,所以需要最低jdk 1.8才行。windows安装JDK就没有啥可说的,一直下一步就行,环境变量不想配置也可以,只要cmd下执行java -jar能看到当前版本就OK。

那行,首先在linux端打包收集的信息,在oswbb目录下执行脚本,会在当前目录下生成tar包

[grid@rac1 oswbb]$ ./tar_up_full_archive.sh /osw_monitor/
[grid@rac1 oswbb]$ ls *.tar
osw_archive_1205242152.tar

文件拷贝到windows,解压到E盘根目录下,电脑安装JDK 1.8配置好环境变量。

先解压该压缩包,会生成osw_monitor文件夹

E:\>winrar x osw_archive_1205242152.tar

我们把新版本的解析包oswbba9013拷贝到E盘,然后执行如下命令

java -Duser.language=en -Duser.country=us -jar -Xmx256m e:\oswbba9013.jar -i E:\osw_monitor\oswbb\archive

这里进入到交互式界面,我这里按D生成HTML报告

E:\>java -Duser.language=en -Duser.country=us -jar -Xmx256m e:\oswbba9013.jar -iE:\osw_monitor\oswbb\archiveValidating times in the archive...Starting OSW Analyzer V9.0.13
Copyright (c)  2023 by Oracle CorporationParsing Data. Please Wait...Scanning file headers for version and platform info...Parsing file rac1_prvtnet_24.12.05.2100.dat ...Parsing file rac1_pidstat_24.12.05.2100.dat ...Parsing file rac1_iostat_24.12.05.2100.dat ...Parsing file rac1_nfsiostat_24.12.05.2100.dat ...Parsing file rac1_vmstat_24.12.05.2100.dat ...Parsing file rac1_meminfo_24.12.05.2100.dat ...Parsing file rac1_netstat_24.12.05.2100.dat ...Parsing file rac1_top_24.12.05.2100.dat ...Parsing file rac1_ps_24.12.05.2100.dat ...Parsing Completed.Enter 1 to Display CPU Process Queue Graphs
Enter 2 to Display CPU Utilization Graphs
Enter 3 to Display CPU Other Graphs
Enter 4 to Display Memory Graphs
Enter 5 to Display Disk IO Graphs
Enter 61 to Display Individual OS Process I/O RPS Graphs
Enter 62 to Display Individual OS Process I/O WPS Graphs
Enter 63 to Display Individual OS Process Percent User CPU Graphs
Enter 64 to Display Individual OS Process Percent System CPU Graphs
Enter 65 to Display Individual OS Process Percent Total CPU (User + System) Grap
hs
Enter 66 to Display Individual OS Process Percent Memory GraphsEnter GP to Generate Individual Process Profile
Enter GC to Generate All CPU Gif Files
Enter GM to Generate All Memory Gif Files
Enter GD to Generate All Disk Gif Files
Enter GN to Generate All Network Gif FilesEnter L to Specify Alternate Location of Gif Directory
Enter Z to Zoom Graph Time Scale (Does not change analysis dataset)
Enter B to Returns to Baseline Graph Time Scale (Does not change analysis datase
t)
Enter R to Remove Currently Displayed GraphsEnter X to Export Parsed Data to Flat File
Enter S to Analyze Subset of Data(Changes analysis dataset including graph time
scale)
Enter A to Analyze Data
Enter D to Generate DashBoardEnter Q to Quit ProgramPlease Select an Option:D
Enter a unique analysis/dashboard directory name or enter <CR> to accept defaultname:A new analysis file analysis\rac1_Dec05215016_1733407401\analysis.txt has been c
reated.Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_OS_Run_Queue.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_OS_Run_Adjusted_Queue.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_OS_Block_Queue.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_OS_HB.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_PS_Processes.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_OS_Cpu_Idle.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_OS_Cpu_Util.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_OS_Cpu_System.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_OS_Cpu_User.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_OS_Cpu_Wa.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_OS_Cpu_Interrupts.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_OS_Context_Switches.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_OS_Memory_Swap.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_OS_Memory_Page_In_Rate.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_OS_Memory_Page_Out_Rate.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_MemInfoTotalMem.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_MemInfoFreeMem.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_MemInfoAvailMem.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_MemInfoPercentFree.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_OS_Cpu_Wa.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_OS_Block_Queue.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_OS_IO_ST.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_OS_IO_AW.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_OS_IO_PB.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_OS_IO_RPS.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_OS_IO_WPS.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_OS_IO_TPS.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_link_ lo_rx_ok.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_link_ lo_rx_err.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_link_ lo_rx_drp.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_link_ lo_rx_ovr.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_link_ lo_tx_ok.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_link_ lo_tx_err.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_link_ lo_tx_drp.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_link_ eth0_rx_ok.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_link_ eth0_rx_err.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_link_ eth0_rx_drp.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_link_ eth0_rx_ovr.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_link_ eth0_tx_ok.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_link_ eth0_tx_err.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_link_ eth0_tx_drp.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_link_ eth1_rx_ok.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_link_ eth1_rx_err.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_link_ eth1_rx_drp.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_link_ eth1_rx_ovr.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_link_ eth1_tx_ok.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_link_ eth1_tx_err.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_link_ eth1_tx_drp.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_link_ eth2_rx_ok.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_link_ eth2_rx_err.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_link_ eth2_rx_drp.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_link_ eth2_rx_ovr.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_link_ eth2_tx_ok.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_link_ eth2_tx_err.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_link_ eth2_tx_drp.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_IpOutRequests.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_IpInReceives.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_IpFragCreates.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_IpFragOKs.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_IpInDiscards.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_IpReasmFails.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_ip_fragments_in_rate.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_ip_fragments_out_rate.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_UdpInDatagrams.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_UdpOutDatagrams.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_UdpInErrors.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_UdpInCsumErrors.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_UdpRcvbufErrors.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_UdpSndbufErrors.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_TcpInSegs.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_TcpOutSegs.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_TcpRetransSegs.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_TcpOutRsts.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_TcpEstabResets.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_TcpAttemptFails.jpg
Generating file analysis\rac1_Dec05215016_1733407401\dashboard\generated_files\O
SWg_tcp_retran_error_rate.jpgFiles written to the analysis directory.Enter 1 to Display CPU Process Queue Graphs
Enter 2 to Display CPU Utilization Graphs
Enter 3 to Display CPU Other Graphs
Enter 4 to Display Memory Graphs
Enter 5 to Display Disk IO Graphs
Enter 61 to Display Individual OS Process I/O RPS Graphs
Enter 62 to Display Individual OS Process I/O WPS Graphs
Enter 63 to Display Individual OS Process Percent User CPU Graphs
Enter 64 to Display Individual OS Process Percent System CPU Graphs
Enter 65 to Display Individual OS Process Percent Total CPU (User + System) Grap
hs
Enter 66 to Display Individual OS Process Percent Memory GraphsEnter GP to Generate Individual Process Profile
Enter GC to Generate All CPU Gif Files
Enter GM to Generate All Memory Gif Files
Enter GD to Generate All Disk Gif Files
Enter GN to Generate All Network Gif FilesEnter L to Specify Alternate Location of Gif Directory
Enter Z to Zoom Graph Time Scale (Does not change analysis dataset)
Enter B to Returns to Baseline Graph Time Scale (Does not change analysis datase
t)
Enter R to Remove Currently Displayed GraphsEnter X to Export Parsed Data to Flat File
Enter S to Analyze Subset of Data(Changes analysis dataset including graph time
scale)
Enter A to Analyze Data
Enter D to Generate DashBoardEnter Q to Quit ProgramPlease Select an Option:

然后就在E盘下生成如下目录。

E:\analysis\rac1_Dec05215016_1733407401\dashboard

我们直接运行目录里的index.html即可

6、效果展示

下面是部分展示,是不是看起来还不错!

 

40d12cf9fd3ca0fe6a41cad6489a3d64.png


 

2f765087d8158d20a8b75a458b05f93d.png


 

de5ae8cf3f741926a4ac9dfae792a506.png

66b256f27002b70409a9884319b09605.png

 

相关文章:

Oracle系统性能监控工具oswatcher演示

1、关于 OSW OSWatcher 的使用符合 Oracle 的标准许可条款&#xff0c;并且不需要额外的许可即可使用&#xff01;&#xff01;&#xff01;&#xff01; OSWatcher (oswbb) 是一种 UNIX shell 脚本的集合&#xff0c;主要用于收集和归档操作系统和网络的度量&#xff0c;以便…...

Unix、GNU、BSD 风格中 ps 参数的区别

注&#xff1a;本文为“不同风格中 ps 命令参数的区别”相关文章合辑。 未去重。 BSD 风格和 UNIX 风格中 ps 参数的区别 作者&#xff1a;Daniel Stori 译者&#xff1a;LCTT Name1e5s | 2017-06-17 10:53 One Last Question ps aux 以及 ps -elf 都是查看进程的方式&…...

Jenkins环境一站式教程:从安装到配置,打造高效CI/CD流水线环境-Ubuntu 22.04.5 环境离线安装配置 Jenkins 2.479.1

文章目录 Jenkins环境一站式教程&#xff1a;从安装到配置&#xff0c;打造高效CI/CD流水线环境-Ubuntu 22.04.5 环境离线安装配置 Jenkins 2.479.1一、环境准备1.1 机器规划1.2 环境配置1.2.1 设置主机名1.2.2 停止和禁用防火墙1.2.3 更新系统 二、安装配置Jenkins2.1 安装JDK…...

百度文心一言全解析

一、技术基础 模型架构 多层神经网络构建&#xff1a;深度神经网络结构&#xff0c;包含多个隐藏层&#xff0c;有效处理复杂语言信息。注意力机制运用&#xff1a;精准聚焦文本关键部分&#xff0c;理解语义关联与重要性分布。多头注意力并行&#xff1a;多维度分析文本&#…...

在python中使用布尔逻辑

布尔是python中常见类型。它的值只能是两项内容之一&#xff1a;true或false. 编写"if"语句 若要在python中表达条件逻辑&#xff0c;可以使用if语句。——编写If语句离不开逻辑运算符&#xff1a;等于、不等于、小于、大于或等于、大于和大于或等于。 在python中…...

【Web】AlpacaHack Round 7 (Web) 题解

Treasure Hunt flag在md5值拼接flagtxt的文件里&#xff0c;如 d/4/1/d/8/c/d/9/8/f/0/0/b/2/0/4/e/9/8/0/0/9/9/8/e/c/f/8/4/2/7/e/f/l/a/g/t/x/t 访问已经存在的目录状态码是301 访问不存在的目录状态码是404 基于此差异可以写爆破脚本 这段waf可以用url编码绕过 做个lab …...

汽车48V电气系统

汽车48V电气系统 汽车48V电气系统汽车48V电气系统设计汽车48V电气系统测试汽车48V系统是48V供电和12V供电共存的么?48V供电系统是如何与12V供电系统共存的?48V电气系统测试的难点有哪些?在汽车48V电气系统通信测试中,如何向12V的控制器和48V的控制器供电?汽车48V电气系统通…...

完美解决Qt Qml窗口全屏软键盘遮挡不显示

1、前提 说明&#xff1a;我使用的是第三方软键盘 QVirtualKeyboard QVirtualKeyboard: Qt5虚拟键盘支持中英文,仿qt官方的virtualkeyboard模块,但使用QWidget实现。 - Gitee.com 由于参考了几篇文章尝试但没有效果&#xff0c;链接如下&#xff1a; 文章一&#xff1a;可能…...

docker逃逸总结

一、 检查是否在docker容器中 通过以下两个地方来判断 # 是否存在此文件 ls -al /.dockerenv# 在其中是否包含docker字符串 cat /proc/1/cgroup除了上面两种外还有其他方式判断&#xff0c;如检测mount、fdisk -l查看硬盘 、判断PID 1的进程名等也可用来辅助判断。 容器逃逸…...

DSA 和 ECDSA 签名算法

DSA 和 ECDSA 签名算法 基本介绍Java实现DSA创建密钥对签名验签 ECDSA创建密钥对签名验签 Go实现ECDSA创建密钥对签名验签 DSA创建密钥对签名验签 基本介绍 DSA 是一种基于离散对数问题的数字签名算法。它使用私钥和公钥对来进行签名和验证操作。 ECDSA 是基于椭圆曲线密码体制…...

Scrapy的简单实现

Scrapy的简单实现 1. Scrapy是什么 Scrapy是一个用于抓取网站&#xff08;即网页爬取&#xff09;和从网页中提取结构化数据的开源框架。它为编写网络爬虫来抓取网站内容提供了高效、灵活的方式&#xff0c;并将这些信息以常见的格式保存&#xff0c;如JSON、CSV或XML。Scrap…...

Python之爬虫入门--示例(2)

一、Requests库安装 可以使用命令提示符指令直接安装requests库使用 pip install requests 二、爬取JSON数据 &#xff08;1&#xff09;、点击网络 &#xff08;2&#xff09;、刷新网页 &#xff08;3&#xff09;、这里有一些数据类型&#xff0c;选择全部 &#xff08…...

JS的for in和for of

for...in 语句 工作原理 遍历属性&#xff1a;for...in 遍历对象的所有可枚举属性&#xff0c;这些属性不仅限于对象本身的属性&#xff0c;还包括原型链上的可枚举属性。返回键名&#xff1a;每次迭代时&#xff0c;循环变量会得到当前属性的键&#xff08;即字符串形式的属…...

Spring IoC的基本概念

引言 在 Java 中&#xff0c;出现了大量轻量级容器&#xff0c;这些容器有助于将来自不同项目的组件组装成一个有凝聚力的应用程序。这些容器的底层是它们如何执行布线的常见模式&#xff0c;它们将这一概念称为“控制反转”。 &#x1f3e2; 本章内容 &#x1f3ed; IoC服务…...

解决GitHub项目泄露API密钥问题

文章目录 所有的步骤参考gpt步骤一 使用环境变量步骤二 撤销并移除历史中的API密钥(1) 安装: pip install git-filter-repo(2) 清除特定文件 git filter-repo --path PATH_TO_YOUR_FILE --invert-paths出错解决 步骤三 处理移除的 origin 远程步骤四 强制推送到GitHub步骤五 重…...

【BUG】VMware|vmrest正在运行此虚拟机,无法配置或删除快照

VMware版本&#xff1a;VMware 16 文章目录 省流版问题解决方案 详细解释版问题解决方案总结 省流版 问题 只读&#xff0c;因为vmrest正在运行虚拟机。 解决方案 参考&#xff1a;虚拟机设置&#xff0c;只读&#xff0c;因为vmrest正在运行此虚拟机。有谁遇到过这种问题吗&…...

Ruby On Rails 笔记2——表的基本知识

Active Record Basics — Ruby on Rails Guides Active Record Migrations — Ruby on Rails Guides 原文链接自取 1.Active Record是什么&#xff1f; Active Record是MVC模式中M的一部分&#xff0c;是负责展示数据和业务逻辑的一层&#xff0c;可以帮助你创建和使用Ruby…...

VideoConvertor.java ffmpeg.exe

VideoConvertor.java ffmpeg.exe 视频剪切原理 入点 和 出点 选中时间点&#xff0c;导出...

java.lang.IllegalStateException: Error processing condition on org.springframework.boot.autoconfigur

在运行代码的过程中&#xff0c;报出以下错误&#xff1a; java.lang.IllegalStateException: Error processing condition on org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration.redisTemplate 或者是&#xff1a; Caused by: java.lang.IllegalArgu…...

C#设计模式--策略模式(Strategy Pattern)

策略模式是一种行为设计模式&#xff0c;它使你能在运行时改变对象的行为。在策略模式定义了一系列算法或策略&#xff0c;并将每个算法封装在独立的类中&#xff0c;使得它们可以互相替换。通过使用策略模式&#xff0c;可以在运行时根据需要选择不同的算法&#xff0c;而不需…...

Webpack Tree Shaking 技术原理及应用实战,优化代码,精简产物

前言 在前端开发中&#xff0c;优化代码体积和提升应用性能是至关重要的课题。Webpack 提供了多种优化手段来帮助开发者实现这一目标&#xff0c;Tree Shaking 就是其中一种非常重要的优化技术&#xff0c;它通过在编译阶段移除未被使用的代码模块&#xff0c;从而显著减小最终…...

C++(十二)

前言&#xff1a; 本文将进一步讲解C中&#xff0c;条件判断语句以及它是如何运行的以及内部逻辑。 一&#xff0c;if-else,if-else语句。 在if语句中&#xff0c;只能判断两个条件的变量&#xff0c;若想实现判断两个以上条件的变体&#xff0c;就需要使用if-else,if-else语…...

ModelScope-Agent(1): 基于开源大语言模型的可定制Agent系统

目录 简介快速入门 简介 github地址 快速入门 看前两篇&#xff0c;调用千问API和天气API # 选用RolePlay 配置agent from modelscope_agent.agents.role_play import RolePlay # NOQArole_template 你扮演一个天气预报助手&#xff0c;你需要查询相应地区的天气&#x…...

Jmeter进阶篇(30)深入探索 JMeter 监听器

前言 在性能测试领域里,Apache JMeter 是一款经典而强大的工具,而其中的监听器(Listeners)组件更是发挥着不可或缺的关键作用。 监听器就像敏锐的观察者,默默记录测试执行过程中的各种数据,作为系统性能分析的数据依据。 本文将带你全方位走进 JMeter 监听器的奇妙世界,…...

HTTP multipart/form-data 请求

序言 最近在写项目的过程中有一个需求是利用 HTTP 协议传输图片和视频&#xff0c;经过查询方法相应的方法发现使用 multipart/form-data 的方式&#xff0c;这是最常见处理二进制文件的表单编码类型。  学习了一下午&#xff0c;现在总结一下使用的方法和相关的知识点&#x…...

记录关于阿里云智能媒体预览pdf文件的问题

pdf仅支持预览&#xff0c;不支持编辑&#xff0c;需要将权限设置成只读。 readonly参数一定要传&#xff0c;不能不传&#xff01;&#xff01;&#xff01;&#xff01; readonly的设置一定要用示例提供的方法&#xff01;&#xff01;&#xff01;&#xff01; 用WebofficeP…...

Milvus向量数据库01-基础概念

Milvus向量数据库01-基础概念 Zilliz Cloud 集群由全托管 Milvus 实例及相关计算资源构成。您可以在 Zilliz Cloud 集群中创建 Collection&#xff0c;然后在 Collection 中插入 Entity。Zilliz Cloud 集群中的 Collection 类似于关系型数据库中的表。Collection 中的 Entity …...

字节高频算法面试题:小于 n 的最大数

问题描述&#xff08;感觉n的位数需要大于等于2&#xff0c;因为n的位数1的话会有点问题&#xff0c;“且无重复”是指nums中存在重复&#xff0c;但是最后返回的小于n最大数是可以重复使用nums中的元素的&#xff09;&#xff1a; 思路&#xff1a; 先对nums倒序排序 暴力回…...

PowerShell 脚本实战:解决 GitLab 仓库文件批量重命名难题

使用PowerShell脚本解决文件重命名问题&#xff1a;一次实践经验分享 在软件开发过程中&#xff0c;我们经常会遇到需要批量处理文件的情况。最近&#xff0c;我在一个项目中就遇到了这样一个需求&#xff1a;将GitLab仓库中所有的.ts和.py文件的扩展名修改为原扩展名加上&quo…...

爬取的数据能实时更新吗?

在当今数字化时代&#xff0c;实时数据更新对于企业和个人都至关重要。无论是市场分析、商品类目监控还是其他需要实时数据的应用场景&#xff0c;爬虫技术都能提供有效的解决方案。本文将探讨如何利用PHP爬虫实现数据的实时更新&#xff0c;并提供相应的代码示例。 1. 实时数…...

【SKFramework框架核心模块】3-6、FSM有限状态机模块

推荐阅读 CSDN主页GitHub开源地址Unity3D插件分享QQ群&#xff1a;398291828小红书小破站 大家好&#xff0c;我是佛系工程师☆恬静的小魔龙☆&#xff0c;不定时更新Unity开发技巧&#xff0c;觉得有用记得一键三连哦。 一、前言 【Unity3D框架】SKFramework框架完全教程《全…...

Python之爬虫入门(1)

目录 一、简介 二、爬虫的功能 1、爬虫的用处 2、爬虫的应用场景 三、爬虫的实现步骤 四、GET和POST方法 1、GET方法 &#xff08;1&#xff09;、简介 &#xff08;2&#xff09;、适用场景 2、POST方法 &#xff08;1&#xff09;、简介 &#xff08;2&#xff09;…...

《MySQL 表结构设计基础》

一、引言 MySQL 表结构设计是数据库开发中的重要环节&#xff0c;合理的设计不仅能提高数据库性能&#xff0c;还能使数据更易于维护和管理。本文将详细介绍 MySQL 表结构设计的基础要点。 在数据库开发中&#xff0c;MySQL 表结构设计的重要性不言而喻。一个良好的表结构设计…...

微信小程序 - 解决报错{“errno“:600001,“errMsg“:“request:fail errcode:-202cronet_error_code:-202error_msg:net::

前言 关于此问题网上的教程都无法解决,如果您的报错信息与我相似,即可解决。 在微信小程序开发中,详细解决小程序请求接口报错:{“errno”:600001,“errMsg”:“request:fail errcode:-202cronet_error_code:-202error_msg:net::ERR_CERT_AUTH ORITY_INVALID”},微…...

k8s 为什么需要Pod?

Pod&#xff0c;是 Kubernetes 项目中最小的 API 对象&#xff0c;更加专业的说&#xff0c;Pod&#xff0c;是 Kubernetes 项目的原子调度单位。 Pod 是 Kubernetes 里的原子调度单位。这就意味着&#xff0c;Kubernetes 项目的调度器&#xff0c;是统一按照 Pod 而非容器的资…...

react 使用状态管理调用列表接口渲染列表(包含条件查询,统一使用查询按钮,重置功能),避免重复多次调用接口的方法

react开发调用api接口一般使用useEffect来监听值的变化&#xff0c;通过值的变化与否来进行接口调用。 比如我们要进行一个查询接口 const [pageParams, setPage] useState({name: ,id: ,});const [dataList, setDataList] useState([]);const getList async () > {const…...

常见限流算法详细解析

常见限流算法详细解析 分布式系统中&#xff0c;由于接口API无法控制上游调用方的行为&#xff0c;因此当瞬时请求量突增时&#xff0c;会导致服务器占用过多资源&#xff0c;发生响应速度降低、超时、乃至宕机&#xff0c;甚至引发雪崩造成整个系统不可用。 限流&#xff0c;…...

第四十一天 ASP应用 HTTP.sys 漏洞 iis6文件解析漏洞和短文件漏洞 access数据库泄露漏洞

前言 随着时代的发展现在呀&#xff0c;这个ASp已经淡出大众的视线了 &#xff0c;ASP之前的火爆程度无异于现在的PHP 大家的童年 4399 什么的网站都是这个搭建的ASP 简介 | 菜鸟教程 那大家想问为什么你妹的 这个这么火的网站搭建语言被淘汰了呢 其实多半是以为它的不开…...

LLM输出评估标准

LLM输出评估标准 LLM评估方法 响应的完整性和简洁性&#xff1a;确定大模型的响应是否完全解决用户查询&#xff0c;简洁性则评估生成响应的相关性。文本相似性指标&#xff1a;将生成的文本与参考文本进行比较&#xff0c;评估它们的相似度&#xff0c;并给出得分以理解大模…...

ansible学习笔记之02command模块与shell模块

目录 1、概述 2、模块介绍 2.1 command模块 2.2 shell模块 2.3 小结 3、实验 3.1 测试ls命令 3.2 测试环境变量 3.3 测试操作符">" 1、概述 本文介绍ansible的command模块与shell模块&#xff0c;并通过实验比对两个模块的异同。 2、模块介绍 2.1…...

Python 在同一/或不同PPT文档之间复制幻灯片

复制幻灯片可以帮助我们更高效地完成工作&#xff0c;节省大量的制作时间。通过复制现有的幻灯片&#xff0c;可以快速创建新的演示文稿&#xff0c;而无需重新设计板式样式等。此外&#xff0c;复制幻灯片还可以帮助我们保持内容的一致性&#xff0c;使整个PPT演示文稿看起来更…...

4. React 性能优化技巧:如何让你的应用更快

在构建大型应用时&#xff0c;性能优化是一个非常重要的话题。React 提供了许多优化工具&#xff0c;帮助我们提高应用的渲染速度和响应能力。本文将分享一些常见的 React 性能优化技巧。 4.1. 使用 React.memo 缓存组件 当组件的 props 没有变化时&#xff0c;React 默认不会…...

云标准:云计算标准

目录 云计算标准的定义和分类 云计算标准的内容 云计算标准的重要性 云计算标准化组织 5.云计算标准的具体实例 云计算标准是确保云计算技术、服务和应用发展的重要规范&#xff0c;它们对于提高云计算系统的互操作性、可靠性和安全性至关重要。以下是对云计算标准的详细解…...

Redis【2】- SDS源码分析

1 简介&基础用法 Redis 中用得最多的就是字符串&#xff0c;在 C 语言中其实可以直接使用 char* 字符数组来实现字符串&#xff0c;也有很多可以直接使用得函数。但是 Redis 并没有使用 C 语言原生的字符串&#xff0c;而是自己实现了一个 SDS&#xff08;简单动态字符串&…...

力扣打卡8:最长上升子序列

链接&#xff1a;300. 最长递增子序列 - 力扣&#xff08;LeetCode&#xff09; 本题我开始想到的是dp&#xff0c;复杂度为O(n^2)&#xff0c;这也是很经典的解法。 看到进阶解法可以O(nlogn)&#xff0c;想到可能是要用到二分&#xff0c;但是&#xff0c;我想到的是和map排…...

记录一次老平台改造通知用户刷新页面,纯前端实现

记录一次老平台改造通知用户刷新页面&#xff0c;纯前端实现 方案概述背景现状问题本质 方案设计前提设计实现 其他补充写在最后的话抛出一个问题 方案概述 背景 前端构建完上线&#xff0c;用户还停留还在老页面&#xff0c;用户不知道网页重新部署了&#xff0c;跳转页面的时…...

ubuntu22.04 使用可以用的镜像源获取你要的镜像

默认的是不行的 不管pull啥镜像 仍然会出现这个错误 Error response form daemon:Get "https://registry-1.docker.io/v2": net/http: request canceled while waiting for connection (Client.Timeout exceeded while await) 操作方法是 如果在目录没有/etc/docker…...

Chrome扩展程序开发示例

项目文件夹内文件如下&#xff1a; manifest.json文件内容&#xff1a; {"manifest_version": 3,"name": "我的法宝","description": "我的有魔法的宝贝","version": "1.0","icons": {"…...

Linux 下使用飞鸽传书实现与Windows飞秋的通信

最近把单位的办公电脑换成Linux系统&#xff0c;但是其他同事们都使用飞秋2013进行局域网通信和文件传输&#xff0c;经过一番尝试&#xff0c;发现飞鸽传书For Linux 2014能够实现两者的互相通信。 飞鸽传书ForLINUXLinux版下载_飞鸽传书ForLINUX免费下载_飞鸽传书ForLINUX1.2…...

docker批量创建cloudstack虚拟主机脚本

批量创建cloudstack脚本 #!/bin/bash # 配置变量 container_prefix"cloudworker-" base_ip"192.168.1." start_ip2 #开始ip start_container2 #上同 end_container4 #结束ip 包括 network_name"my_macvlan_network" image_name"dockedahi:…...