Tuesday, September 1, 2015

opcnode - Hp Omu command

  • To Start the HPOM   management server process
  • To Stop the HPOM   management server process
  • To check the HPOM   server status
Installation
  • To install agent on Unix opc_inst -s <management_server_name>
  • To install agent on Windows
    cscript opc_inst.vbs -s <management_server_name>
  • To Unistall agent
    opc_inst -r
  • To check the agent status
    opcagt status [local agent status]
    opcragt <nodename> [ remote agent status from management server ]
  • To Distribute MonOMUr, Action, Commands & Templates
    opcragt -distrib -monOMUr -action -commands -templates -force <node_name>
Adding/deleting nodes
  • To add a node to node bank
    opcnode -add_node node_name="<node_name>" node_label="<label>" net_type="NETWORK_IP" mach_type="<Machine_type" group_name="<primary_group_name"
  • To delete a node from node bank
    opcnode -del_node node_name="<node_name>" net_type="NETWORK_IP"
  • To change the host name or ip address
    /opt/OV/contrib/OpC/opcchgaddr -force -sync IP <OLD_IP> <OLD_HOST_NAME> IP <NEW_IP> <NEW_HOST_NAME>
Test opcmsg
/opt/OV/bin/OpC/opcmsg s=critical o=Test a=Test msg_text="This server is now being monOMUred"
To start the heartbeat polling of managed node
opchbp -start <managed node>
To List Certificates:
  • ovcm -listpending -l
    opccsa -list_pending_cr
To grant a certificate
ovcm -grant <certificate_id>
To List and check status of certificates
ovcert -list
ovcert -status
To remove certificated
ovcert -remove <certificate_id>
To create a new certificate request
ovcert -certreq
To list the templates/policies
opctemplate -l or ovpolicy -l
To enable/disable a template
opctemplate -e <template_name>
opctemplate -d <template_name>
To download histroy messages
opchistdwn -older 0s -file <file_location>
To acknowledge messaged
opcackmsg -u <username> <message ID>
opcackmsgs -g <group_name> -n <node_name>

Manual Certificate Deployment From management server    a) opccsacm -issue -name <Node Name> -file /tmp/a -pass <password>
From agent
   b) ovcert -importcert -file /tmp/a -pass <password>
To get the remote coreid of the agent:
bbcutil -ping http://<nodename>
To change the coreid of a node in the management server
opcnode -chg_id node_name=<node_name> id=<core_id_from_bbcutil>
To list the core id set in the node bank
opcnode -list_id node_list=<node_bank>
To map the node in the node bank to the certificate request
opccsa –map_node <managed_node name>=<nodebank_managed_node_name>
To create a certificate request from the managed node
ovcert -certreq
To create a new core id from the managed node ovcoreid -create -force
To List the set of configurations from agent ovconfget
To change the agent configuration ovconfchg -ns <nodename> -set <param> <value>
To list the groups in node group bank
opcnode -list_groups|grep Name|awk '{print $3}'
To change the communication type
opcnode -chg_commtype node_list=<nodename> net_type=NETWORK_IP comm_type=COMM_BBC
To change the node type
opcnode -chg_nodetype node_list=<nodename> node_type=<node_type>  [eg.. MESSAGE_ALLOWED]
To List nodes enrolled in HPOM 
opcnode -list_nodes|grep Name|awk '{print $3}'
To view coda collections
codautil -dumpds value
To check DB SPI connection
 /var/opt/OV/bin/OpC/monOMUr/dbspicao -p -v -d  or /var/opt/OV/bin/OpC/cmds/dbspiadm conncheck -nw
To switch off monOMUring for DB instance
dbspicol OFF <instance_name>
Integrating DBSPI with OVPA [unix] :  /var/opt/OV/bin/OpC/cmds/dbspi_mw_int  ( For enabling Graphing )
 /var/opt/OV/bin/OpC/cmds/dbspi_mw_int -osm  .. -udm ( For reporter )
To list open sessions of JAVA and Motif GUIs
checkuiwww
To check OM management server queue files
/opt/OV/contrib/OpC/opcqschk
/opt/OV/contrib/OpC/opcqchk
To create trap template from trapd.conf
ovtrap2opc /etc/opt/OV/share/conf/C/trapd.conf <Template_name> <Service_name>
To check the syntax of flexible management templates
opcmomchk
To list the services opcservice -list
To assign a service to opc user opcservcie -assign <user_name> <service_name>

Oracle start up scripts
/sbin/init.d/OMUracle start/stop
############################################
UNIX Agent recycle :
1. Kill the agent process using : ovc -kill 2. Remove all the files under "/var/opt/OV/log/OpC/"
3. Start the agent process using : ovc -start
############################################
opcdeploy/ovdeploy:
opcdeploy -cmd "<cmd_to_run_at_agent_end>" -node <node_name>
opcdeploy -deploy -file <file_location> -node <node_name> -targetdir <Target_dir> -trd absolute
############################################
SQL Tweaks
To get unassigned nodes to NG  in HPOM 
select nn.node_name from opc_nodes n, opc_node_names nn
     where nn.node_id = n.node_id
     and not exists (select 1 from opc_nodes_in_group nig where nig.node_id = nn.node_id);
Show Assignments on Node SELECT OPC_NODE_NAMES.NODE_NAME, OPC_SOURCE_TEMPL.TEMPLATE_NAME FROM OPC_NODE_CONFIG, OPC_NODE_NAMES, OPC_SOURCE_TEMPL WHERE OPC_NODE_CONFIG.NODE_ID = OPC_NODE_NAMES.NODE_ID AND OPC_NODE_CONFIG.TEMPLATE_ID = OPC_SOURCE_TEMPL.TEMPLATE_ID AND OPC_NODE_NAMES.NODE_NAME LIKE 'ENTER NODE NAME HERE';
Show Template Assignment SELECT OPC_NODE_NAMES.NODE_NAME, OPC_SOURCE_TEMPL.TEMPLATE_NAME FROM OPC_NODE_CONFIG, OPC_NODE_NAMES, OPC_SOURCE_TEMPL WHERE OPC_NODE_CONFIG.NODE_ID = OPC_NODE_NAMES.NODE_ID AND OPC_NODE_CONFIG.TEMPLATE_ID = OPC_SOURCE_TEMPL.TEMPLATE_ID AND OPC_SOURCE_TEMPL.TEMPLATE_NAME LIKE 'ENTER TEMPLATENAME HERE';
############################################
Set environment variables in .profile
        . /opt/OV/bin/ov.envvars.sh
        PATH=$PATH:/opt/OV/bin         export PATH
############################################
/opt/OV/contrib/OpC/opcsystst
-a        Do everything below
-h       Display the hostname
-u       Display the uname info
-i       Display all configured network interfaces
-l       Display the local IP address
-o       Display the OpC mgmt server
-n       Resolve and display the IP addresses for all displayed node
  names and resolve and display the node names for all
  displayed IP addresses
-r       Display all registered RPC servers
############################################
/opt/OV/bin/OpC/install/opctranm -jobfile <file>
whereas <file> can have for example the following entries:
nodename.domain.com
/tmp/file1 /tmp/file2
=> this will transfer file1 from the management server /tmp directory to /tmp/file2 on the agent nodename.domain.com
nodename.domain.com
!ls
=> this will execute an ls on the unix agent node coco and return the result
nodename.domain.com
!<path>ifconfig /all
############################################
You can use the SQL scripts in the below dir to get reports.
/etc/opt/OV/share/conf/OpC/mgmt_sv/reports/C/

For ex: call_sqlplus.sh sel_nodes <Fully_qualified_domain_name> --> will give the node details
############################################
OVPA
perfstat -p , -e , -v
/opt/perf/bin/utility -xc /var/opt/perf/alarmdef --> to chk syntax of alarmdef file
/opt/perf/bin/utility -xc /var/opt/perf/parm --> chk parm file
############################################
Directories
/var/opt/OV/share/tmp/OpC/distrib        template Distribution directory
/etc/opt/OV/share/conf/OpC/mgmt_sv        Flexible management templates
/var/opt/OV/share/conf/SPISvcDisc/        Service Discovery xml
/var/opt/OV/log/SPISvcDisc/discovery_error.log    Discovery Error Log
Agent Policies
/var/opt/OV/datafiles/policies/configsettings/ --> nodeinfo
/var/opt/OV/datafiles/policies/le/             --> logfile templates
/var/opt/OV/datafiles/policies/mgrconf/        --> MoM templates
/var/opt/OV/datafiles/policies/monOMUr/        --> monOMUr templates
/var/opt/OV/datafiles/policies/msgi/           --> opcmsg templates
/var/opt/OV/datafiles/policies/trapi/          --> SNMP trap templs
############################################
Unix utils
Tar and Untar:
tar -cvf <dir.tar> dir
tar -xvf a.tar
Mounting iso image to HPUX 11.31
mkdir /isoimg lvcreate -n ISOLV -L 3096 /dev/vg00 dd if=isoimage of=/dev/vg00/rISOLV bs=8192 mount /dev/vg00/ISOLV /isoimg

using pfs mount
/usr/sbin/pfs_mountd &
/usr/sbin/pfsd &
pfs_mount -o xlat=unix /iso_image.iso /ISO_CDROM/
To change kernel parameters with command line
kctune -K -h <parameter>=<value> [Ex : kctune -K -h maxuprc=3687 ]
To Check the quality pack installed on HPUX
/usr/sbin/swlist | grep -e QPK -e GOLD -e BUNDLE11i
swinstall -s <Source_depot_file> -x autoreboot=false \
-x patch_match_target=true

No comments:

Post a Comment