2015-10-21
- jennifer
- martym
package fx.jvm.hotspot.tools; | |
import java.util.List; | |
import sun.jvm.hotspot.tools.Tool; | |
public class PrintThreadIds extends Tool { | |
public static void main(String[] args) { | |
PrintThreadIds tool = new PrintThreadIds(); | |
tool.start(args); |
# Original version: http://blog.tsunanet.net/2010/08/jpmp-javas-poor-mans-profiler.html | |
# Usage: ./jpmp.sh <pid> <num-samples> <sleep-time-between-samples> | |
#!/bin/bash | |
pid=$1 | |
nsamples=$2 | |
sleeptime=$3 | |
for x in $(seq 1 $nsamples) |
$ java -version | |
java version "1.6.0_25" | |
Java(TM) SE Runtime Environment (build 1.6.0_25-b06) | |
Java HotSpot(TM) 64-Bit Server VM (build 20.0-b11, mixed mode) | |
$ alias -p | grep clhsdb | |
alias clhsdb='java -classpath .:$JAVA_HOME/lib/sa-jdi.jar sun.jvm.hotspot.CLHSDB' | |
$ clhsdb | |
hsdb> help | |
Available commands: | |
assert true | false |
import java.io.*; | |
import java.util.*; | |
import sun.jvm.hotspot.memory.*; | |
import sun.jvm.hotspot.oops.*; | |
import sun.jvm.hotspot.debugger.*; | |
import sun.jvm.hotspot.runtime.*; | |
import sun.jvm.hotspot.tools.*; | |
import sun.jvm.hotspot.utilities.*; | |
public class DirectMemorySize extends Tool { |
# -*- coding: utf-8 -*- | |
from math import * | |
from random import * | |
### 一次测试 ### | |
def test(): | |
speed = 4.0 #初速度 | |
distance = 0 #已经走过的距离 | |
threshold = log(50) / 100 #每秒中枪的概率 |
apiVersion: apps/v1 | |
kind: DaemonSet | |
metadata: | |
name: disk-checker | |
labels: | |
app: disk-checker | |
spec: | |
selector: | |
matchLabels: | |
app: disk-checker |