com.vmware.vim25.mo.samples.perf.GetMultiPerf.class Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vijava Show documentation
Show all versions of vijava Show documentation
Java API for accessing VMWare web services API
The newest version!
???? 2[ -com/vmware/vim25/mo/samples/perf/GetMultiPerf java/lang/Object ()V Code
LineNumberTable LocalVariableTable this /Lcom/vmware/vim25/mo/samples/perf/GetMultiPerf; main ([Ljava/lang/String;)V
Exceptions java/lang/Exception java/lang/System out Ljava/io/PrintStream; =Usage: java GetMultiPerf
java/io/PrintStream println (Ljava/lang/String;)V " #com/vmware/vim25/mo/ServiceInstance $ java/net/URL
# &
! ( ) 6(Ljava/net/URL;Ljava/lang/String;Ljava/lang/String;Z)V + &com/vmware/vim25/mo/InventoryNavigator
! - . /
getRootFolder ()Lcom/vmware/vim25/mo/Folder;
* 1 2 &(Lcom/vmware/vim25/mo/ManagedEntity;)V 4 VirtualMachine
* 6 7 8 searchManagedEntity I(Ljava/lang/String;Ljava/lang/String;)Lcom/vmware/vim25/mo/ManagedEntity; : "com/vmware/vim25/mo/VirtualMachine < java/lang/StringBuilder > Virtual Machine
; &
; A B C append -(Ljava/lang/String;)Ljava/lang/StringBuilder; E cannot be found.
; G H I toString ()Ljava/lang/String;
! K L M getServerConnection (()Lcom/vmware/vim25/mo/ServerConnection;
O Q P $com/vmware/vim25/mo/ServerConnection R logout
! T U V getPerformanceManager *()Lcom/vmware/vim25/mo/PerformanceManager;
X Z Y java/lang/Integer [ \ valueOf (I)Ljava/lang/Integer;
^ ` _ &com/vmware/vim25/mo/PerformanceManager a b queryAvailablePerfMetric ?(Lcom/vmware/vim25/mo/ManagedEntity;Ljava/util/Calendar;Ljava/util/Calendar;Ljava/lang/Integer;)[Lcom/vmware/vim25/PerfMetricId;
! d e f currentTime ()Ljava/util/Calendar; h com/vmware/vim25/PerfQuerySpec
g
9 k l m
getRuntime .()Lcom/vmware/vim25/VirtualMachineRuntimeInfo;
o q p *com/vmware/vim25/VirtualMachineRuntimeInfo r s getHost +()Lcom/vmware/vim25/ManagedObjectReference;
g u v w setEntity ,(Lcom/vmware/vim25/ManagedObjectReference;)V
g y z { setMetricId #([Lcom/vmware/vim25/PerfMetricId;)V } normal
g ? setFormat
g ? ? ?
setIntervalId (Ljava/lang/Integer;)V
? ? ? java/util/Calendar ? ? clone ()Ljava/lang/Object;
? ? ? ? roll (II)V ? start:
? ? ? ? getTime ()Ljava/util/Date;
; ? B ? -(Ljava/lang/Object;)Ljava/lang/StringBuilder;
g ? ? ? setStartTime (Ljava/util/Calendar;)V ? end:
g ? ? ?
setEndTime
^ ? ? ? queryPerfComposite H(Lcom/vmware/vim25/PerfQuerySpec;)Lcom/vmware/vim25/PerfCompositeMetric;
? ? ? $com/vmware/vim25/PerfCompositeMetric ? ? getEntity )()Lcom/vmware/vim25/PerfEntityMetricBase;
? ? ? printPerfMetric *(Lcom/vmware/vim25/PerfEntityMetricBase;)V
? ? ? ? getChildEntity *()[Lcom/vmware/vim25/PerfEntityMetricBase; args [Ljava/lang/String; si %Lcom/vmware/vim25/mo/ServiceInstance; vmname Ljava/lang/String; vm $Lcom/vmware/vim25/mo/VirtualMachine; perfMgr (Lcom/vmware/vim25/mo/PerformanceManager; perfInterval I pmis [Lcom/vmware/vim25/PerfMetricId; curTime Ljava/util/Calendar; qSpec Lcom/vmware/vim25/PerfQuerySpec; startTime endTime pv &Lcom/vmware/vim25/PerfCompositeMetric; pembs ([Lcom/vmware/vim25/PerfEntityMetricBase; i
StackMapTable ? java/lang/String ? ? ?
? ? ? %com/vmware/vim25/PerfEntityMetricBase ? s
? ? ? 'com/vmware/vim25/ManagedObjectReference ? I getType
? ? [ ? &(Ljava/lang/Object;)Ljava/lang/String; ? :
? ? ? I get_value ? Entity: ? !com/vmware/vim25/PerfEntityMetric
? ? ? &(Lcom/vmware/vim25/PerfEntityMetric;)V ? $com/vmware/vim25/PerfEntityMetricCSV
? ? ? printPerfMetricCSV )(Lcom/vmware/vim25/PerfEntityMetricCSV;)V ? ,UnExpected sub-type of PerfEntityMetricBase. val 'Lcom/vmware/vim25/PerfEntityMetricBase;
entityDesc
? ? ? ? getValue &()[Lcom/vmware/vim25/PerfMetricSeries;
? ? ? ?
getSampleInfo $()[Lcom/vmware/vim25/PerfSampleInfo; ? Sampling Times and Intervales:
sample time:
com/vmware/vim25/PerfSampleInfo f getTimestamp sample interval (sec):
getInterval ()I
;
B (I)Ljava/lang/StringBuilder;
Sample values: Perf counter ID:
!com/vmware/vim25/PerfMetricSeries getId !()Lcom/vmware/vim25/PerfMetricId;
com/vmware/vim25/PerfMetricId getCounterId Device instance ID:
!" I getInstance$ $com/vmware/vim25/PerfMetricIntSeries
#& ?' ()[J
?) [* (J)Ljava/lang/String;,
./ print1 Total:3 $com/vmware/vim25/PerfMetricSeriesCSV5
CSV value:
27 ? I pem #Lcom/vmware/vim25/PerfEntityMetric; vals $[Lcom/vmware/vim25/PerfMetricSeries; infos "[Lcom/vmware/vim25/PerfSampleInfo; j &Lcom/vmware/vim25/PerfMetricIntSeries; longs [J k &Lcom/vmware/vim25/PerfMetricSeriesCSV;;=AH SampleInfoCSV:
?JK I getSampleInfoCSV
?M ?N )()[Lcom/vmware/vim25/PerfMetricSeriesCSV;P PerfCounterId:
2S CSV sample values: pems &Lcom/vmware/vim25/PerfEntityMetricCSV; csvs '[Lcom/vmware/vim25/PerfMetricSeriesCSV;W
SourceFile GetMultiPerf.java ! / *? ?
7
^*?? ? ? ?? !Y? #Y*2? %*2*2? 'L*2M? *Y+? ,? 03,? 5? 9N-? &? ? ;Y=? ?,? @D? @? F? +? J? N?+? S:6-? W? ]:+? c:? gY? i:-? j? n? t? x|? ~? W? ?? ?? ?: ?? ?? ? ;Y?? ? ? ?? ?? F? ? ?? ?? ?:
?? ?? ? ;Y?? ?
? ?? ?? F?
? ?? ?:? 0? ?? ?? ?:6
?
2? ??
?
????+? J? N?
? / ; = ? B C $ B ( E , F 0 G 4 F 7 H : G = F A J E L U M ] L ` N g O h R n T s W u X } W ? Z ? \ ? ] ? _ ? ` ? a ? c ? d ? e ? f ? h ? i ? j k m$ n) p1 q8 r> tF rV w] x ? ^ ? ? (6 ? ? ,2 ? ? A ? ? n ? ? ? s ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? l ? ?
$ : ? ? 8 ? ? ; ? ?
? @ ? X ! ? 9? ? ? ! ? 9 ^ ? ? g ? ? ? ?
? ? ? ? e? ;Y*? Ҷ ָ ۷ ? @*? Ҷ ? @? FL? ? ;Y? ?+? @? F? *? ?
*? ? ? *? ?
*? ? ? ? ? ?
*
| } | $ ~ : A ? K ? R ? \ ? d ? e ? ? $ A ? ? ?
? K ? ? ? f G*? ?L*? ?M? ?? >? @? ? ;Y?? ?,2?? ?? ?? F? ? ? ;Y? ?,2??? F? ?,? ,????? ? >? Ӳ ? ;Y? ?+2???? F? ? ? ;Y? ?+2?? ? @? F? +2?#? ]+2?#:?%:6? $? ? ;Y/?(? ?+? @? F?-????ڲ ? ;Y0? ???? F? ? /+2?2? &+2?2:? ? ;Y4? ??6? @? F? ?+? +???)?
~ ? ?
? ? ? # ? 2 ? 5 ? B ? N ? Q ? ^ ? g ? l ? y ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
? ? ?9 ?F ? \ G89 B:;
=<= J ? ? i ?> ? ? R ?? ? K@A ? ,B ? ?C ? '
? DE