Adding mariadb service management
This commit is contained in:
@ -6,8 +6,8 @@ def getMemoryPercentage(percent):
|
||||
percent = int(percent)
|
||||
totalMemory = os.sysconf('SC_PAGE_SIZE') * os.sysconf('SC_PHYS_PAGES')
|
||||
memoryToUse = (totalMemory*percent)/100
|
||||
memoryMb = memoryToUse/(1024.**2)
|
||||
return "{0}M".format(int(memoryMb))
|
||||
memoryMb = int(memoryToUse/(1024.**2))
|
||||
return "{0}M".format(memoryMb)
|
||||
except:
|
||||
return "Error during memory percentage calculation"
|
||||
|
||||
|
Reference in New Issue
Block a user