Monday, 30 July 2012

HP Openview operations managers for UNIX 9.10 commands


Agent status: /opt/OV/bin/OpC/opcagt -status
Agent Version: opcragt -agent_version nodename
Removing buffering issue: opcragt -cleanstart nodename
Remote Agent: opcragt (node name)
Distribution of templates, monitor, commands & scripts: opcragt -distrib -force (nodename)
List templates remotely: ovdeploy -cmd “opctemplate -l” -node (nodename)
Configuration file: ovdeploy -cmd “/opt/OV/bin/OpC/ovconfget” -node (nodename)
Certificate request: /opt/OV/bin/ovcert –certreq
List Certificate: /opt/OV/bin/ovcert -list
Add Node in OVO: opcnode -add_node node_name=Avijit \net_type=NETWORK_IP mach_type=MACH_HP11_PA_RISC
Assign node to node group: opcnode -assign_node node_name=$node group_name=”nodegrp”
Last 50 Error output: ovdeploy -cmd “tail -50 /var/opt/OV/log/System.txt” -node (nodename)
Core id on node: ovdeploy -cmd “ovcoreid” -node (nodename)
Test Alert: /opt/OV/bin/opcmsg app=OSSPI sev=warning msg_grp=Performance obj=”test” msg_text=”TEST please ignore”
llbd status: ovdeploy -cmd  “ps -ef | grep llbd” -node nodename
rpc status: ovdeploy -cmd  “ps -ef | grep -v grep | grep rpc” -node nodename
Version check: ovdeploy -cmd “uname -a” -node nodename
Change id: opcnode -chg_id node_name=nodename id=4892jdlf8e320rhfeqr89322
Template disable: ovdeploy -cmd “opctemplate -d templatename” –node nodename
To stop ovo service: opcsv -stop
To stop ovo services along with NNM: ovstop -c
to start services: opcsv -start/ ovstart -c
A script to Automate a menu driven commands:
#######################################
# File Name: dailytask.sh
# AUTHOR:       Avijit Bhardwaj
#######################################
echo ” “
echo ” “
Name=`echo $1`
if [ "${Name}x" = "x" ]
then
echo “Enter Server:”
read Name
fi
while [ "$plat" != "0" ];
do
echo ” “
echo “1) Agent Status”
echo “2) Coreid”
echo “3) fwtmp output”
echo “4) server information, confget and last 30 errors occurred”
echo “5) Template assigned to the server”
echo “6) Cleanstart the agent”
echo “7) Make a distribution”
echo “8) File system thresholds”
echo “9) Processes getting monitored”
echo “0) Exit”
echo ” “
echo “Lemme know ur choice”
echo ” “
read plat
case $plat in
1) opcragt $Name ;;
2) ovdeploy -cmd “/opt/OV/bin/ovcoreid” -node $Name ;;
3) ovdeploy -cmd “strings /var/opt/OV/bin/instrumentation/osspi_fwtmp” -node $Name ;;
4) ovdeploy -cmd “/opt/OV/contrib/OpC/itochecker_agt -12″ -node $Name; ovdeploy -cmd “cat /tmp/ito_rpt_agt/ITO.rpt” -node $Name;;
5)ovdeploy -cmd “opctemplate -l” -node $Name ;;
6) opcragt -cleanstart $Name;;
7) opcragt -distrib -force $Name;;
8) /opt/OV/bin/ovdeploy -cmd “cat /var/opt/OV/conf/osspi/osspi_local_fsmon.cfg” -node $Name;;
9) /opt/OV/bin/ovdeploy -cmd “cat /var/opt/OV/conf/osspi/procmon_local.cfg” -node $Name;;
0)exit;;
esac
done
To check alarmdef syntax:
/opt/perf/bin/utility -xc /var/opt/perf/alarmdef

No comments:

Post a Comment