com.vmware.vim25.mo.samples.perf.RealtimePerfMonitor.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!
???? 2R 4com/vmware/vim25/mo/samples/perf/RealtimePerfMonitor java/lang/Object ()V Code
LineNumberTable LocalVariableTable this 6Lcom/vmware/vim25/mo/samples/perf/RealtimePerfMonitor; main ([Ljava/lang/String;)V
Exceptions java/lang/Exception java/lang/System out Ljava/io/PrintStream; DUsage: java RealtimePerfMonitor
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; : java/lang/StringBuilder < Virtual Machine
9 &
9 ? @ A append -(Ljava/lang/String;)Ljava/lang/StringBuilder; C cannot be found.
9 E F G toString ()Ljava/lang/String;
! I J K getServerConnection (()Lcom/vmware/vim25/mo/ServerConnection;
M O N $com/vmware/vim25/mo/ServerConnection P logout
! R S T getPerformanceManager *()Lcom/vmware/vim25/mo/PerformanceManager;
V X W &com/vmware/vim25/mo/PerformanceManager Y Z queryPerfProviderSummary K(Lcom/vmware/vim25/mo/ManagedEntity;)Lcom/vmware/vim25/PerfProviderSummary;
\ ^ ] $com/vmware/vim25/PerfProviderSummary _ ` getRefreshRate ()Ljava/lang/Integer;
b d c java/lang/Integer e f intValue ()I
b h i j valueOf (I)Ljava/lang/Integer;
V l m n queryAvailablePerfMetric ?(Lcom/vmware/vim25/mo/ManagedEntity;Ljava/util/Calendar;Ljava/util/Calendar;Ljava/lang/Integer;)[Lcom/vmware/vim25/PerfMetricId;
p q r createPerfQuerySpec g(Lcom/vmware/vim25/mo/ManagedEntity;[Lcom/vmware/vim25/PerfMetricId;II)Lcom/vmware/vim25/PerfQuerySpec; t com/vmware/vim25/PerfQuerySpec
V v w x queryPerf K([Lcom/vmware/vim25/PerfQuerySpec;)[Lcom/vmware/vim25/PerfEntityMetricBase;
z { |
displayValues +([Lcom/vmware/vim25/PerfEntityMetricBase;)V ~ Sleeping 60 seconds...
? ? ? java/lang/Thread ? ? sleep (J)V args [Ljava/lang/String; si %Lcom/vmware/vim25/mo/ServiceInstance; vmname Ljava/lang/String; vm #Lcom/vmware/vim25/mo/ManagedEntity; perfMgr (Lcom/vmware/vim25/mo/PerformanceManager; pps &Lcom/vmware/vim25/PerfProviderSummary; refreshRate I pmis [Lcom/vmware/vim25/PerfMetricId; qSpec Lcom/vmware/vim25/PerfQuerySpec; pValues ([Lcom/vmware/vim25/PerfEntityMetricBase;
StackMapTable ? java/lang/String ? !com/vmware/vim25/mo/ManagedEntity ? ? ?
s
? ? ? ? getMOR +()Lcom/vmware/vim25/ManagedObjectReference;
s ? ? ? setEntity ,(Lcom/vmware/vim25/ManagedObjectReference;)V
b ? ? (I)V
s ? ? ? setMaxSample (Ljava/lang/Integer;)V ? csv
s ? ? setFormat
s ? ? ?
setIntervalId me metricIds maxSample interval
? ? ? %com/vmware/vim25/PerfEntityMetricBase ? ? getEntity
? ? ? 'com/vmware/vim25/ManagedObjectReference ? G getType
? ? i ? &(Ljava/lang/Object;)Ljava/lang/String; ? :
? ? ? G get_value ? Entity: ? !com/vmware/vim25/PerfEntityMetric
? ? ? printPerfMetric &(Lcom/vmware/vim25/PerfEntityMetric;)V ? $com/vmware/vim25/PerfEntityMetricCSV
? ? ? printPerfMetricCSV )(Lcom/vmware/vim25/PerfEntityMetricCSV;)V ? ,UnExpected sub-type of PerfEntityMetricBase. values i
entityDesc
? ? ? ? getValue &()[Lcom/vmware/vim25/PerfMetricSeries;
? ? ? ?
getSampleInfo $()[Lcom/vmware/vim25/PerfSampleInfo; ? Sampling Times and Intervales: ?
Sample time:
? ? ? com/vmware/vim25/PerfSampleInfo ? ? getTimestamp ()Ljava/util/Calendar;
? ? ? java/util/Calendar ? ? getTime ()Ljava/util/Date;
9 ? @ ? -(Ljava/lang/Object;)Ljava/lang/StringBuilder; ? Sample interval (sec):
? f getInterval
9 @ (I)Ljava/lang/StringBuilder; Sample values: Perf counter ID:
!com/vmware/vim25/PerfMetricSeries
getId !()Lcom/vmware/vim25/PerfMetricId;
com/vmware/vim25/PerfMetricId f getCounterId Device instance ID:
G getInstance $com/vmware/vim25/PerfMetricIntSeries
? ()[J
? i (J)Ljava/lang/String;"
$% print' Total:) $com/vmware/vim25/PerfMetricSeriesCSV+
CSV value:
(- ? G pem #Lcom/vmware/vim25/PerfEntityMetric; vals $[Lcom/vmware/vim25/PerfMetricSeries; infos "[Lcom/vmware/vim25/PerfSampleInfo; j val &Lcom/vmware/vim25/PerfMetricIntSeries; longs [J k &Lcom/vmware/vim25/PerfMetricSeriesCSV;138? SampleInfoCSV:
?AB G getSampleInfoCSV
?D ?E )()[Lcom/vmware/vim25/PerfMetricSeriesCSV;G PerfCounterId:
(J CSV sample values: pems &Lcom/vmware/vim25/PerfEntityMetricCSV; csvs '[Lcom/vmware/vim25/PerfMetricSeriesCSV;N
SourceFile RealtimePerfMonitor.java ! / *? ?
6
?*?? ? ? ?? !Y? #Y*2? %*2*2? 'L*2M? *Y+? ,? 03,? 5N-? &? ? 9Y;? =,? >B? >? D? +? H? L?+? Q:-? U:? [? a6-? g? k:-? o:? sYS? u: ? ? y? }? h?h?? ???
? # : <