Update 2023-11-02 22:16 OpenBSD/amd64-x13

This commit is contained in:
c0dev0id 2023-11-02 22:16:35 +01:00
parent 909effc8af
commit a5db770144

15
.bin/whatmem Executable file
View 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