JVM在线分析-解决问题的工具一(jinfo,jmap,jstack)

1. jinfo

(base) PS C:\Users\zishi\Desktop> jinfo
Usage:jinfo <option> <pid>(to connect to a running process)where <option> is one of:-flag <name>         to print the value of the named VM flag #输出对应名称的参数-flag [+|-]<name>    to enable or disable the named VM flag# 开启或者关闭对应名称的参数 只有被标记为 manageable 的参数才可以被动态修改-flag <name>=<value> to set the named VM flag to the given value  #设定对应名称的参数-flags               to print VM flags # 输出全部的参数-sysprops            to print Java system properties #输出系统属性<no option>          to print both VM flags and system properties -? | -h | --help | -help to print this help message
(base) PS C:\Users\zishi> jinfo 9368
Java System Properties:
#Thu Nov 09 09:05:06 CST 2023
sun.desktop=windows
awt.toolkit=sun.awt.windows.WToolkit
java.specification.version=11
sun.cpu.isalist=amd64
sun.jnu.encoding=GBK
java.class.path=.\\quality-server.jar
java.vm.vendor=Oracle Corporation
sun.arch.data.model=64
user.variant=
catalina.useNaming=false
java.vendor.url=https\://openjdk.java.net/
。。。。略去
(base) PS C:\Users\zishi> jinfo  -sysprops 9368
Java System Properties:
#Thu Nov 09 09:07:07 CST 2023
sun.desktop=windows
awt.toolkit=sun.awt.windows.WToolkit
。。。。略去
(base) PS C:\Users\zishi> jinfo  -flags 9368
VM Flags:
-XX:CICompilerCount=4 
-XX:ConcGCThreads=3 
-XX:G1ConcRefinementThreads=10 
-XX:G1HeapRegionSize=2097152 
-XX:GCDrainStackTargetSize=64 
-XX:InitialHeapSize=534773760 
-XX:MarkStackSize=4194304 
-XX:MaxHeapSize=8524922880 
-XX:MaxNewSize=5114953728 
-XX:MinHeapDeltaBytes=2097152 
-XX:NonNMethodCodeHeapSize=5836300 
-XX:NonProfiledCodeHeapSize=122910970 
-XX:ProfiledCodeHeapSize=122910970 
-XX:ReservedCodeCacheSize=251658240 
-XX:+SegmentedCodeCache 
-XX:+UseCompressedClassPointers 
-XX:+UseCompressedOops 
-XX:+UseG1GC 
-XX:-UseLargePagesIndividualAllocation
(base) PS C:\Users\zishi> jinfo  -flag MaxHeapSize 9368
-XX:MaxHeapSize=8524922880
(base) PS C:\Users\zishi> jinfo  -flag MaxHeapSize=8524922883 9368
Exception in thread "main" com.sun.tools.attach.AttachOperationFailedException: flag 'MaxHeapSize' cannot be changedat jdk.attach/sun.tools.attach.VirtualMachineImpl.execute(VirtualMachineImpl.java:130)at jdk.attach/sun.tools.attach.HotSpotVirtualMachine.executeCommand(HotSpotVirtualMachine.java:309)at jdk.attach/sun.tools.attach.HotSpotVirtualMachine.setFlag(HotSpotVirtualMachine.java:282)at jdk.jcmd/sun.tools.jinfo.JInfo.flag(JInfo.java:146)at jdk.jcmd/sun.tools.jinfo.JInfo.main(JInfo.java:127)

查看被标记为 manageable 的参数

$ java -XX:+PrintFlagsFinal -version | grep  manageableintx CMSAbortablePrecleanWaitMillis           = 100                                    {manageable} {default}intx CMSTriggerInterval                       = -1                                     {manageable} {default}intx CMSWaitDuration                          = 2000                                   {manageable} {default}bool HeapDumpAfterFullGC                      = false                                  {manageable} {default}bool HeapDumpBeforeFullGC                     = false                                  {manageable} {default}bool HeapDumpOnOutOfMemoryError               = false                                  {manageable} {default}ccstr HeapDumpPath                             =                                        {manageable} {default}uintx MaxHeapFreeRatio                         = 70                                     {manageable} {default}uintx MinHeapFreeRatio                         = 40                                     {manageable} {default}bool PrintClassHistogram                      = false                                  {manageable} {default}bool PrintConcurrentLocks                     = false                                  {manageable} {default}
java version "11.0.13" 2021-10-19 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.13+10-LTS-370)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.13+10-LTS-370, mixed mode)

在这里插入图片描述
修改参数的值

(base) PS C:\Users\zishi> jinfo  -flag MaxHeapFreeRatio 9368
-XX:MaxHeapFreeRatio=70
(base) PS C:\Users\zishi> jinfo  -flag MaxHeapFreeRatio=80 9368
(base) PS C:\Users\zishi> jinfo  -flag MaxHeapFreeRatio 9368
-XX:MaxHeapFreeRatio=80

开启参数:

(base) PS C:\Users\zishi> jinfo -flag HeapDumpBeforeFullGC 9368
-XX:-HeapDumpBeforeFullGC
(base) PS C:\Users\zishi> jinfo -flag +HeapDumpBeforeFullGC 9368
(base) PS C:\Users\zishi> jinfo -flag HeapDumpBeforeFullGC 9368
-XX:+HeapDumpBeforeFullGC

扩展
java -XX:+PrintFlagsInitial 查看所有 JVM 参数启动的初始值
java -XX:+PrintFlagsFinal 查看所有 JVM 参数的最终值
java -XX:+PrintCommandLineFlags 查看哪些已经被用户或者 JVM 设置过的详细的 XX 参数的名称和值

2. jmap

(base) PS C:\Users\zishi> jmap
Usage:jmap -clstats <pid>to connect to running process and print class loader statisticsjmap -finalizerinfo <pid>to connect to running process and print information on objects awaiting finalizationjmap -histo[:live] <pid>to connect to running process and print histogram of java object heapif the "live" suboption is specified, only count live objectsjmap -dump:<dump-options> <pid>to connect to running process and dump java heapjmap -? -h --helpto print this help messagedump-options:live         dump only live objects; if not specified,all objects in the heap are dumped.format=b     binary formatfile=<file>  dump heap to <file>Example: jmap -dump:live,format=b,file=heap.bin <pid>
$ jmap -clstats 9368 > a.txt
$ cat a.txt | head -n 10
Index Super InstBytes KlassBytes annotations    CpAll MethodCount Bytecodes MethodAll    ROAll    RWAll    Total ClassName1    -1  10510264        504           0        0           0         0         0       24      616      640 [B2  8286   5545320       1112           0     6816          47      1117     27912     6480    30104    36584 java.lang.reflect.Method3    18   4025232        616         128    14264         109      4576     71992    18640    69664    88304 java.lang.String4    18   2461504        592           0     1360           9       213      2720     1488     3520     5008 java.util.concurrent.ConcurrentHashMap$Node5    -1   2286832        504           0        0           0         0         0       24      616      640 [Ljava.lang.Object;6    -1   2075104        504           0        0           0         0         0       32      616      648 [Ljava.util.HashMap$Node;7    18   2013216        584           0     1384           7       149      1816     1152     2952     4104 java.util.HashMap$Node8     7   1977960        584           0      504           1        10       624      304     1640     1944 java.util.LinkedHashMap$Entry9    18   1720280        672           0    22112         139      5679     85040    24632    85104   109736 java.lang.Class$ jmap -clstats 9368 | grep com.zishi.docuvate.exception4077    18        16        552          56     2568           6       282      1576     1448     3504     4952 com.zishi.docuvate.exception.GlobalExceptionHandler7429  7856         0        624           0      440           3        54       568      464     1368     1832 com.zishi.docuvate.exception.BadRequestException7430  7856         0        640           0      624           8       105      1472     1072     1952     3024 com.zishi.docuvate.exception.GlobalException

说明:

Index
Super
InstBytes
KlassBytes
annotations
CpAll
MethodCount
Bytecodes
MethodAll
ROAll
RWAll
Total
ClassName: 类的完全限定名

(base) PS C:\Users\zishi> jmap -histo 23152num     #instances         #bytes  class name (module)
-------------------------------------------------------1:       1164144      152211432  [B (java.base@11.0.13)2:        147373       44824568  [I (java.base@11.0.13)3:        694738       16673712  java.lang.String (java.base@11.0.13)4:        601819       12621496  [Ljava.lang.Class; (java.base@11.0.13)5:        107422        9453136  java.lang.reflect.Method (java.base@11.0.13)6:        113936        7291904  java.net.URL (java.base@11.0.13)7:        141772        4536704  org.springframework.boot.loader.jar.StringSequence8:         75593        4434728  [Ljava.lang.Object; (java.base@11.0.13)9:        178622        4286928  java.lang.StringBuilder (java.base@11.0.13)10:        102026        4081040  org.springframework.core.annotation.TypeMappedAnnotations11:         36093        2871384  [Ljava.util.HashMap$Node; (java.base@11.0.13)12:         88017        2816544  java.util.concurrent.ConcurrentHashMap$Node (java.base@11.0.13)13:         84459        2702688  org.springframework.core.annotation.TypeMappedAnnotations$MergedAnnotationFinder14:         82805        2649760  java.util.HashMap$Node (java.base@11.0.13)15:         64740        2589600  java.util.LinkedHashMap$Entry (java.base@11.0.13)16:         49166        2359968  java.util.HashMap (java.base@11.0.13)17:         92807        2227368  org.springframework.boot.loader.jar.JarURLConnection$JarEntryName18:         12370        2153808  [C (java.base@11.0.13)

说明:

#instances:对象数量
#bytes: 占用内存大小(单位:字节)
class name (module): 类的完全限定名

3. jstack

(base) PS C:\Users\zishi> jstack
Usage:jstack [-l][-e] <pid>(to connect to running process)Options:-l  long listing. Prints additional information about locks-e  extended listing. Prints additional information about threads-? -h --help -help to print this help message

代码示例:

/*** 当DeadLock类的对象flag==1时(td1),先锁定o1,睡眠500毫秒* 而td1在睡眠的时候另一个flag==0的对象(td2)线程启动,先锁定o2,睡眠500毫秒* td1睡眠结束后需要锁定o2才能继续执行,而此时o2已被td2锁定;* td2睡眠结束后需要锁定o1才能继续执行,而此时o1已被td1锁定;* td1、td2相互等待,都需要得到对方锁定的资源才能继续执行,从而死锁。*/
public class DeadLockTest implements Runnable{public int flag = 1;//静态对象是类的所有对象共享的private static Object o1 = new Object(), o2 = new Object();@Overridepublic void run() {System.out.println("flag=" + flag);if (flag == 1) {synchronized (o1) {try {Thread.sleep(500);} catch (Exception e) {e.printStackTrace();}synchronized (o2) {System.out.println("1");}}}if (flag == 0) {synchronized (o2) {try {Thread.sleep(500);} catch (Exception e) {e.printStackTrace();}synchronized (o1) {System.out.println("0");}}}}public static void main(String[] args) {DeadLockTest td1 = new DeadLockTest();DeadLockTest td2 = new DeadLockTest();td1.flag = 1;td2.flag = 0;//td1,td2都处于可执行状态,但JVM线程调度先执行哪个线程是不确定的。//td2的run()可能在td1的run()之前运行new Thread(td1).start();new Thread(td2).start();}
}

编译运行,执行jstack

(base) PS C:\Users\zishi> jstack 21744
2023-11-09 18:47:14
Full thread dump Java HotSpot(TM) 64-Bit Server VM (11.0.13+10-LTS-370 mixed mode):Threads class SMR info:
_java_thread_list=0x000001d91fca51a0, length=12, elements={
0x000001d91fa90800, 0x000001d91fab5800, 0x000001d91fb2b800, 0x000001d91fb2c800,
0x000001d91fb2e000, 0x000001d91fb31000, 0x000001d91fb32800, 0x000001d91fb35800,
0x000001d91fcb6800, 0x000001d91fcbc000, 0x000001d91fcbc800, 0x000001d972982000
}"Reference Handler" #2 daemon prio=10 os_prio=2 cpu=0.00ms elapsed=18.72s tid=0x000001d91fa90800 nid=0x2aac waiting on condition  [0x000000aacf8ff000]java.lang.Thread.State: RUNNABLEat java.lang.ref.Reference.waitForReferencePendingList(java.base@11.0.13/Native Method)at java.lang.ref.Reference.processPendingReferences(java.base@11.0.13/Reference.java:241)at java.lang.ref.Reference$ReferenceHandler.run(java.base@11.0.13/Reference.java:213)"Finalizer" #3 daemon prio=8 os_prio=1 cpu=0.00ms elapsed=18.72s tid=0x000001d91fab5800 nid=0x2224 in Object.wait()  [0x000000aacf9fe000]java.lang.Thread.State: WAITING (on object monitor)at java.lang.Object.wait(java.base@11.0.13/Native Method)- waiting on <0x0000000623a08fa8> (a java.lang.ref.ReferenceQueue$Lock)at java.lang.ref.ReferenceQueue.remove(java.base@11.0.13/ReferenceQueue.java:155)- waiting to re-lock in wait() <0x0000000623a08fa8> (a java.lang.ref.ReferenceQueue$Lock)at java.lang.ref.ReferenceQueue.remove(java.base@11.0.13/ReferenceQueue.java:176)at java.lang.ref.Finalizer$FinalizerThread.run(java.base@11.0.13/Finalizer.java:170)"Signal Dispatcher" #4 daemon prio=9 os_prio=2 cpu=0.00ms elapsed=18.70s tid=0x000001d91fb2b800 nid=0x3bcc runnable  [0x0000000000000000]java.lang.Thread.State: RUNNABLE"Attach Listener" #5 daemon prio=5 os_prio=2 cpu=0.00ms elapsed=18.70s tid=0x000001d91fb2c800 nid=0x3740 waiting on condition  [0x0000000000000000]java.lang.Thread.State: RUNNABLE"Service Thread" #6 daemon prio=9 os_prio=0 cpu=0.00ms elapsed=18.70s tid=0x000001d91fb2e000 nid=0xd0c runnable  [0x0000000000000000]java.lang.Thread.State: RUNNABLE"C2 CompilerThread0" #7 daemon prio=9 os_prio=2 cpu=0.00ms elapsed=18.70s tid=0x000001d91fb31000 nid=0x1620 waiting on condition  [0x0000000000000000]java.lang.Thread.State: RUNNABLENo compile task"C1 CompilerThread0" #10 daemon prio=9 os_prio=2 cpu=0.00ms elapsed=18.70s tid=0x000001d91fb32800 nid=0x133c waiting on condition  [0x0000000000000000]java.lang.Thread.State: RUNNABLENo compile task"Sweeper thread" #11 daemon prio=9 os_prio=2 cpu=0.00ms elapsed=18.70s tid=0x000001d91fb35800 nid=0x1368 runnable  [0x0000000000000000]java.lang.Thread.State: RUNNABLE"Common-Cleaner" #12 daemon prio=8 os_prio=1 cpu=0.00ms elapsed=18.67s tid=0x000001d91fcb6800 nid=0x1df8 in Object.wait()  [0x000000aad01fe000]java.lang.Thread.State: TIMED_WAITING (on object monitor)at java.lang.Object.wait(java.base@11.0.13/Native Method)- waiting on <0x0000000623bf37f8> (a java.lang.ref.ReferenceQueue$Lock)at java.lang.ref.ReferenceQueue.remove(java.base@11.0.13/ReferenceQueue.java:155)- waiting to re-lock in wait() <0x0000000623bf37f8> (a java.lang.ref.ReferenceQueue$Lock)at jdk.internal.ref.CleanerImpl.run(java.base@11.0.13/CleanerImpl.java:148)at java.lang.Thread.run(java.base@11.0.13/Thread.java:834)at jdk.internal.misc.InnocuousThread.run(java.base@11.0.13/InnocuousThread.java:134)"Thread-0" #13 prio=5 os_prio=0 cpu=0.00ms elapsed=18.67s tid=0x000001d91fcbc000 nid=0x39d4 waiting for monitor entry  [0x000000aad02ff000]java.lang.Thread.State: BLOCKED (on object monitor)at DeadLockTest.run(DeadLockTest.java:25)- waiting to lock <0x0000000623bf7078> (a java.lang.Object)- locked <0x0000000623bf7068> (a java.lang.Object)at java.lang.Thread.run(java.base@11.0.13/Thread.java:834)"Thread-1" #14 prio=5 os_prio=0 cpu=0.00ms elapsed=18.67s tid=0x000001d91fcbc800 nid=0x7f8 waiting for monitor entry  [0x000000aad03ff000]java.lang.Thread.State: BLOCKED (on object monitor)at DeadLockTest.run(DeadLockTest.java:37)- waiting to lock <0x0000000623bf7068> (a java.lang.Object)- locked <0x0000000623bf7078> (a java.lang.Object)at java.lang.Thread.run(java.base@11.0.13/Thread.java:834)"DestroyJavaVM" #15 prio=5 os_prio=0 cpu=15.63ms elapsed=18.67s tid=0x000001d972982000 nid=0x5744 waiting on condition  [0x0000000000000000]java.lang.Thread.State: RUNNABLE"VM Thread" os_prio=2 cpu=0.00ms elapsed=18.73s tid=0x000001d91fa8f800 nid=0x222c runnable"GC Thread#0" os_prio=2 cpu=0.00ms elapsed=18.77s tid=0x000001d972996800 nid=0x5144 runnable"G1 Main Marker" os_prio=2 cpu=0.00ms elapsed=18.77s tid=0x000001d972a17800 nid=0x4180 runnable"G1 Conc#0" os_prio=2 cpu=0.00ms elapsed=18.77s tid=0x000001d972a19000 nid=0x3380 runnable"G1 Refine#0" os_prio=2 cpu=0.00ms elapsed=18.75s tid=0x000001d97fde5800 nid=0x2ba4 runnable"G1 Young RemSet Sampling" os_prio=2 cpu=0.00ms elapsed=18.75s tid=0x000001d97fde6800 nid=0x2f8c runnable
"VM Periodic Task Thread" os_prio=2 cpu=0.00ms elapsed=18.67s tid=0x000001d91fcb6000 nid=0x2990 waiting on conditionJNI global refs: 6, weak refs: 0Found one Java-level deadlock:
=============================
"Thread-0":waiting to lock monitor 0x000001d91fabff80 (object 0x0000000623bf7078, a java.lang.Object),which is held by "Thread-1"
"Thread-1":waiting to lock monitor 0x000001d91fabcc80 (object 0x0000000623bf7068, a java.lang.Object),which is held by "Thread-0"Java stack information for the threads listed above:
===================================================
"Thread-0":at DeadLockTest.run(DeadLockTest.java:25)- waiting to lock <0x0000000623bf7078> (a java.lang.Object)- locked <0x0000000623bf7068> (a java.lang.Object)at java.lang.Thread.run(java.base@11.0.13/Thread.java:834)
"Thread-1":at DeadLockTest.run(DeadLockTest.java:37)- waiting to lock <0x0000000623bf7068> (a java.lang.Object)- locked <0x0000000623bf7078> (a java.lang.Object)at java.lang.Thread.run(java.base@11.0.13/Thread.java:834)Found 1 deadlock.

说明:

Thread-1:线程名
prio:优先级
os_prio:操作系统级别的线程优先级
tid:线程id
nid:线程对应本地线程id
java.lang.Thread.State:线程状态

可以看到有一个 dead lock
Found one Java-level deadlock:
jstack还帮我们打印了死锁产生的原因
打印了死锁产生的原因之外,还帮我们定位到了java的代码行数:

Found one Java-level deadlock:
=============================
"Thread-0":waiting to lock monitor 0x000001d91fabff80 (object 0x0000000623bf7078, a java.lang.Object),which is held by "Thread-1"
"Thread-1":waiting to lock monitor 0x000001d91fabcc80 (object 0x0000000623bf7068, a java.lang.Object),which is held by "Thread-0"Java stack information for the threads listed above:
===================================================
"Thread-0":at DeadLockTest.run(DeadLockTest.java:25)- waiting to lock <0x0000000623bf7078> (a java.lang.Object)- locked <0x0000000623bf7068> (a java.lang.Object)at java.lang.Thread.run(java.base@11.0.13/Thread.java:834)
"Thread-1":at DeadLockTest.run(DeadLockTest.java:37)- waiting to lock <0x0000000623bf7068> (a java.lang.Object)- locked <0x0000000623bf7078> (a java.lang.Object)at java.lang.Thread.run(java.base@11.0.13/Thread.java:834)Found 1 deadlock.

参考:
https://juejin.cn/post/6957903936657293319#heading-3

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

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

相关文章

ElasticSearch7.x - HTTP 操作 - 文档操作

创建文档(添加数据) 索引已经创建好了,接下来我们来创建文档,并添加数据。这里的文档可以类比为关系型数 据库中的表数据,添加的数据格式为 JSON 格式 向 ES 服务器发 POST 请求 :http://192.168.254.101:9200/shopping/_doc 请求体内容为: {"title":"小…

【Python 千题 —— 基础篇】账号登录

题目描述 题目描述 简易登录系统。你的账号密码分别是 “student”&#xff0c;“123456”&#xff1b;请使用 if-else 设计一个简易登录系统&#xff0c;输入账号密码。登陆成功输出 “Welcome !”&#xff0c;登录失败输出 “Login failed !” 输入描述 输入账号和密码。…

idea配置tomcat参数,防止nvarchar保存韩文、俄文、日文等乱码

描述下我的场景&#xff1a; 数据库服务器在远程机器上&#xff0c;数据库使用的Oracle&#xff0c;字符集是ZHS16GBK&#xff0c;但保存韩文、俄文、日文等字段A的数据类型是nvarchar(120)&#xff0c;而nvarchar使用的是Unicode 编码&#xff0c;有点乱。。 遇到的问题&…

【机器学习范式】监督学习,无监督学习,强化学习, 半监督学习,自监督学习,迁移学习,对比分析+详解与示例代码

目录 1. 监督学习 (Supervised Learning): 2. 无监督学习 (Unsupervised Learning): 3. 强化学习 (Reinforcement Learning): 4. 半监督学习 (Semi-Supervised Learning): 5. 自监督学习 (Self-Supervised Learning): 6. 迁移学习 (Transfer Learning): 7 机器学习范式应…

AI:67-基于深度学习的脱机手写汉字识别

🚀 本文选自专栏:AI领域专栏 从基础到实践,深入了解算法、案例和最新趋势。无论你是初学者还是经验丰富的数据科学家,通过案例和项目实践,掌握核心概念和实用技能。每篇案例都包含代码实例,详细讲解供大家学习。 📌📌📌在这个漫长的过程,中途遇到了不少问题,但是…

『Linux升级路』基础开发工具——vim篇

&#x1f525;博客主页&#xff1a;小王又困了 &#x1f4da;系列专栏&#xff1a;Linux &#x1f31f;人之为学&#xff0c;不日近则日退 ❤️感谢大家点赞&#x1f44d;收藏⭐评论✍️ 目录 一、vim的基本概念 &#x1f4d2;1.1命令模式 &#x1f4d2;1.2插入模式 &…

dcat admin 各种问题

样式问题 如何根据条件给表格数据栏添加背景色 use Illuminate\Support\Collection;protected function grid(){return Grid::make(new BookArticle(), function (Grid $grid) {... 其他代码// Collection的完整路径&#xff1a;Illuminate\Support\Collection;$grid->row…

Spark的执行计划

Spark 3.0 大版本发布&#xff0c;Spark SQL 的优化占比将近 50%。Spark SQL 取代 Spark Core&#xff0c;成为新一代的引擎内核&#xff0c;所有其他子框架如 Mllib、Streaming 和 Graph&#xff0c;都可以共享 Spark SQL 的性能优化&#xff0c;都能从 Spark 社区对于 Spark …

笔记:AI量化策略开发流程-基于BigQuant平台(一)

从本文开始&#xff0c;按照AI策略开发的完整流程&#xff08;共七步&#xff09;&#xff0c;上手在BigQuant平台上快速构建AI策略。本文首先介绍如何使用证券代码模块指定股票范围和数据起止日期。重要的事情说三遍&#xff1a;模块的输入端口有提示需要连线的上游数据类型&a…

魔搭社区LLM模型部署实践, 以ChatGLM3为例(一)

魔搭社区LLM模型部署实践&#xff0c; 以ChatGLM3为 例 本文以ChatGLM3-6B为例&#xff0c; 主要介绍在魔搭社区如何部署LLM&#xff0c; 主要包括如下内容&#xff1a; ● SwingDeploy - 云端部署&#xff0c; 实现零代码一键部署 ● 多端部署 - MAC个人笔记本&#xff0c;…

快速入门安装及使用git与svn的区别常用命令

一、导言 1、什么是svn&#xff1f; SVN是Subversion的简称&#xff0c;是一个集中式版本控制系统。与Git不同&#xff0c;SVN没有分布式的特性。在SVN中&#xff0c;项目的代码仓库位于服务器上&#xff0c;团队成员通过向服务器提交和获取代码来实现版本控制。SVN记录了每个…

Leetcode刷题详解—— 目标和

1. 题目链接&#xff1a;494. 目标和 2. 题目描述&#xff1a; 给你一个非负整数数组 nums 和一个整数 target 。 向数组中的每个整数前添加 或 - &#xff0c;然后串联起所有整数&#xff0c;可以构造一个 表达式 &#xff1a; 例如&#xff0c;nums [2, 1] &#xff0c;可…

时间序列预测实战(十二)DLinear模型实现滚动长期预测并可视化预测结果

官方论文地址->官方论文地址 官方代码地址->官方代码地址 个人修改代码->个人修改的代码已经上传CSDN免费下载 一、本文介绍 本文给大家带来是DLinear模型&#xff0c;DLinear是一种用于时间序列预测&#xff08;TSF&#xff09;的简单架构&#xff0c;DLinear的核…

Ansible自动化运维工具及模块

目录 一、Ansible 1.ansible简介 2、ansible的特性 二、ansible的部署 1&#xff09;管理端安装ansible 2&#xff09;配置主机清单 3&#xff09;配置密钥对验证 三、ansible命令块模块 1&#xff09;command模块 2&#xff09;shell模块 3&#xff09;cron模块 4)…

Jdk 1.8 for mac 详细安装教程(含版本切换)

Jdk 1.8 for mac 详细安装教程&#xff08;含版本切换&#xff09; 官网下载链接 https://www.oracle.com/cn/java/technologies/downloads/#java8-mac 一、选择我们需要安装的jdk版本&#xff0c;这里以jdk8为例&#xff0c;下载 macOS 版本&#xff0c;M芯片下载ARM64版本…

数据结构之双向链表

目录 引言 链表的分类 双向链表的结构 双向链表的实现 定义 创建新节点 初始化 打印 尾插 头插 判断链表是否为空 尾删 头删 查找与修改 指定插入 指定删除 销毁 顺序表和双向链表的优缺点分析 源代码 dlist.h dlist.c test.c 引言 数据结构…

网络通信TCP、UDP详解

目录 IP 和端口 网络传输中的 2 个对象&#xff1a;server 和 client 两种传输方式&#xff1a;TCP/UDP TCP 和 UDP 原理上的区别 为何存在 UDP 协议 TCP/UDP 网络通信大概交互图 IP 和端口 所有的数据传输&#xff0c;都有三个要素 &#xff1a;源、目的、长度。 怎么表…

ZYNQ_project:IP_ram_pll_test

例化MMCM ip核&#xff0c;产生100Mhz&#xff0c;100Mhz并相位偏移180&#xff0c;50Mhz&#xff0c;25Mhz的时钟信号。 例化单口ram&#xff0c;并编写读写控制器&#xff0c;实现32个数据的写入与读出。 模块框图&#xff1a; 代码&#xff1a; module ip_top(input …

基于FPGA的PS端的Si5340的控制

1、功能 Si5340/41-D可以输出任意频率&#xff0c;当然有范围&#xff0c;100Hz1GHz。外部输入为24M或者4854M的XTAL&#xff0c;VCO在13500~14256Mhz之间&#xff0c;控制接口采用IIC或者SPI。 芯片架构图 2、IIC控制方式 3、直接上控制代码 使用米联客ZU3EG&#xff0c;将…