logIt Log Around The Clock

application ARMv6 ARMv7 BeagleBoard certificate daemon device driver DNS embedded system emulator file system fuse GPIO image install-deinstall java java GUI job automation kernel local bin make-install managed node monitoring motif GUI OMAP3 OOP OSS OVCoreID php proxy python Raspberry Pi rootfs security shell script snmp socialmedia squid startup tagging template USB web-based wordpress Zabbix

Install HP P1006 Laser Jet

Basically installation is described here, but I download directly:

wget http://foo2zjs.rkkda.com/foo2zjs.tar.gz
wget http://foo2zjs.rkkda.com/firmware/sihpP1006.tar.gz

First, I remove foo2zjs that was installed by default. After (1) make and (2) copy the unpacked HP driver to foo2zjs directory. Do the (3) make install and make install-hotplug.

Run cups and the printer will be listed in the usual list (after a series of regular add new printer).

Script to Override Current DNS with OpenDNS

tags:

I added the following script (named use-opendns) which basically copies current DNS used to a backup file and then override it with another file already containing OpenDNS resolver.

#! /bin/bash
cp -f /etc/resolv.conf /etc/resolv.assigned.conf
cp -f /etc/opendns.resolv.conf /etc/resolv.conf

I put this in local bin and add a launcher to the panel as Application in Terminal type. The /etc/resolv.conf content is

#OpenDNS http://www.opendns.com/
nameserver 208.67.220.220
nameserver 208.67.222.222

Launcher for Java GUI

Launcher for java GUI in local bin (named ovo-java-gui).

#! /bin/bash
 
export JAVA_DIR=/usr/
/opt/OV/www/htdocs/ito_op/ito_op
exit 0

Add Script to Local Bin for Default Path

tags:

By adding script to /usr/local/bin, it will become reachable. What reachable means is that it’ll be part of the default PATH

echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

It supposed to be in executable permission (chmod +rx).

Java GUI First Look

Unlike motif GUI session, Java GUI user session can be used in multiple logins. However, administration tools are in limited set compared to motif GUI.

Get this GUI from the management server through browser port 3443 (i.e http://192.168.80.3:3443/). For Linux, Java Runtime Environment must be set.

I use Sun Java 6, so: JAVA_DIR=/usr/ for the GUI to run it as $JAVA_DIR/bin/java. I use export JAVA_DIR=/usr/ as set didn’t work. Fire ./ito_op and it will load (take long). I keep these .jar files & everything under /opt/OV/www/htdocs/ito_op/.

Dependecies in Manual Agent Deinstallation

If you wish to clean all OVO installation in managed node, start deinstallation from other OpenView application i.e. OV Performance Agent (OVPA). This will resolve dependency issues.

Startup script for TAP interfaces

To add startup script we can use:

I added the following shell script: setup-tap:

#! /bin/bash
tap_up() {
tunctl -t tap0 -u $USER
tunctl -t tap1 -u $USER
ifconfig tap0 192.168.20.1
ifconfig tap1 192.168.40.1
#iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
sysctl -w net.ipv4.ip_forward=1
}
tap_down() {
tunctl -d tap0
tunctl -d tap1
sysctl -w net.ipv4.ip_forward=0
}
case "$1" in
start)
tap_up
;;
stop)
tap_down
;;
*)
echo "Usage: $0 {start|stop}"
;;
esac
exit 0

Basically it is used as ./setup-tap start|stop. The following steps add it to boot:
copy it to /etc/init.d/setup-tap
chmod +xr setup-tap
update-rc.d setup-tap defaults

The last updating will put it in default runlevel:
setup-tap start in runlevel 2,3,4, and 5 setup-tap stop in runlevel 1 and 6.

Specific to this script itself, it didn’t run at first due to the $USER environment variable which must be set to arif (my username).

Manual HTTPS Agent Installation-Deinstallation (2)

…cont’d…
More Messy situation usually occur if agent was previously installed (along with activation in management server, node addition, etc.). If an HTTPS agent is deinstalled manually in the managed node, its data stays exist in certificate server & management server. We need to clean this mess.

Under complete deinstallation, the following directories are removed by

Hence, installing again in that managed node will give new OVCoreID. After activation, certificate request (ovcert -certreq) will appear in management server. A mismatch then occurs (due to similar host name [?]) from previous registration.

In management server we must delete previous information. At least the previously added node:

opcnode -del_node node_name=tikanga3.internal.mycompany.lan net_type=NETWORK_IP

There is a way to force previously-registered OVCoreID from the management server:

  1. Copy the core ID from the managed node (check ovcoreid)
  2. On management server: opccsacm -issue -file [some file to save to] -pass [password] -name [fqdn hostname] -coreid [coreid of node]
  3. FTP above file to managed node
  4. On managed node:

Manual HTTPS Agent Installation-Deinstallation (1)

Having pre-installed machine to be used for agent installation experiment is somehow tedious. But, I benefit from the troubleshooting effort.

Actually the pointers is written in Arsena – OVO Admin Guide v1.0a, but it wasn’t emphasized visually as being significant (so I missed it). There are three common install situation:

How to find which trouble I’m into?

opccsa -list_pending_cr

The problem is: it’d take some time for the pending-list to appear in the management server. I did restart (ovc -restart) the server, but it only helped a little (inconsistent). The server may have too much load at that time as the pending-list is appearing completely in the following day:

 Hostname  |                         Request ID  |                  Mapped Host  |
-------------------------------------------------------------------------------------------------------
localhost.localdomain  d936333e-f6a4-7537-0376-8e055989b35e
localhost.localdomain  e8087476-f686-7537-16ba-c77d2fc599e3
rhel-arif.internal.mycompany.lan  6e73e0a6-f57c-7537-1622-b0d28f73264c
tikanga3.internal.mycompany.lan  <strong>bc0a2506-f8d2-7537-1416-e692e27b7af0</strong>  tikanga3.internal.mycompany.lan
tikanga3.internal.mycompany.lan  d1f8b5b2-d14a-7537-0325-c7ed4464fe55

In Messy situation. We need to map the node through command line or Motif GUI.

Once, I do it through GUI:.

In the 2nd attempt I mix: adding node in GUI: Actions > Add Node and then map using command line:

opccsa -map_node bc0a2506-f8d2-7537-1416-e692e27b7af0=tikanga3

Those numbers are request ID listed in list_pending_cr. tikanga3 is the name of the node that we’ve added.

To add node through command line (instead of GUI) do:

opcnode -add_node node_name=tikanga3.internal.mycompany.lan node_label=tikanga3 net_type=NETWORK_IP mach_type=MACH_BBC_LX26RPM_X86 comm_type=COMM_BBC group_name=Linux layout_group=MenaraDuta

If layout_group isn’t included by default the added node will be in layout group HoldingArea.

Troubleshoot Installation

managed node

← Before After →