mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 04:12:43 +00:00 
			
		
		
		
	 83ebd1882f
			
		
	
	
		83ebd1882f
		
	
	
	
	
		
			
			This small utility is something we probably needed for a very long time - a way to print memory statistics in an elegant manner. This utility opens /sys/kernel/memstat, reads it and decode the values into human readable entries, possibly even into human-readable sizes.
		
			
				
	
	
		
			36 lines
		
	
	
	
		
			902 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
	
		
			902 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
| ## Name
 | |
| 
 | |
| memstat - show memory statistics
 | |
| 
 | |
| ## Synopsis
 | |
| 
 | |
| ```**sh
 | |
| $ memstat
 | |
| ```
 | |
| 
 | |
| ## Options
 | |
| 
 | |
| * `-h` , `--human-readable`: Print human-readable sizes
 | |
| 
 | |
| ## Examples
 | |
| 
 | |
| ```sh
 | |
| $ memstat
 | |
| Kmalloc allocated: 7894528/10979648
 | |
| Physical pages (in use) count: 172249088/1016643584
 | |
| Physical pages (committed) count: 125521920
 | |
| Physical pages (uncommitted) count: 718872576
 | |
| Physical pages (total) count: 248204
 | |
| Kmalloc call count: 77475
 | |
| Kfree call count: 59575
 | |
| Kmalloc/Kfree delta: +17900
 | |
| $ memstat -h
 | |
| Kmalloc allocated: 7.5 MiB (7,908,928 bytes) / 10.4 MiB (10,978,624 bytes)
 | |
| Physical pages (in use) count: 164.8 MiB (172,838,912 bytes) / 969.5 MiB (1,016,643,584 bytes)
 | |
| Physical pages (committed) count: 119.6 MiB (125,485,056 bytes)
 | |
| Physical pages (uncommitted) count: 685.0 MiB (718,319,616 bytes)
 | |
| Physical pages (total) count: 248204
 | |
| Kmalloc call count: 78714
 | |
| Kfree call count: 60777
 | |
| Kmalloc/Kfree delta: +17937
 | |
| ```
 |