Update 2023-11-02 22:16 OpenBSD/amd64-x13
This commit is contained in:
		
							parent
							
								
									909effc8af
								
							
						
					
					
						commit
						a5db770144
					
				
							
								
								
									
										15
									
								
								.bin/whatmem
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										15
									
								
								.bin/whatmem
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,15 @@
 | 
				
			|||||||
 | 
					#!/bin/sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					for i in $@
 | 
				
			||||||
 | 
					do
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    RES="$(ps -x -o "comm rsz" | grep -Ei "$i")"
 | 
				
			||||||
 | 
					    if [ ! -z "$RES" ]
 | 
				
			||||||
 | 
					    then
 | 
				
			||||||
 | 
					        echo "$RES" | xargs -n2 -I{} echo "Adding: {} KB"
 | 
				
			||||||
 | 
					        echo "$RES" | awk '{ sum=sum+$2; } END { printf("Summary: %.2f MB\n", sum/1024); }'
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					        echo "$@ not found."
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					done
 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user