Created
October 6, 2011 07:57
-
-
Save hewigovens/1266796 to your computer and use it in GitHub Desktop.
Simple script for goagent statistic
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 | |
python_count=0 | |
toggle_count=0 | |
local_count=0 | |
log_list=$(ls /etc/httpd/logs/access_log*) | |
for log in $log_list | |
do | |
tmp=$(cat $log | grep python | wc -l) | |
((python_count+=tmp)) | |
echo "python2.6 in $log installed $tmp" | |
tmp=$(cat $log | grep toggle | wc -l) | |
((toggle_count+=tmp)) | |
echo "toggle in $log installed $tmp" | |
tmp=$(cat $log | grep goagent-local | wc -l) | |
((local_count+=tmp)) | |
echo "local in $log installed $tmp" | |
done | |
echo "Total:" | |
echo "python2.6 package installed $python_count times" | |
echo "goagent toggle package installed $toggle_count times" | |
echo "goagent local package installed $local_count times" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment