Created
February 5, 2015 07:06
-
-
Save ubunteroz/a3eafdf8e11ce81c73c6 to your computer and use it in GitHub Desktop.
Simple UKSM Monitor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while true | |
do | |
clear | |
PSHARING=$(cat /sys/kernel/mm/uksm/pages_sharing) | |
PSHARED=$(cat /sys/kernel/mm/uksm/pages_shared) | |
PUNSHARED=$(cat /sys/kernel/mm/uksm/pages_unshared) | |
echo -en "Simple UKSM Monitor\n\n" | |
echo -n "Shared pool size (KB) : " | |
echo "$PSHARED*4" | bc | |
echo -n "Efficiency : " | |
echo "scale=3;($PSHARING/$PSHARED)" | bc | |
echo -n "Wasted effort : " | |
echo "scale=3;($PUNSHARED/$PSHARING)" | bc | |
sleep 1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment