evilwm random wallpaper with either feh or xv

so i decided to have my wallpaper in evilwm switch up every 60 seconds but since setting the wallpaper in evilwm requires the usage of feh, xv or some other utility i came up with this little script below which gets daemonized by .xinitrc at login: #!/bin/bash while :;do files=(/path/to/*.jpg /path/to/*.jpeg /path/to/*.png /path/to/*.gif) N=${#files[@]} ((N=RANDOM%N)) … Read More

nagios tomcat open files check

here is a quick and dirty little script to see how many open files tomcat is using up. #!/bin/bash USER=tomcat LSOF=`lsof -u $USER | wc -l` OPEN_F=`ulimit -a | egrep “open files” | awk ‘{print $4}’` #PERCDONE=$(( $LSOF / $OPENF * 100 )) PERCDONE_PRE=$(echo “scale=2;(($LSOF/$OPEN_F) * 100)” |bc) PERCDONE=`echo $PERCDONE_PRE | cut -d. -f1` if … Read More