S0C: 新生代中Survivor space 0区总空间 S1C: 新生代中Survivor space 1区总空间 S0U:新生代中Survivor space 0区已使用空间 S1U:新生代中Survivor space 1区已使用空间 EC: 新生代中总空间 EU:新生代已使用空间 OC: 老年代总空间 OU:老年代中已使用空间 MC:方法区大小 MU:方法区使用大小 CCSC:压缩类空间大小 CCSU:压缩类空间使用大小 YGC: 从应用程序启动到当前,发生Yang GC 的次数 YGCT: 从应用程序启动到当前,Yang GC所用的时间【单位秒】 FGC: 从应用程序启动到当前,发生Full GC的次数 FGCT: 从应用程序启动到当前,Full GC所用的时间 GCT: 从应用程序启动到当前,用于垃圾回收的总时间【单位秒】
4. jmap 打印指定Java进程(或核心文件、远程调试服务器)的共享对象内存映射或堆内存细节
bogon:~ hzjdemac$ jmap -help
Usage:
jmap [option]
(to connect to running process)
jmap [option]
(to connect to a core file)
jmap [option] [server_id@]
(to connect to remote debug server)
where
is one of:
to print same info as Solaris pmap
-heap to print java heap summary //打印jvm heap的情况,例如GC收集器,参数配置,JVM内存分区情况
-histo[:live] to print histogram of java object heap; if the "live"
suboption is specified, only count live objects //打印jvm heap的直方图。其输出信息包括类名,对象数量,对象占用大小
-clstats to print class loader statistics
-finalizerinfo to print information on objects awaiting finalization
-dump: to dump java heap in hprof binary format
dump-options:
live dump only live objects; if not specified,
all objects in the heap are dumped.
format=b binary format
file= dump heap to
Example: jmap -dump:live,format=b,file=heap.bin
-F force. Use with -dump: or -histo
to force a heap dump or histogram when does not
respond. The "live" suboption is not supported
in this mode.
-h | -help to print this help message
-J to pass directly to the runtime system
示例
bogon:~ hzjdemac$ jmap -heap 16229
Attaching to process ID 16229, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.101-b13
using thread-local object allocation.
Parallel GC with 8 thread(s)
Heap Configuration: //#堆内存初始化配置
MinHeapFreeRatio = 0 //-XX:MinHeapFreeRatio设置JVM堆最小空闲比率
MaxHeapFreeRatio = 100 //-XX:MaxHeapFreeRatio设置JVM堆最大空闲比率
MaxHeapSize = 4294967296 (4096.0MB) //-XX:MaxHeapSize=设置JVM堆的最大大小
NewSize = 89128960 (85.0MB) //-XX:NewSize=设置JVM堆新生代的默认大小
MaxNewSize = 1431306240 (1365.0MB) //-XX:MaxNewSize=设置JVM堆的‘新生代’的最大大小
OldSize = 179306496 (171.0MB) //-XX:OldSize=设置JVM堆的‘老生代’的大小
NewRatio = 2 //#-XX:NewRatio=:‘新生代’和‘老生代’的大小比率
SurvivorRatio = 8 //-XX:SurvivorRatio=设置年轻代中Eden区与Survivor区的大小比值
MetaspaceSize = 21807104 (20.796875MB) //-XX:PermSize=:设置JVM堆的‘持久代’的初始大小
CompressedClassSpaceSize = 1073741824 (1024.0MB)
MaxMetaspaceSize = 17592186044415 MB
G1HeapRegionSize = 0 (0.0MB)
Heap Usage:
PS Young Generation
Eden Space:
capacity = 67108864 (64.0MB)
used = 4026944 (3.84039306640625MB)
free = 63081920 (60.15960693359375MB)
6.000614166259766% used
From Space:
capacity = 11010048 (10.5MB)
used = 0 (0.0MB)
free = 11010048 (10.5MB)
0.0% used
To Space:
capacity = 11010048 (10.5MB)
used = 0 (0.0MB)
free = 11010048 (10.5MB)
0.0% used
PS Old Generation
capacity = 179306496 (171.0MB)
used = 0 (0.0MB)
free = 179306496 (171.0MB)
0.0% used
758 interned Strings occupying 50832 bytes.
bogon:~ hzjdemac$ jmap -histo 16229
num #instances #bytes class name
----------------------------------------------
1: 439 4642832 [I
2: 2553 347560 [C
3: 731 145760 [B
4: 487 55504 java.lang.Class
5: 1699 40776 java.lang.String
6: 584 30504 [Ljava.lang.Object;
7: 115 8280 java.lang.reflect.Field
8: 199 6368 java.io.File
9: 238 5712 java.lang.StringBuilder
10: 89 5696 java.net.URL
11: 11 4136 java.lang.Thread
12: 258 4128 java.lang.Integer
13: 98 3920 java.lang.ref.SoftReference
14: 122 3904 java.util.Hashtable$Entry
...
bogon:~ hzjdemac$ jmap -dump:format=b,file=a.log 16229 //保存快照
Dumping heap to /Users/hzjdemac/a.log ...
Heap dump file created
bogon:~ hzjdemac$ jstack -help
Usage:
jstack [-l]
(to connect to running process)
jstack -F [-m] [-l]
(to connect to a hung process)
jstack [-m] [-l]
(to connect to a core file)
jstack [-m] [-l] [server_id@]
(to connect to a remote debug server)
Options:
-F to force a thread dump. Use when jstack does not respond (process is hung)
-m to print both java and native frames (mixed mode)
-l long listing. Prints additional information about locks
-h or -help to print this help message
示例
bogon:~ hzjdemac$ jstack 16229
2019-03-18 18:27:04
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.101-b13 mixed mode):
"Attach Listener" #13 daemon prio=9 os_prio=31 tid=0x00007fa6c5001000 nid=0xc07 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"DestroyJavaVM" #12 prio=5 os_prio=31 tid=0x00007fa6c589f000 nid=0x1803 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Thread-1" #11 prio=5 os_prio=31 tid=0x00007fa6c589e000 nid=0x5603 waiting for monitor entry [0x000070000c031000]
java.lang.Thread.State: BLOCKED (on object monitor)
at chapter1.DeadLockDemo$2.run(DeadLockDemo.java:38)
- waiting to lock <0x000000076abaccd8> (a java.lang.String)
- locked <0x000000076abacd08> (a java.lang.String)
at java.lang.Thread.run(Thread.java:745)
"Thread-0" #10 prio=5 os_prio=31 tid=0x00007fa6c589d800 nid=0xa903 waiting for monitor entry [0x000070000bf2e000]
java.lang.Thread.State: BLOCKED (on object monitor)
at chapter1.DeadLockDemo$1.run(DeadLockDemo.java:28)
- waiting to lock <0x000000076abacd08> (a java.lang.String)
- locked <0x000000076abaccd8> (a java.lang.String)
at java.lang.Thread.run(Thread.java:745)
...
Edo Interactive在几年前遇到一个大问题:公司使用交易数据来帮助零售商和餐馆进行个性化促销,但其数据仓库没有足够时间去处理所有的信用卡和借记卡交易数据
“我们要花费27小时来处理每日的数据量,”Edo主管基础设施和信息系统的高级副总裁Tim Garnto说道:“所以在2013年,我们放弃了现有的基于PostgreSQL的关系型数据库系统,使用了Hadoop集群作为公司的数
例如我们把scott.dept表生成文本文件的语句写成dept.sql,内容如下:
set pages 50000;
set lines 200;
set trims on;
set heading off;
spool /oracle_backup/log/test/dept.lst;
select deptno||','||dname||','||loc
1. Download and unzip the SonarQube distribution
2. Starting the Web Server
The default port is "9000" and the context path is "/". These values can be changed in &l
昨天在为了把laravel升级到最新的版本,突然之间就出现了如下错误:
ErrorException thrown with message "Declaration of Illuminate\View\Engines\CompilerEngine::handleViewException() should be compatible with Illuminate\View\Eng
import java.util.Arrays;
import java.util.Random;
public class Nim {
/**编程之美 NIM游戏分析
问题:
有N块石头和两个玩家A和B,玩家A先将石头随机分成若干堆,然后按照BABA...的顺序不断轮流取石头,
能将剩下的石头一次取光的玩家获胜,每次取石头时,每个玩家只能从若干堆石头中任选一堆,
今天在测试环境使用yum安装,遇到一个问题:
Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again
处理很简单,修改文件“/etc/yum.repos.d/epel.repo”, 将baseurl的注释取消, mirrorlist注释掉。即可。
&n
今天在linux下做hbase集群的时候,发现hmaster启动成功了,但是用hbase命令进入shell的时候报了一个错误 PleaseHoldException: Master is initializing,查看了日志,大致意思是说master和slave时间不同步,没办法,只好找一种手动同步一下,后来发现一共部署了10来台机器,手动同步偏差又比较大,所以还是从网上找现成的解决方