Archive

Posts Tagged ‘unix’

Dump OVO templates into csv file

June 3rd, 2009 bayu No comments

Are you using HP OVO (Openview Operation)/ITO/OMU (Operation Manager for Unix) ? So you must be understand how hard to write a templates document, especially if you have hundreds or thousands templates in your environment .  I started a project to dump OVO templates into a csv file.

The script is in perl, so actually I can generate an Excel spreadsheet file directly but the script will need the spreadsheet perl module. To make it widely usable, i am going to make the script to only generates csv file. csv  files can later be imported to nearly any spreadsheet editor.

Update: If you want to dump/export the OVO templates into a well-formatted MS-Excel file, read this post instead.

You can freely use, modify, and share this script, just keep the attribution intact.

Please read terms of use before downloading the script(s)

Version 1.1.0

  • Unlike the initial build, this script includes downloading templates that has been assigned to nodes. Put node names inside the node list file separated by newlines. Now the script’s first argument is node list file instead of directory name.
  • Backward compatibility (perl 5.0) increased.
  • No longer using Getopt to grab options (to avoid dependency to getopt module)
  • Some minor changes.

tpl2csv-1.1.0.pl

Version 1.0.0

The initial release. The script will dump all templates files inside the specified directory into csv file.

tpl2csv-1.0.0.pl

Categories: openview Tags: , , , , ,

solaris: adding openssh to core solaris installation

May 4th, 2009 bayu No comments

Have you ever confused about how to install a minimal-but-enough installation of solaris OS? Well I had.

It was some time ago I wanted to install Sun Solaris without graphical environment, but I still want some services like ssh and ftp server, and the powerful shell bash. You can always customize the software installation at the installation process, but I found it a bit frustating, because I have to examine the package one-by-one. On the other hand, installing a software by hand from the DVD might takes time to look for the right software since the filename is shortened.

Read more…

OVO: Assign and distribute templates from the command line

May 3rd, 2009 bayu No comments

To assign and distribute templates from the command line, use these tools:
Assign a template to a node

# /opt/OV/bin/opcnode -assign_templ templ_name=<template name> templ_type=<template type> node_name=<node name> net_type=NETWORK_IP

template type can be one of the following:

TEMPLATE_GROUP
CONSOLE_TEMPLATE
OPCMSG_TEMPLATE
LOGFILE_TEMPLATE
MONITOR_TEMPLATE
SNMP_TEMPLATE
EC_TEMPLATE
SCHEDULE_TEMPLATE

Assign a template to a node group

#/opt/OV/bin/opcnode -assign_templ templ_name=<template name> templ_type=<template type> group_name=<group name>

Distribute template

#/opc/OV/bin/opcragt -distrib -templates -monitors -commands -actions -force <hostname>

you don’t have to specify all of the template types at once.

Viewing deployed templates on the node

#/opt/OV/bin/ovpolicy -list -host <node name>

Categories: openview Tags: , , ,

OVO: clean and change management server of a node

May 3rd, 2009 bayu No comments

It doesn’t have to do this way, but I like doing this way, because it also cleans the old database and policies to avoid any problem.

  1. Delete installed policies
    # /opt/OV/bin/ovpolicy -remove -poltype/polname
  2. Shutdown all agent services including ovcd and ovbbccb
    # /opt/OV/bin/ovc -kill
  3. Delete previous data
    # rm /var/opt/OV/datafiles/coda*
  4. Remove messages queue
    # rm -r /var/opt/OV/tmp/OpC/*
  5. delete the old certificate that has been used for communicating with the old management server
    #/opt/OV/bin/ovcert -remove <cert_id>
  6. Configure agent to be a managed node of the new management serve
    r#/opt/OV/bin/OpC/install/ovcactivate -srv <srv>

At the new management server :

Add the new node and grant certificate request (you probably need to map the node to the certificate request)

Categories: openview Tags: , , , ,

Installing MySQL replication in solaris

May 3rd, 2009 bayu No comments

Replication is one of the MySQL technology to replicate the whole database, whether it will be used for load balancing, data backup, or High Availability (need 3rd party software or script to switch the connection).

This post sill show you a step-by-step installation of MySQL in Sun Solaris. I’m using MySQL 5.0.51a in this post, but it is applicable to other versions. First, download the MySQL from http://dev.mysql.com/downloads or your favorite mirror closest to you.

Read more…

Categories: solaris Tags: , , , , , ,

Solaris: disabling DHCP

May 3rd, 2009 bayu No comments

This is how to stop the machine requesting IP address to the DHCP server.

  1. Delete /etc/dhcp.[interface-name] file
  2. Put the hostname inside /etc/hostname.[interface=name]
  3. Put the static IP and hostname inside /etc/hosts
  4. Restart the system
Categories: solaris Tags: , , , ,

solaris: changing hostname

May 3rd, 2009 bayu No comments

I thought changing the machine’s hostname is as simple as I usually did in linux, it turns out not that easy. In solaris, I have to modify the hostname in at least 3 files:

  • /etc/hostname.[interface name]
  • /etc/hosts
  • /etc/nodename

Even more for an older solaris versions, I have to modify these also:

  • /etc/net/ticlts/hosts
  • /etc/net/ticots/hosts
  • /etc/net/ticotsord/hosts
  • /etc/inet/ipnodes

phuuuh…

Categories: solaris Tags: , , , ,

hp ux: Network tools

May 3rd, 2009 bayu No comments

The HP UX is bundled with several network adminitration tool:

  • lanscan : to see MAC Adress, interface status, and hardware path

# lanscan
Hardware Station Crd Hdw Net-Interface NM MAC HP-DLPI DLPI
Path Address In# State NamePPA ID Type Support Mjr#
0/0/0/0 0x00306EC32104 0 UP lan0 snap0 1 ETHER Yes 119

  • ifconfig : looks like the same command in linux, to see of configure the IP Addresses, turning on/off the NIC, etc.

# ifconfig lan0
lan0: flags=843<UP,BROADCAST,RUNNING,MULTICAST>
inet 150.150.8.1 netmask ffff0000 broadcast 150.150.255.255

  • lanadmin : to see detailed LAN interfaces of the machine

LAN INTERFACE STATUS DISPLAY
Tue , Jun 17,2008 09:12:05

PPA Number = 0
Description = lan0 HP PCI 10/100Base-TX Core [10BASE-T,HD,AUTO,TT=1500]
Type (value) = ethernet-csmacd(6)
MTU Size = 1500
Speed = 10000000
Station Address = 0x306ec32104
Administration Status (value) = up(1)
Operation Status (value) = up(1)
Last Change = 1186783
Inbound Octets = 42032376
Inbound Unicast Packets = 15518
Inbound Non-Unicast Packets = 501152
Inbound Discards = 1
Inbound Errors = 0
Inbound Unknown Protocols = 14605
Outbound Octets = 1719024
Outbound Unicast Packets = 17140
Outbound Non-Unicast Packets = 722
Outbound Discards = 0
Outbound Errors = 0
Outbound Queue Length = 0
Specific = 655367
Ethernet-like Statistics Group

Index = 1
Alignment Errors = 0
FCS Errors = 0
Single Collision Frames = 1053
Multiple Collision Frames = 99
Deferred Transmissions = 136
Late Collisions = 0
Excessive Collisions = 0
Internal MAC Transmit Errors = 0
Carrier Sense Errors = 0
Frames Too Long = 0
Internal MAC Receive Errors = 0

  • linkloop : a tool to tests layer 2 connectivity

# linkloop 0x00108303aabf
Link connectivity to LAN station: 0x00108303aabf
– OK

Categories: hp ux Tags: , , , , ,

Using remote X font server

May 3rd, 2009 bayu No comments

When using an X application remotely, sometimes the application needs specific fonts that are not available on our X server. Some of them might still work with a different fonts. Unluckily, one of mine doesn’t

I found some messages when I use remote X server on an application :

ovw: Xt Warning: Missing charsets in String to FontSet conversion
ovw: Xt Warning: Unable to load any usable fontset
ovw: Xt Warning: Missing charsets in String to FontSet conversion
ovw: Xt Warning: Cannot convert string “-*-helvetica-medium-r-*-120-*” to type FontSet

The solution is to use the font server in which the application is installed

on apllication side (in this example is an hp-ux server) :

  1. open /etc/rc.config.d/xfs , set RUN_X_FONT_SERVER=1.
  2. Execute ”/sbin/init.d/xfs start”

on X server side (my laptop is using OpenSUSE linux) :

  1. Log on as user that going to run the application remotely.
  2. Execute ”xset +fp tcp/<hp-ux_hostname>:7000” .
  3. Execute ”xset fp rehash” .
  4. Execute ”xset -q”.
  5. Do a remote log on, secure tunnel might helps much if you have a firewall issue.
  6. Set DISPLAY variable if needed – “export DISPLAY=x.x.x.x:0.0″
  7. Run the X application remotely.

Credits: http://forums12.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1212545170579+28353475&threadId=224569

Categories: hp ux Tags: , , , , ,

hp ux: Display detailed devices info

May 3rd, 2009 bayu No comments

To view devices (cpu, memory, adapters, etc), cstm can give you a very detailed information.

#echo “map selall info;wait infolog” | cstm ’, ‘

credits: http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=981387

Categories: hp ux Tags: , , , ,

Switch to our mobile site