@@ -36,30 +36,30 @@ Usage
36
36
What beans do I have?
37
37
38
38
``` clojure
39
- (jmx/mbean-names \ "*:*\ ")
39
+ (jmx/mbean-names " *:*" )
40
40
-> #<HashSet [java.lang:type=MemoryPool,name=CMS Old Gen,
41
41
java.lang:type=Memory, ...]
42
42
```
43
43
44
44
What attributes does a bean have?
45
45
46
46
``` clojure
47
- (jmx/attribute-names \ "java.lang:type=Memory\ ")
47
+ (jmx/attribute-names " java.lang:type=Memory" )
48
48
-> (:Verbose :ObjectPendingFinalizationCount
49
49
:HeapMemoryUsage :NonHeapMemoryUsage )
50
50
```
51
51
52
52
What is the value of an attribute?
53
53
54
54
``` clojure
55
- (jmx/read \ "java.lang:type=Memory\ " :ObjectPendingFinalizationCount )
55
+ (jmx/read " java.lang:type=Memory" :ObjectPendingFinalizationCount )
56
56
-> 0
57
57
```
58
58
59
59
Give me all the attributes:
60
60
61
61
``` clojure
62
- (jmx/mbean \ "java.lang:type=Memory\ ")
62
+ (jmx/mbean " java.lang:type=Memory" )
63
63
-> {:NonHeapMemoryUsage
64
64
{:used 16674024 , :max 138412032 , :init 24317952 , :committed 24317952 },
65
65
:HeapMemoryUsage
@@ -71,18 +71,18 @@ Give me all the attributes:
71
71
Find an invoke an operation:
72
72
73
73
``` clojure
74
- (jmx/operation-names \ "java.lang:type=Memory\ ")
74
+ (jmx/operation-names " java.lang:type=Memory" )
75
75
-> (:gc )
76
- (jmx/invoke \ "java.lang:type=Memory\ " :gc )
76
+ (jmx/invoke " java.lang:type=Memory" :gc )
77
77
-> nil
78
78
```
79
79
80
80
Conneting to another process? Just run * any* of the above code
81
81
inside a with-connection:
82
82
83
83
``` clojure
84
- (jmx/with-connection {:host \ "localhost\ ", :port 3000 }
85
- (jmx/mbean \ "java.lang:type=Memory\ "))
84
+ (jmx/with-connection {:host " localhost" , :port 3000 }
85
+ (jmx/mbean " java.lang:type=Memory" ))
86
86
-> {:ObjectPendingFinalizationCount 0 ,
87
87
:HeapMemoryUsage ... etc.}
88
88
```
@@ -94,8 +94,8 @@ in the ref:
94
94
``` clojure
95
95
(jmx/register-mbean
96
96
(jmx/create-bean
97
- (ref {:string-attribute \ "a-string\ "}))
98
- \ "my.namespace:name=Value\ ")}
97
+ (ref {:string-attribute " a-string" }))
98
+ " my.namespace:name=Value" )}
99
99
```
100
100
101
101
Developer Information
0 commit comments