mirror of
				https://github.com/moby/moby.git
				synced 2022-11-09 12:21:53 -05:00 
			
		
		
		
	Checking whether CG_MEM_SWAP is enabled at the current system session
Signed-off-by: CUI Wei <ghostplant@qq.com>
This commit is contained in:
		
							parent
							
								
									c8bf933697
								
							
						
					
					
						commit
						cd7496abb5
					
				
					 1 changed files with 6 additions and 2 deletions
				
			
		|  | @ -217,9 +217,13 @@ echo 'Optional Features:' | ||||||
| 	check_flags CGROUP_PIDS | 	check_flags CGROUP_PIDS | ||||||
| } | } | ||||||
| { | { | ||||||
|  | 	CODE=${EXITCODE} | ||||||
| 	check_flags MEMCG_SWAP MEMCG_SWAP_ENABLED | 	check_flags MEMCG_SWAP MEMCG_SWAP_ENABLED | ||||||
| 	if  is_set MEMCG_SWAP && ! is_set MEMCG_SWAP_ENABLED; then | 	if [ -e /sys/fs/cgroup/memory/memory.memsw.limit_in_bytes ]; then | ||||||
| 		echo "    $(wrap_color '(note that cgroup swap accounting is not enabled in your kernel config, you can enable it by setting boot option "swapaccount=1")' bold black)" | 		echo "    $(wrap_color '(cgroup swap accounting is currently enabled)' bold black)" | ||||||
|  | 		EXITCODE=${CODE} | ||||||
|  | 	elif is_set MEMCG_SWAP && ! is_set MEMCG_SWAP_ENABLED; then | ||||||
|  | 		echo "    $(wrap_color '(cgroup swap accounting is currently not enabled, you can enable it by setting boot option "swapaccount=1")' bold black)" | ||||||
| 	fi | 	fi | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 cuiwei13
						cuiwei13