Hi,
I am creating a code in python to check the Garbage collection but its erroring out with the below error message as. Can anyone please help me out.
File "/u01/app/oracle/Middleware/user_projects/domains/base_domain/GC_check.py", line 11
free = int(server.getJVMRuntime().getHeapFreeCurrent())/(1024*1024)
^
IndentationError: expected an indented block
#!/usr/bin/env python
import shutil
import os
wlsUserID = java.lang.System.getenv('wlsUserID')
wlsPassword = java.lang.System.getenv('wlsPassword')
connect( url='t3://localhost:7010', adminServerName='AdminServer')
domainRuntime()
servers=domainRuntimeService.getServerRuntimes();
printf('#Java heap information for ')
for server in servers:
free = int(server.getJVMRuntime().getHeapFreeCurrent())/(1024*1024)
freePct = int(server.getJVMRuntime().getHeapFreePercent())
current = int(server.getJVMRuntime().getHeapSizeCurrent())/(1024*1024)
max = int(server.getJVMRuntime().getHeapSizeMax())/(1024*1024)
disconnect()
exit()
Thanks,
Anindya.