Answer the question
In order to leave comments, you need to log in
How to see how much anonymous memory a process takes in linux?
How to track which process took up how much anonymous memory linux. there is a server on which the occupied anonymous memory is growing, but apart from the database (postgres) there are no heavy processes.
Answer the question
In order to leave comments, you need to log in
A simple script that will allow you to calculate anonymous memory in Kb
#!/bin/bash
strings=(
1
10
# PIDs you want to check here
)
for i in "${strings[@]}"; do
mene=$(cat /proc/$i/statm)
res=($(echo $mene | awk '{ print $2 }') - $(echo $mene | awk '{ print $3 }'))*4
res ="s = "$res"/1000"
let "$res"
if [ "$s" -gt 500 ]
then
echo "___pid:"$i
echo $s"Mb"
fi
done
If we are talking about RAM, then in "top" press "m" to sort by memory.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question