NNM Web interface on headless / unattended server
The NNM web interfaces
both still require a running copy of NNM on the server. To avoid
other hoops this is best open on the map called "default". On a
headless server, or one that doesn't always have an operator at the
console, this can be annoying.
- NNM OpenView Welcome Page (http://SERVER:3443/OvCgi/ovlaunch.exe), and
- Network Node Manager Home Base (http://SERVER:7510/topology/home)
The solution given here uses an X server that doesn't require graphics
hardware, because it doesn't actually present anything to any user, and
also doesn't provide for user input. "ovw" doesn't need user input any
more, and reacts correctly to kill signals, ovpause and shutdown and
the like. This means it can be run attended.
The X server used in the below is Xvfb and was available in the HP-UX
installation in /usr/bin/X11
There are precompiled versions available from Jeff Hunter http://www.idevelopment.info/data/Unix/General_UNIX/UNIX_General_UNIX_home.shtml
This is also available in source form from ftp.x.org
The script below is intended to be run as a user level process from a
cron job. It detects running ovw and X servers, and only restarts if
needed. It depend on the service level required for your NNM web
access, but here it is run hourly.
A potential issue arises with map updating given the map is opened
read-only, and hence won't reflect topology changes. If this is an
issue, then depending on your SLA for tolopogy changes, pull the PID
from the output of the "ps" line and as required by time or by some
flag file created by an autoaction to a OV_Node_Added
# Script to run an instance of ovw for the purpose of providing
# access to web NNM (Network Presenter).
# Expected to be run each hour or so from a cron job.
# If there is an "ovw -ro" process running, then that is assumed to be
# Otherwise, check if there is a headless X server available.
# If not start one.
# Run an instance of ovw.
# David Horton 16-Jan-2006
# Create a directory out of the way to allow nohup.out files to
# be created without overwriting some other project.
[ ! -d headless_ovw ] && mkdir headless_ovw
chmod +w * .
if ps -ef | grep -v grep | grep "ovw -ro -map default" > /dev/null
if xdpyinfo > /dev/null
nohup Xvfb -screen 0 1280x1024x8 &
mv nohup.out nohup.out.Xvfb
nohup ovw -ro -map default -pollXServer&
mv nohup.out nohup.out.ovw
chmod +w * .
# Probably should restart the ovw to cause the maps to be re-loaded.