Archive

Author Archive

solaris: view attached devices

May 19th, 2009 bayu No comments

I was really miss a great tool to see installed devices in linux, lspci, that I couldn’t find in solaris. Doing some googling-job, i found a similar tool with lspci.. well this one actually can gives me a more detail (or complicated) than lspci. To see them Issue the command:

# prtconf -v

This will give you a very detailed report of devices attached to the machine. don’t use -v (verbose) if you hates the verbosity :)

Confused? Use this cool script to get a more readable output using the prtconf as its stdin (read the note on its header).

Categories: solaris Tags: , ,

OVO: templates manipulation scripts

May 15th, 2009 bayu No comments

Custsomer is a king, they said. Well that’s true on a lot of cases. Lately the customer wants us to change all the templates we have built for 3 years! That’s mean I have to change hundreds of template group in which there are up to 40 monitors inside them. Doing it from the motif GUI seems going to broke my wrist. At least i might have to buy a new mouse because of those thousands clicks per second.

OVO has been shipped with some useful console tools, especially for managing the templates. I used these tools to help me do the job:

  1. /opt/OV/bin/OpC/utils/opcnode : to get info and manage nodes data, including assigned templates, assigning and de-assign templates, etc.
  2. /opt/OV/bin/OpC/utils/opctempl : to download, upload, and modify templates

It doesn’t give much help if I do it by hand, so  I write some scripts using those tools :

  • gettemplates.pl : to download templates and save it under each node names they are assigned to. It required one argument, the node list file. The downloaded templates will be used for other scripts. At the moment it only support monitor scripts under one group (because that’s all I needed at the moment).
  • modsevup.pl : to mass change a particular severity inside template. The script taking three arguments : template name, severity before,  and severity after.
  • modtextup.pl : to change the text of notifications inside a template. It will take two arguments: template name and message text.
  • addnormal.pl : to add normal condition into the template. Just modify the script as you needed.
  • standardise.pl : this is just the concatenation of modsevup.pl modtextup.pl and addnormal.pl. It will add normal condition

All of them will show you the changes that has made to the original file, and you will be prompted if you would to directly upload it to the OVO or not .

Download them and modify as you like, but please keep the attribution attached, or, you can always click the orange button on the bottom right side :D .

synaptics: some packages didn’t show up on search result

May 13th, 2009 bayu No comments

have you ever found that when you do a quick search in synaptics, you know the packages is there but they doesn’t show up in the search result? This probably a bug, but there’s workaround for this.

# update-apt-xapian-index -f

Categories: linux Tags: , ,

solaris: installing sudo in solaris 10 x86

May 4th, 2009 bayu No comments

Download :
ftp://ftp.sunfreeware.com/pub/freeware/intel/10/sudo-1.7.1-sol10-x86-local.gz
ftp://ftp.sunfreeware.com/pub/freeware/intel/10/libiconv-1.11-sol10-x86-local.gz
ftp://ftp.sunfreeware.com/pub/freeware/intel/10/libintl-3.4.0-sol10-x86-local.gz
ftp://ftp.sunfreeware.com/pub/freeware/intel/10/libgcc-3.4.6-sol10-x86-local.gz

Install :

# gzip -d *
# pkgadd -d sudo-1.7.1-sol10-x86-local
# pkgadd -d libiconv-1.11-sol10-x86-local
# pkgadd -d libintl-3.4.0-sol10-x86-local
# pkgadd -d libgcc-3.4.6-sol10-x86-local

Configure:

# vi /usr/local/etc/sudoers

why use sunfreeware.com?

Categories: solaris Tags: , , , ,

solaris: Installing bash 4 on sun solaris 10 x86

May 4th, 2009 bayu No comments
Categories: solaris 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…

Linux: Changing the kernel semaphore setting in linux

May 4th, 2009 bayu No comments

To check shared memory segment, semaphore array, and message queue limits, issue the ipcs -l command.

Modify the kernel parameters by adding the following entries to the default system control configuration file,
/etc/sysctl.conf:
kernel.sem = 250 256000 32 1024
Set the numbers as needed, and the above numbers are respectively :
1.max semaphores per array
2.max semaphores system wide
3.max ops per semop call
4.max number of arrays
where :
max semaphores system wide = max number of arrays x max semaphores/array

Run sysctl with -p parameter to load in sysctl settings from the default file /etc/sysctl.conf.
sysctl -p
The entries from the sysctl.conf file are read during startup by the network initialization script.
On some distributions you may be required to add sysctl -p in one of the system initialization files (for example, rc.local) so that kernel parameters are set after each reboot.

Categories: linux Tags: , , ,

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: , , , ,

Linux: Fixing a broken grub

May 3rd, 2009 bayu No comments

The grub corrupted or replaced by another boot loader? follow this steps to fix it.

  1. Boot the system using any linux live having grub installed in it.
  2. Under the root user, execute “grub” to access the grub prompt.
  3. Use “find /boot/grub/stage1″ command in the grub prompt to find where the file is. The result should be like (hd0,2), (hd0,0), etc
  4. Use “root (hd0,2)” command, the (h0,2) taken according to the result in 3rd step.
  5. Use “setup (hd0,2)” command to install grub in the partition, or just (hd0) to install it on the Master Boot Record (MBR) of the disk 0.

good luck!

Categories: linux Tags: , , , , ,

Switch to our mobile site