Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto refresh

Status
Not open for further replies.

Vickdu

MIS
May 14, 2002
16
0
0
ZA
Hi Guys

My Auto refresh is not working I have the read/write map and the crew that I support have a read only map.

The problem is that the read only map sometimes does not update and the crew does not pick up alarms or a device going red.

What might be the cause and what should i try.

best regards
Vickdu
 
Hi there, which product are you currently using?NNM or VPO or both?
Anyway, you should probably use a script to synchronize every map, perhaps, after the prime shift, it 'd only take a few minutes and would keep your maps consistent all the time.
This can be acomplished by copying the NNM's rw map to the rest, the users must close their maps for this period of time, but for 15 maps as an example it should only take about 5 to 7 minutes, no more than that...

Hope this helps,
vlan52
[sunshine]
 
First of all, I would put a paging solution into place, with the defacto in the industry being TelAlert; and, you can get more information about this product here:


If you have operations personnel set up to be "glass watchers," so to speak, with no automated solution, such as TelAlert, in place to send e-mails, pages, voice messaging, loud speakers, sign board messages, etc. to the correct personnel, when the truly critical alarms are perceived, e.g., OV_Node_Down, etc., that would take care of your worries without making any modifications to the management system, to make up for the fact that the read-only map is not current and/or synchronized.

With that being said, and cheers for out-of-the-box functionality, then you can make the decision, as far as modifying the default configuration of OpenView, if you choose to do so at all.

Look at the $OV_REGISTRATION directory, and you will find several files, one of which contains the menu pick item for the map's refresh option. This will include the information that you would need, as to what is done in the background, when this menu selection is executed.

Then, set up a cron entry - or the Windows equivalent, "Scheduled Tasks" - so that the refresh is automatically done on a periodic basis, so that the map is as current as possible, without causing an undue amount of overhead on the management system itself, when map synchronization is taking place.

Best Regards,

Michael "OpenView Mike" Stoller
EHI-INSM Inc.
CEO/Senior Consultant and Engineer
michael.stoller@ehiinsm.com
 
Hi vlan52

Im using NNM.How would you go about implementing that script I dont have even a clue of how to do that!
What should the script look like etc etc.

Best reagrds
Vickdu
 
Sure, no problem, here goes the script I'm using:

#!/usr/bin/ksh
# ovw_map_copy script
# Purpose: Automatically copy the default NNM map to all ITO users
# Argument: None
# Dependency: None
# Output: File $UNCOPIED_LIST contains a list of maps that couldn't
# be copied because user was logged on at the time the script
# was last executed
# Return value: 0 -> Success
# 1 -> Error
#
# Creation date: 01/31/2001
# Created by: Carlos Garcia -vlan52- cgarcia@optiglobe.com.ar
# Last modified on: 03/09/2001
# ChangeLog: 20010309: included (ovwchown operator $MAP_NAME;ovwchgrp opcgrp $MAP_NAME); included opc_adm map copy.
#
#
# Load environment variables
. /opt/OV/bin/ov.envvars.sh

# Define some environment variables

# File where list of current out-of-date maps is stored
UNCOPIED_LIST=$OV_CONF/ovw_uncopied_maps
# Temporary file to store the new list of out-of-date maps
TMP_LIST=/tmp/tmp_ovw_uncopied_maps
# Name of file where copy operation output will be logged
LOG_NAME=$OV_LOG/ovw_mapcopy.log
# Name of map to be copied to all the users. Typically 'default'
DEFAULT_MAP_NAME=default
# Maximum number of lines in logfile
NUM_LINES=200

# Erase temporary list of uncopied maps
if [ -f $TMP_LIST ]
then
rm $TMP_LIST
fi

# If list of uncopied maps doesn't exist, create an empty one
if [ ! -f $UNCOPIED_LIST ]
then
touch $UNCOPIED_LIST
fi

# Initialize logfile
>> $LOG_NAME
date >> $LOG_NAME
echo "---- Starting copy of $DEFAULT_MAP_NAME map..." >> $LOG_NAME

# Test if the default map exists
if [ ! -d $OV_DB/openview/mapdb/$DEFAULT_MAP_NAME ]
then
# Default map doesn't exist, abort
echo "$DEFAULT_MAP_NAME map not found. Aborting."
echo "ERROR: Default map '$DEFAULT_MAP_NAME' not found. Aborting" >> $LOG_NAME
echo "---- End of map copy" >> $LOG_NAME
exit 1
fi

# Begin to loop through map names
ls -l $OV_DB/openview/mapdb/ | grep "^d" | grep -v $DEFAULT_MAP_NAME | awk '{ print $9}' | while read MAP_NAME
do
$OV_BIN/ovw -deleteMap $MAP_NAME
if [ $? = 1 ]
then
# Couldn't delete map, user is probably logged in
if [ `grep -c $MAP_NAME $UNCOPIED_LIST` != 0 ]
then
# Couldn't copy map for the second time. Generate an error
echo "ERROR: Couldn't copy $DEFAULT_MAP_NAME map to map
$MAP_NAME for the second time."
echo "ERROR: Couldn't copy $DEFAULT_MAP_NAME map to map $MAP_NAME for the second time. Run script again when user $MAP_NAME is disconnected." >> $LOG_NAME
# Uncomment the following line if you want to inform ITO about the problem.
# Make sure appropriate template will match the message text
# $OV_BIN/OpC/opcmsg severity=minor application=OpC object="NNM map $MAP_NAME" msg_text='Unable to copy $DEFAULT_MAP_NAME map to user $MAP_NAME during the last two shifts. Run the script again when user $MAP_NAME is logged of IT/O" msg_grp=Job
fi
# Keep a log of uncopied map name
echo $MAP_NAME >> $TMP_LIST
else
# Could delete map. Try to copy the default map
$OV_BIN/ovw -copyMap $DEFAULT_MAP_NAME $MAP_NAME
if [ $? = 1 ]
then
# Default map exists, destination map has been erased
# but copy failed. Abort script, there could be a problem
# with the default map
echo "Couldn't copy map $DEFAULT_MAP_NAME to map named $MAP_NAME\nPlease try the command mannually and restore map $MAP_NAME"
echo "Scipt aborted during copy of map $MAPNAME. Copy the default map ($DEFAULT_MAP) manually, and check error messages" >> $LOG_NAME
exit 1
else
#change map owner/group:
$OV_BIN/ovwchown operator $MAP_NAME
$OV_BIN/ovwchgrp opcgrp $MAP_NAME
echo "Successfully copied default map to map $MAP_NAME" >> $LOG_NAME
fi
fi
done

#change opc_adm owner/group back to root/sys:
$OV_BIN/ovwchown root opc_adm
$OV_BIN/ovwchgrp sys opc_adm

# Close logfile entry
echo "--- Finished map copy" >> $LOG_NAME

# Update the list of uncopied maps:
mv $TMP_LIST $UNCOPIED_LIST

# Trim logfile to desired size
tail -n $NUM_LINES >> $TMP_LIST
mv $TM_LIST $LOG_NAME

# Exit properly
exit 0

Hope this helps Vickdu, regards,
vlan52
[sunshine]
vlan52
The end of wisdom is freedom. The end of culture is perfection. The end of
education is character. The end of knowledge is love.
 
The read-only map can have "auto-refresh" if you use cron to automate the command that is used in the OV registration files, which is associated with the menu selection in the read-only map, which manually refreshes the map.

At that point, you would only need to decide on the interval, and then use cron - or, scheduling an automated action, if you are running the management apps on WINNT... -at the desired rate for refresh, with that being four times per hour, or whatever is deemed most appropriate, given the specific technical requirements that drive the use of these management applications.

Stay Strong,

Michael "OpenView Mike" Stoller
CEO/Senior Consultant
EHI-INSM Inc.
michael.stoller@ehiinsm.com
818-708-3660
 
Good idea Mike, I'll take a look into the $OV_REGISTRATION path and see if using that file makes NNM's life easier.

Regards,
vlan52
[sunshine] vlan52
The end of wisdom is freedom. The end of culture is perfection. The end of
education is character. The end of knowledge is love.
 
Hye

I have a big problem, I find a correct file in $OV_REGISTRATION: there are f.refresh_map . But i don't find where I can modify this function.

By avance Thanks
 
Hi alcanet

Did you manage to find the registration file that refreshes the map and how to modify it?

Vickdu
 
Hi Vickdu, regarding your initial question, refreshing the read-only maps is not required to update STATUS, since the status of every symbol, object in every submap is updated automatically.

What you would not receive/get, are updates on topological events (addition/deletion of symbols), under RO maps, then you should click on Refresh, to retrieve those changes.

Now, if you still have problems getting updates for the status of the interfaces, etc...then, there is another problem, probably with "consistency" of yur objects database, let us know and let see if we can improve it, ok?

Hope this helps,
vlan52
[sunshine]

vlan52
The end of wisdom is freedom. The end of culture is perfection. The end of
education is character. The end of knowledge is love.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top