2 Documentation Robot keyword library for Monitoring JVM resources
3 Library ${CURDIR}/Appenders/ElasticsearchAppender.py
4 Variables ${CURDIR}/../variables/Variables.py
8 [Documentation] Return latest jvm Memory object
9 [Arguments] ${controller-ip}=${ODL_SYSTEM_IP} ${elastic-port}=${ELASTICPORT}
10 ${session} ElasticsearchAppender.Get_Connection ${controller-ip} ${elastic-port}
11 ${value}= ElasticsearchAppender.Get Jvm Memory ${session}
16 [Documentation] Return latest jvm Threading object
17 [Arguments] ${controller-ip}=${ODL_SYSTEM_IP} ${elastic-port}=${ELASTICPORT}
18 ${session} ElasticsearchAppender.Get_Connection ${controller-ip} ${elastic-port}
19 ${value}= ElasticsearchAppender.Get Jvm Threading ${session}
24 [Documentation] Return latest jvm Classloading object
25 [Arguments] ${controller-ip}=${ODL_SYSTEM_IP} ${elastic-port}=${ELASTICPORT}
26 ${session} ElasticsearchAppender.Get_Connection ${controller-ip} ${elastic-port}
27 ${value}= ElasticsearchAppender.Get Jvm Classloading ${session}
31 Get JVM Operatingsystem
32 [Documentation] Return latest jvm Operatingsystem object
33 [Arguments] ${controller-ip}=${ODL_SYSTEM_IP} ${elastic-port}=${ELASTICPORT}
34 ${session} ElasticsearchAppender.Get_Connection ${controller-ip} ${elastic-port}
35 ${value}= ElasticsearchAppender.Get Jvm Operatingsystem ${session}
40 [Documentation] Draw Resource usage plot using plot_points method.
41 [Arguments] ${controllers_number}=${NUM_ODL_SYSTEM} ${elastic-port}=${ELASTICPORT}
42 : FOR ${index} IN RANGE 1 ${controllers_number}+1
43 \ ${controller-ip}= Builtin.Set Variable ${ODL_SYSTEM_${index}_IP}
44 \ Log ${controller-ip}
45 \ ${session} ElasticsearchAppender.Get_Connection ${controller-ip} ${elastic-port}
47 \ ElasticsearchAppender.Plot Points ${session} JVM ThreadCount threadcount_${index}.png 'Threading' 'TotalStartedThreadCount'
48 \ ElasticsearchAppender.Plot Points ${session} JVM Heap Memory heapmemory_${index}.png 'Memory' 'HeapMemoryUsage' 'used'
49 \ ElasticsearchAppender.Plot Points ${session} JVM LoadedClassCount class_count_${index}.png 'ClassLoading' 'TotalLoadedClassCount'
50 \ ElasticsearchAppender.Plot Points ${session} JVM CPU Usage cpu_usage_${index}.png 'OperatingSystem' 'ProcessCpuLoad'