RMA for QNX
RMA for QNX
Whether there is agent for QNX6?
RMA for QNX (i386) Beta available at http://www.ks-soft.net/hostmon.eng/downpage.htm#unix
Regards
Alex
Regards
Alex
That's because we don't know how to check CPU load on QNX1. CPUUsageScript does not support QNX (cpu.sh)
Do you know how? Please tell us.
What file name mask do you use? "*.*"? If you want to calculate all files, use "*", just like on any other UNIX-like system.2. CountFiles test does not consider the files which are not containing a "dot"
RMA for Linux, BSD, AIX, Solaris does not provide such test either because its easy to implement using Shell Script. Actually HostMonitor provides Ping script for UNIX since version 4.303. Ping test is not realized
So, everything works fine?
Regards
Alex
You can try to use wrapper for "hogs -%1".KS-Soft wrote:That's because we don't know how to check CPU load on QNX
Do you know how? Please tell us.
Sorry, my fault.KS-Soft wrote:What file name mask do you use? "*.*"? If you want to calculate all files, use "*", just like on any other UNIX-like system.
What is the name or contents of this script?RMA for Linux, BSD, AIX, Solaris does not provide such test either because its easy to implement using Shell Script. Actually HostMonitor provides Ping script for UNIX since version 4.30
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
Here is the one:Igorek wrote:What is the name or contents of this script?
Start cmd: %Script% %Params%
Script:
Code: Select all
#!/bin/sh
ping -c $2 -w $3 $1 1> /dev/null 2> /dev/null
if [ $? -eq 0 ]
then
echo "ScriptRes:Host is alive:"
else
echo "ScriptRes:No answer:"
fi
Regards,
Max
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
We have tried hogs utility. However, it works continually and there are no any parameters to make it perform only one iteration. So, it seems problematic to write script to calculate hogs's output. Probably, you have any other ideas?Igorek wrote:You can try to use wrapper for "hogs -%1".
Regards,
Max
You can try to use this script:
Code: Select all
#!/bin/sh
hogs | while read line
do
if [ -z "$line" ]
then
break
fi
pid=`echo $line | awk '{print $1}'`
if [ "$pid" == "PID" ] || [ "$pid" == "1" ]
then
continue
fi
echo $line | awk '{print $4}' | sed 's/\%//'
done | awk 'BEGIN {load=0} {load+=$1} END {print load}'
exit 0
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
Thank you! It works!
To make it work with HostMonitor, you may copy foregoing script into qnx_cpu.sh file and place it into rma's folder. Also you should add just one line into cpu.sh script: QNX) ./qnx_cpu.sh;;
Thank you very much for your help.
Regards,
Max
To make it work with HostMonitor, you may copy foregoing script into qnx_cpu.sh file and place it into rma's folder. Also you should add just one line into cpu.sh script: QNX) ./qnx_cpu.sh;;
Code: Select all
#!/bin/sh
# --------------------------------------
# this gives CPU load for last 1 sec
OS=`uname`
case $OS in
AIX) vmstat 1 2 | tail -1 | awk '{print $(NF-5)+$(NF-4)}';;
Linux) vmstat -n 1 2 | tail -1 | awk '{print $(NF-3)+$(NF-2)}';;
QNX) ./qnx_cpu.sh;;
FreeBSD) vmstat -c 2 -w 1 | tail -1 | awk '{print 100-$NF}';;
NetBSD) vmstat -c 2 -w 1 | tail -1 | awk '{print 100-$NF}';;
OpenBSD) vmstat -c 2 -w 1 | tail -1 | awk '{print 100-$NF}';;
SunOS) vmstat 1 2 | tail -1 | awk '{print 100-$NF}';;
HP-UX) vmstat 1 2 | tail -1 | awk '{print 100-$NF}';;
*) echo 'unsupported OS';;
esac
# --------------------------------------
Regards,
Max