Sometimes disks fill up with logs for example, and we the administrators have to login sometimes even wake up just to delete log files! Well this script solves the problem. In this case I used to cleanup Glassfish log files. […]
check_file_age
I wrote to scripts with the same idea, to monitor a file age, I have written it also in vbs in the past. Now I did it in bash and php. BASH Version, example: check_file_age.sh /opt/solr-3.4.0/app/solrrioshow/conf/dataimport.properties 1440 1441 UPDATED: Its […]
SSH Automatic Login
SSH Automatic Login Well I am tired of entering my password 100 times a day, are you too? The solution I wrote this script using the powerful expect download expect I actually use a more complex script since our root […]
Bash to run after linux installation
Bash script to run post installation of CentOS or RedHat. #/bin/bash # post installation script # # #set -x echo “. Post installation script” # # /etc/hosts # echo “. /etc/hosts” # # nozeroconf # echo “. removendo suporte a […]
check log script
Nagios bash check_log Its often needed to check log files for a keyword. So I wrote a simple bash script to do that plus integrate with nagios and perfdata so it also generate graphic. The script is based on tail […]
Compare float in bash
Compare float in bash If you have a regular if and one of the integers has a float value like 1.200 you will get an error message. The best way to do is using the bc command. Like: $ echo […]
check_vmstats
So many check_mem scripts out there but I am still not satified so I wrote my own. Many scripts report the total use of memory but they dont care how much memory is placed in cache by the OS or […]