5

Machine data not displaying every 15 Seconds

view full story
linux-howto

http://unix.stackexchange.com – The following script is meant to output "vmstat" for example every 15 seconds, but for some reason it only does this if there's activity or when I kill the script, in other cases it just sits there. #!/bin/bash #!/bin/sh ps -ef | grep -v grep | grep "vmstat 15" | awk '{ print $2 }' | xargs kill ps -ef | grep -v grep | grep "iostat 15" | awk '{ print $2 }' | xargs kill ps -ef | grep -v grep | grep "mpstat 15" | awk '{ print $2 }' | xargs kill today=`date +%Y-%m-%d.%H:%M:%S` find /var/log/ -name data_collection -type d -exec mv /var/log/data_collection /home/Beer/"data_collection_${today} (HowTos)