Lotus Domino: Redirect Console Output to file and run a shell

We will get output from console command "show stat" and run a shell

Create new file runstat.cmd inside of data directory and add the following commands:

Show Stat >runStatOutput.txt Load runstat2.sh

Save and Close

Create new file runstat2.sh inside of data directory and add the following commands:

SERVER_TRANS_PERMINUTE=`egrep "Server.Trans.PerMinute =" runStatOutput.txt | awk -F"=" '{gsub(/ /,"",$2); print $2}'` SERVER_AVAILABILITYINDEX=`egrep "Server.AvailabilityIndex =" runStatOutput.txt | awk -F"=" '{gsub(/ /,"",$2); print $2}'` REPLICA_CLUSTER_SECONDSONQUEUE=`egrep "Replica.Cluster.SecondsOnQueue =" runStatOutput.txt | awk -F"=" '{gsub(/ /,"",$2); print $2}'` REPLICA_CLUSTER_WORKQUEUEDEPTH=`egrep "Replica.Cluster.WorkQueueDepth =" runStatOutput.txt | awk -F"=" '{gsub(/ /,"",$2); print $2}'` MAIL_WAITING=`egrep "Mail.Waiting =" runStatOutput.txt | awk -F"=" '{gsub(/ /,"",$2); print $2}'` echo $SERVER_TRANS_PERMINUTE echo $SERVER_AVAILABILITYINDEX exit 0
 * 1) !/bin/sh

Save and Close

Testing
In Domino console run this command

> < runstat.cmd

Return

> Show Stat >runStatOutput.txt > Load runstat2.sh > 0 100 >

Putting in Production
Create a Program Document, like :

Ver também

 * Lotus Domino: Redirect Console Output to file and run a shell


 * IBM Domino: Monitoring the health of you Domino Server using HTTP and show stats


 * More articles about IBM Domino e Notes