Created
August 4, 2019 00:55
-
-
Save sgnyjohn/6dc6fc3ac7defafa084e817de07c3bc6 to your computer and use it in GitHub Desktop.
tests cpu usage from xscreensaver plugins - Energy Star compilant ?
This file contains 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 | |
aq=res.txt | |
echo "" >>$aq | |
teste() { | |
local n=$(basename $1) | |
$1 & | |
local p=$! | |
sleep 3 | |
local a1=$(ps aux|grep $n|grep -v grep|awk '{print $3}') | |
sleep 2 | |
local a2=$(ps aux|grep $n|grep -v grep|awk '{print $3}') | |
sleep 2 | |
local a3=$(ps aux|grep $n|grep -v grep|awk '{print $3}') | |
local t="$n $a1 $a2 $a3" | |
echo "$t" | |
echo "$t" >>$aq | |
kill $p | |
sleep 1 | |
kill $p | |
} | |
for i in /usr/lib/xscreensaver/*; do | |
teste $i | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment