In Uptime Infrastructure Monitor 7.2 or later the agentcmd has extra logging enabled, you are able to remove some of these logs by adding switches to the agentcmd command but the first line is always there:
2013-09-19 12:50:03,704 - Initialized AgentCommunicatorApp
2013-09-19 12:50:03,707 - Database connection was not explicitly initialized; performing check...
2013-09-19 12:50:04,398 - Threads having sessions open longer than 4.00s will be logged when a thread dump is asked for
As this output will show in your script results before any of the data from the agent output it can cause issues with monitors.
To remove this data do the following:
1. Edit the agentcmd.jcnf file in the scripts directory of the monitoring station: In the following section: [jvm.additional.args] -d64 Add: -Dlog4j.configuration=file:///usr/local/uptime/scripts/log4j.properties So should now see: [jvm.additional.args] -d64 -Dlog4j.configuration=file:///usr/local/uptime/scripts/log4j.properties 2. Create the log4j.properties file in the scripts directory and add the following code to it. log4j.rootLogger=WARN, THIRDPARTY #console logger log4j.appender.CONSOLE=org.apache.log4j.RollingFileAppender log4j.appender.CONSOLE.MaxFileSize=10MB log4j.appender.CONSOLE.MaxBackupIndex=0 log4j.appender.CONSOLE.File=logs/uptime_scripts.log log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout log4j.appender.CONSOLE.layout.ConversionPattern=%d | %p | %X{context} | %t | %c | %m%n #third party code logger - thirdparty.log log4j.appender.THIRDPARTY=org.apache.log4j.RollingFileAppender log4j.appender.THIRDPARTY.MaxFileSize=10MB log4j.appender.THIRDPARTY.MaxBackupIndex=0 log4j.appender.THIRDPARTY.File=logs/thirdparty.log log4j.appender.THIRDPARTY.layout=org.apache.log4j.PatternLayout log4j.appender.THIRDPARTY.layout.ConversionPattern=%d | %p | %X{context} | %t | %c | %m%n 3. Now you should be able to run the agentcmd and see only your agent output rather than this log info, instead it is redirected to logs/uptime_scripts.log to a file set to roll when hits 10mb and not keep any historical copies so should only ever be 10mb at most.