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eid=e*e5fƒq9d=e*e5fGHne6e+joPqÉqÉWe6ejoDd>e5GHeejoeid?e5e*fƒq d?e5e*fGHq¶q¶WHeejo?eid@e"ddƒeidAe%ƒeidBe/ƒn%d@e"ddGHdAe%GHdBe/GHHeejodCZ8eieeiƒoGy9eeƒi ƒZ8ei9eedDƒdEeefGHWq… q… XneedFƒZ:x`e8D]XZeidGƒoq› q› eidHƒoq› q› eidIƒoq› q› e:i;eƒq› We:i;dJe"ddƒe:i;dKe%ƒe:i;dLe/ƒe:i<ƒn.dMeGHdNe"ddGHdOe%GHdPe/GHHeejo)dQZ=eieeiƒoGy9eeƒi ƒZ=ei9eedDƒdEeefGHWqÝ qÝ XneedFƒZ:xge=D]_ZeZ>x/e4D]'Z5eiƒde5jo e+Z>q q We>e+joqó qó e:i;eƒqó Wx<e4D]4Z5e:i;dRe5e$fƒe:i;dSe5e$fƒq] We:i<ƒn9dMeGHx,e4D]$Z5dTe5e$fGHdUe5e$fGHq³ WHdVGHde dGHde"GHde dGHdWe%GHde"GHde de"GHde*e/fGHHdS(XNs/etc/sysctl.confsCannot access %sis%/etc/security/limits.d/hugepages.confs /proc/meminfois MemTotal:sHugePages_Total:s Hugepagesize:s1Aborting, cannot determine system huge page size!s/sbin/sysctl -askernel.shmmax = isvm.nr_hugepages = svm.hugetlb_shm_group = tnulls/usr/bin/getent groupt:sCurrent configuration:s$ * Total System Memory......: %6d MBis$ * Shared Mem Max Mapping...: %6d MBs$ * System Huge Page Size....: %6d MBs! * Number of Huge Pages.....: %6ds$ * Total size of Huge Pages.: %6d MBs$ * Remaining System Memory..: %6d MBs& * Huge Page User Group.....: %s (%d)i@sdHow much memory would you like to allocate for huge pages? (input in MB, unless postfixed with GB): iþÿÿÿtGBiÿÿÿÿtGtMBtMs:Sorry, the most I'll let you allocate is %d MB, try again!s2Sorry, allocation must be at least a page's worth!s+Input must be an integer, please try again!s3Okay, we'll try to allocate %d MB for huge pages...s \'":;~`!$^&*(){}[]?/><,sZWhat group should have access to the huge pages? (The group will be created, if need be): s.You must input a group name, please try again!t-sAGroup names cannot start with a number or dash, please try again!s3Illegal characters in group name, please try again!is@Group names can't be more than 16 characaters, please try again!s2Okay, we'll give group %s access to the huge pagess.Group %s (gid %d) already exists, we'll use its/usr/sbin/groupadd %ss/usr/bin/getent group %ss+Created group %s (gid %d) for huge page uses\'":;~`!$^&*(){}[]?/><,scWhat user(s) should have access to the huge pages (space-delimited list, users created as needed)? sLIllegal characters in user name(s) or invalid list format, please try again!i s?User names can't be more than 32 characaters, please try again!s6User names cannot start with a dash, please try again!s/usr/bin/getent passwds!Adding user %s to huge page groups/usr/sbin/usermod -a -G %s %ss3Creating user %s with membership in huge page groups/usr/sbin/useradd %s -G %ss /sbin/sysctl -w kernel.shmmax=%ds"/sbin/sysctl -w vm.nr_hugepages=%ds'/sbin/sysctl -w vm.hugetlb_shm_group=%ds# sysctl configuration s.backupsSaved original %s as %s.backuptws kernel.shmmaxsvm.nr_hugepagessvm.hugetlb_shm_groupskernel.shmmax = %d svm.nr_hugepages = %d svm.hugetlb_shm_group = %d s Add to %s:skernel.shmmax = %dsvm.nr_hugepages = %dsvm.hugetlb_shm_group = %ds!# Huge page access configuration s%s soft memlock %d s%s hard memlock %d s%s soft memlock %ds%s hard memlock %dsFinal configuration:s! * Available Huge Pages.....: %6d(?tostFalsetdebugt sysctlConftaccesstW_OKt_exitt limitsConftopent readlinestmemInfotmemTotalt hugePagest hugePageSizetlinet startswithtinttsplittshmmaxt nr_hugepagesthugeGIDtpopent sysctlCurt hugeGIDNamet groupNamestcurGIDt halfOfMemt allMemLess2GtmaxHugePageReqKBtmaxHugePageReqMBtmaxHugePageReqtNonetuserInt raw_inputtuserHugePageReqMBt ValueErrortuserHugePageReqKBtuserHugePagesReqtlisttbadcharst inputIsValidtfoundbadt userGroupReqtTruetisdigittchartlent userGIDReqt curGroupNamet userUsersReqtnt curUserListthugePageUserListthugeUsert userExiststcurUsertsysctlConfLinestrenametfdtwritetclosetlimitsConfLinestcfgExist(+R!R/RRR R>RR5R*RRR#R?R7RR(R2R=R8R,RFR0R<RR1R$R-RR RRBR"R&RRER;RR:R9R RR@R%((t"/usr/bin/huge_page_setup_helper.pyt? s                                 "