Thursday, 28 May 2015

HP OMU OML: show list of coreid for all nodes

Show list of coreid for all nodes from database OM:

#!/bin/sh
for i in  `/opt/OV/bin/OpC/utils/opcnode -list_nodes |grep Name|awk '{print($3)}'`
do
       /opt/OV/bin/OpC/utils/opcnode -list_id node_name=$i >> coreid_all.txt
done

Show list of coreid for all nodes from nodes:

#!/bin/sh
for i in  `/opt/OV/bin/OpC/utils/opcnode -list_nodes |grep Name|awk '{print($3)}'`
do
       echo "$i \n" >> coreid_nodes.txt
       /opt/OV/bin/ovdeploy -ovrg server -cmd "ovcoreid" -host $i >> coreid_nodes.txt
done



Usage of opcnode:

Possible commands:
------------------
   -add_node     | -del_node       | -chg_commtype    | -list_nodes   |
   -chg_id       | -del_id         | -list_id         | -chg_iptype   |
   -add_group    | -del_group      | -chg_nodetype    | -list_groups  |
   -assign_pol   | -deassign_pol   | -list_ass_pols   | -list_ass_pol_groups
   -assign_pol_group               | -deassign_pol_group            |
   -assign_templ | -deassign_templ | -list_ass_templs | -list_templs  |
   -assign_node  | -deassign_node  | -list_ass_nodes  | -chg_machtype |
   -set_virtual  | -set_physical   | -list_virtual    | -list_attrs   |
   -move_nodes   | -assign_cat     | -deassign_cat    | -list_ass_cat |
   -list_mach_type | -list_inst_opt | -chg_inst_viaserver | -chg_inst_ontodrive |
   -del_inst_viaserver | -del_inst_ontodrive

   Attributes:
-----------
   node_name=<node_name>        node_label=<node_label>
   group_name=<nodegrp_name>    group_label=<nodegrp_label>
   node_hier=<hierarchy_name>   layout_group=<layout_group_name>
   net_type=<network_type>      mach_type=<machine_type>
   comm_type=<comm_type>        node_type=<node_type>
   id=<id>                      ip_addr=<IP address>
   cluster_package=<cluster package identifier>
   dynamic_ip=yes|no            sep=<separator>
   node_list='<list>'           mode=<assignment mode>
   templ_name=<template_name>   templ_type=<template_type>
   pol_name=<policy_name>       pol_type=<policy_type>
   version=<policy_version>     pol_group=<policy_group>
   cat_list='<comma_separated_categories>'
   inst_viaserver=<depot node>
   inst_ontodrive='<Drive:\directory>'

Example: opcnode -add_node \
                 node_name=server.domain.com \
                 group_name=hp_ux \
                 layout_group=data_center \
                 net_type=NETWORK_IP \
                 mach_type=MACH_BBC_HPUX_PA_RISC


Usage of  ovcoreid:

Usage:  ovcoreid -show [-ovrg <OV Resource Group>]
        ovcoreid -create [-force] [-ovrg <OV Resource Group>]
        ovcoreid -set <OvCoreId> [-force] [-ovrg <OV Resource Group>]
        ovcoreid -version
        ovcoreid [-h|-help]

Manages the unique node identifier OvCoreId on the local node.

-show [-ovrg <OV Resource Group>]
          Displays the current OvCoreId of the system (configuration setting
          CORE_ID in namespace [sec.core]). This is the default if no
          parameters are specified. If an OV Resource Group is specified, the
          corresponding configuration settings will be read as well.
-create [-force] [-ovrg <OV Resource Group>]
          Generates a new OvCoreId. If there is already a CORE_ID value, this
          setting is only overridden when -force is specified. If an OV
          Resource Group is specified, the corresponding configuration settings
          will be read or modified as well.
-set <OvCoreId> [-force] [-ovrg <OV Resource Group>]
          Used to set a specific OvCoreId. -force must be used when there is
          already an OvCoreId value set. If an OV Resource Group is specified,
          the corresponding configuration settings will be read or modified as
          well.
-version  Returns the version of the tool.
-h|-help  Displays all available command options.

Usage of ovdeploy:

bash-4.0# ovdeploy -h
HP Software Deployment 11.14.014

Usage: ovdeploy -install|-remove|-upload|-download -file <file1>... [-host <name|ip>]
                [-srd <id>] [-sd <dir>] [-trd <id>] [-td <dir>] [-tn <name>]
                [-perm <perm>] [-own <owner>] [-force <mode>] [-f]
       ovdeploy -exec -file <file> [-host <name|ip>] [-par <params>] [-cmd_timeout <time in milli sec>] [-time]
                [-trd <id>] [-td <dir>] [-shell]
       ovdeploy -cmd <file> [-host <name|ip>] [-par <params>] [-cmd_timeout <time in milli sec>] [-time]
                [-trd <id>] [-td <dir>]
       ovdeploy -install|-remove|-upload|-download -dir <dir> [-host <name|ip>]
                [-srd <id>] [-sd <dir>] [-trd <id>] [-td <dir>]
                [-perm <perm>] [-own <owner>] [-r] [-force <mode>] [-f]
       ovdeploy -install|-remove|-upload|-download -pkg <file> [-host <name|ip>] [-cmd_timeout <time in milli sec>]
                [-srd <id>] [-sd <dir>]
                [-force <mode>] [-f]
       ovdeploy -install|-remove|-purge|-upload|-download -bdl <file> [-host <name|ip>]
                [-srd <id>] [-sd <dir>]
                [-trd <id>] [-td <dir>]
                [-force <mode>] [-f]
                [-includepatch]
       ovdeploy -bootstrap -deployer|depl -node <node_name> -os <os_name>
                -osver <os_version> -osven <os_vendor> -bits <os_bits> -sys <system_type>
       ovdeploy -inv [-includeupdates] [-includebundle|inclbdl] [-host <name|ip>] [-it <type>] [-all]
       ovdeploy -[uploadinventory|upldinv] [-host <name|ip>] [-all]
       ovdeploy -reg -pkg <file> [-host <name|ip>]
       ovdeploy -unreg| -dereg -pkgname <pkg_name> [-host <name|ip>]
       ovdeploy -reg -bdl <file> [-host <name|ip>]
       ovdeploy -unreg|-dereg -bdlname <bundle_name> [-host <name|ip>]
       ovdeploy -get <info> [-host <name|ip>]
       ovdeploy -env <var> [-host <name|ip>]

       Options supported by all tasks:
                [-ovrg <ov_res_group>] [-tid <target_id>] [-user <user>] [-pw <pass>] [-pw_prompt]
                [ [-ftm <file_transfer_method>] [-fem <file_exec_method>] -ostype <os_type>]
                [-is <inst_server>] [-v <level> [-dbg]

       ovdeploy -version
       ovdeploy -h|help

No comments:

Post a Comment