recap
Installing recap. Change /root/ to the user you wish to install git for
CentOS/RHEL
1 |
yum install bc gawk git elinks iotop make net-tools psmisc sysstat -y ; cd /home/rack ; git clone https: //github .com /rackerlabs/recap .git ; cd recap/; make install |
Ubuntu
1 |
apt-get install bc gawk git elinks iotop make net-tools psmisc sysstat; cd /home/rack ; git clone https: //github .com /rackerlabs/recap .git ; cd recap/; make install |
Changing recap/rs-sysmon logging intervals:
1 |
vim /etc/cron .d /recap |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
#Every hour #0 * * * * root /usr/sbin/recap #Every 30 minutes #*/30 * * * * root /usr/sbin/recap #Every 10 minutes * /10 * * * * root /usr/sbin/recap #Every 5 minutes #*/5 * * * * root /usr/sbin/recap # Pack and clear log files 0 1 * * * root /usr/sbin/recaplog |
Command for using recap logs
1 |
echo -e "\nActive users:" ; w -h | grep - v rack; echo -e "\n" ; \sar -q -s ` date -d '-3 hour' +%T`; cd /var/log/recap ; echo "" ; ls -ltr resour* | tail -n 10 ; echo -e "\n\nTime?" ; read vr2; echo "" ; ls -ltr resources* | grep $vr2 | cat $( awk '{ print $NF }' ) | egrep -m 2 -A 15 "UPTIME report | cut -b 119- |Top 10 cpu using processes" ; unset vr2; echo "" ; |
recap.txt · Last modified: 2024/05/23 07:26 by 127.0.0.1