bash shell script as plugin?

Gerald Wichmann gwichman at zantaz.com
Thu Nov 14 00:49:44 CET 2002


Just trying a simple bash script as a plugin.. doesn't seem to work. What am
I doing wrong or is this even possible?
 
[root at PS-NAT etc]# ../libexec/check_nrpe 10.1.82.30 -c check_mailsend
/.bashrc: Permission denied
 
[root at PS-NAT etc]#
 
 
 
the script:
 
[root at ps-sm-poly-00 libexec]# cat calc_speed
#!/bin/bash
 
MPS=0
TMPS=0
AMS=0
TNP=0
cd /usr/local/mailSend/out
for i in *; do
        [ $i == "*" ] && break
        END_FILE=`tail -7 $i`;
        MPS=`echo "$END_FILE"|grep "sec:"|awk '{print $4}'`
        [ -z $MPS ] || TMPS=`echo "$TMPS+$MPS"|bc`
        AVGSIZE=`echo "$END_FILE"|grep "Size:"|awk '{print $4}'`
        [ -z $AVGSIZE ] || AMS=`echo "$AMS+$AVGSIZE" | bc`
        TNP=`echo "$TNP+1"|bc`
done
 
echo "Total MPS  = $TMPS mps"
TMPSINT=`echo "$TMPS/1" | bc`
if [ "$TMPSINT" -lt 1 ]
then
  exit 1
fi
 
 
 
Gerald Wichmann
Senior Systems Development Engineer
Zantaz, Inc.
925.598.3099 (w)
 


This e-mail has been captured and archived by the ZANTAZ Digital Safe(tm)
service.  For more information, visit us at www.zantaz.com. 
IMPORTANT: This electronic mail message is intended only for the use of the
individual or entity to which it is addressed and may contain information
that is privileged, confidential or exempt from disclosure under applicable
law.  If the reader of this message is not the intended recipient, or the
employee or agent responsible for delivering this message to the intended
recipient, you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If you have received
this communication in error, please notify the sender immediately by
telephone or directly reply to the original message(s) sent.  Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20021113/75098f23/attachment.html>


More information about the Users mailing list