Last active
June 26, 2016 14:40
-
-
Save angoca/19a064a90568cc798bb2 to your computer and use it in GitHub Desktop.
Render NSR (Networker) log continuosly like tail -f
This file contains hidden or 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 | |
# Reads the Networker logs periodically. | |
# By default 15 seconds. | |
# | |
# Original from: http://www.backupcentral.com/phpBB2/two-way-mirrors-of-external-mailing-lists-3/emc-networker-19/nsr-render-log-97064/ | |
LOG_FILE=/nsr/logs/daemon.raw | |
#LOG_FILE=/nsr/apps/logs/nmda_db2.messages.raw | |
DATE=$(date +"%m/%d/%y %H:%M:%S") | |
TIME=$1 | |
[[ -z ${TIME} ]] && TIME=5 | |
while [ true ] ; do | |
nsr_render_log -S "${DATE}" ${LOG_FILE} | grep -v "^No lines match the search criteria.$" | |
DATE=$(date +"%m/%d/%y %H:%M:%S") | |
sleep ${TIME} | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This script will render continuosly the NSR log messages. By default it checks the daemon messages, but it can be changed to show any other NSR log file. In this code, the logs of the DB2 module are commented, ready to be used.