Update 2024-02-14 07:51 OpenBSD/amd64-x13

This commit is contained in:
c0dev0id
2024-02-14 07:54:31 +01:00
parent b55e6a3616
commit 9624895938
373 changed files with 19074 additions and 3045 deletions

14
.bin/OLD/whatmem Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/sh
for i in $@
do
RES="$(ps -x -o "comm rss" | grep -Ei "^$i ")"
if [ ! -z "$RES" ]
then
echo "$RES" | xargs -n2 -I{} echo "Adding: {} KB"
TOTAL=$(( TOTAL + $(echo "$RES" | awk '{ sum=sum+$2; } END { printf("%d", sum); }') ))
else
echo "$@ not found."
fi
done
echo $TOTAL | awk '{ printf("Summary: %.2f MB\n", $1/1024); }'