nv-l
[Top] [All Lists]

RE: [NV-L] Why is it that some symbols dont get added to the submap

To: "Tivoli NetView Discussions" <nv-l@lists.ca.ibm.com>
Subject: RE: [NV-L] Why is it that some symbols dont get added to the submap
From: "Lakka, Rajesh Kumar" <Rajesh.Lakka@in.unisys.com>
Date: Thu, 28 Sep 2006 17:48:04 +0530
Delivery-date: Thu, 28 Sep 2006 13:21:10 +0100
Envelope-to: nv-l-archive@lists.skills-1st.co.uk
In-reply-to: <OF259104AE.B462EEDD-ON882571F7.001A63AF-882571F7.001E4C6C@ca.ibm.com>
List-help: <mailto:nv-l-request@lists.ca.ibm.com?subject=help>
List-id: Tivoli NetView Discussions <nv-l.lists.ca.ibm.com>
List-post: <mailto:nv-l@lists.ca.ibm.com>
List-subscribe: <http://lists.ca.ibm.com/mailman/listinfo/nv-l>, <mailto:nv-l-request@lists.ca.ibm.com?subject=subscribe>
List-unsubscribe: <http://lists.ca.ibm.com/mailman/listinfo/nv-l>, <mailto:nv-l-request@lists.ca.ibm.com?subject=unsubscribe>
Reply-to: Tivoli NetView Discussions <nv-l@lists.ca.ibm.com>
Sender: nv-l-bounces@lists.ca.ibm.com
Thread-index: Acbiv6AMx3H/nHdET26fmK5U29cWBgAOEe4w
Thread-topic: [NV-L] Why is it that some symbols dont get added to the submap
This was very useful information. Can this also be used for HP OpenView
because both use almost the same libraries?

Thanking you.
Rajesh

-----Original Message-----
From: nv-l-bounces@lists.ca.ibm.com
[mailto:nv-l-bounces@lists.ca.ibm.com] On Behalf Of Greg Keetch
Sent: Thursday, September 28, 2006 11:01 AM
To: Tivoli NetView Discussions
Subject: RE: [NV-L] Why is it that some symbols dont get added to the
submap





Hello again,

The Windows version of NetView uses the smartsetutil.exe command instead
of
the Unix nvUtil command. The parameters passed to the smartsetutil are
the
same, but the output will be slightly different [object ID (Selection
Name)]. So running this command should give you a list of the objects
with
the EServer_sysName field set:
      \usr\ov\bin\smartsetutil e "('EServer_sysName' ~ '.')"

The ovobjprint command works the same (at least for this) in Windows and
Unix, so:
      \usr\ov\bin\ovobjprint -s SelectionName
or:
      \usr\ov\bin\ovobjprint -o ObjectID
using the SelectionNames or the ObjectIDs returned from the smartsetutil
command. You will just need to look for the output line with the
EServer_sysName field.

I guess I should also mention that the nvdbformat.exe command with a
format
file should also be able to provide you with this information. If it
works
the same on Windows as Unix, a format file like this could be used:

# NVDBFormat input file for reporting EServer_sysName settings.
# Filename: eserver_sysname.format
# Usage:    nvdbformat -f eserver_sysname.format
SELECTRULE:isNode=TRUE
SELECTRULE:EServer_sysName^Null
SELECTFIELD:1:Selection Name
SELECTFIELD:2:EServer_sysName
HEADER:Selection Name, EServer_sysName
HEADER:===============================
OUTPUT:${1}, ${2}
FOOTER:=== COMPLETED ===

If the format file is named "eserver_sysname.format" the indicated usage
should work.

Regards,
Greg Keetch
IT Specialist (Advisor), Network Services
Network Management Tools Specialist
Information Technology Services Americas (ITSA), Global Services, IBM
Canada



 

             "Lakka, Rajesh

             Kumar"

             <Rajesh.Lakka@in.
To 
             unisys.com>               "Tivoli NetView Discussions"

             Sent by:                  <nv-l@lists.ca.ibm.com>

             nv-l-bounces@list
cc 
             s.ca.ibm.com

 
Subject 
                                       RE: [NV-L] Why is it that some

             09/27/2006 08:58          symbols dont get added to the

             PM                        submap

 

 

             Please respond to

              Tivoli NetView

                Discussions

             <nv-l@lists.ca.ib

                  m.com>

 

 





I use Tivoli netview 7.1 for windows. What should be the command for
this?

-----Original Message-----
From: nv-l-bounces@lists.ca.ibm.com
[mailto:nv-l-bounces@lists.ca.ibm.com] On Behalf Of Greg Keetch
Sent: Wednesday, September 27, 2006 9:14 PM
To: Tivoli NetView Discussions
Subject: Re: [NV-L] Why is it that some symbols dont get added to the
submap





Hi Rajesh,

Sorry, meant to get back to you on this sooner but things have been
pretty
busy for me.

I can't say for sure, but maybe this is a problem with character case.
You
don't say if you're using NetView for Windows or Unix, so for your
reference any command I give are for Unix.

I would check the data in the DB using a couple of netview commands or a
shell script:

#!/bin/ksh
for selname in `/usr/OV/bin/nvUtil e "('EServer_sysName' ~ '.')"`; do
      echo "$selname ::" `/usr/OV/bin/ovobjprint -s $selname | grep
EServer_sysName`
done

This should give you a list of the object selection names and the
related
setting for the EServer_sysName field. If the EServer_sysName field
shows
data that is not all UPPERCASE for the three problem workstations (1, 3,
and 4) no object will be returned in your query.

If this is the case, you could update the field data in the DB to all
uppercase using the nvdbimport command, or remove the "
ComponentName.MakeUpper ();" line from the "AddComponentToSubmap()"
function and make sure the ComponentName is passed in the same character
case as it is stored in the DB. These are just a couple of starting
point
ideas since, as in perl, timtowtdi (there is more than one way to do
it).

I hope this helps.

Regards,
Greg Keetch
IT Specialist (Advisor), Network Services
Network Management Tools Specialist
Information Technology Services Americas (ITSA), Global Services, IBM
Canada





             "Lakka, Rajesh

             Kumar"

             <Rajesh.Lakka@in.
To
             unisys.com>               <nv-l@lists.ca.ibm.com>

             Sent by:
cc
             nv-l-bounces@list

             s.ca.ibm.com
Subject
                                       [NV-L] Why is it that some
symbols
                                       dont get added to the submap

             09/20/2006 02:23

             AM





             Please respond to

              Tivoli NetView

                Discussions

             <nv-l@lists.ca.ib

                  m.com>









Dear NetView experts and group members,

My name is Rajesh. I am facing a peculiar problem here. I am developing
a
connector program for the Tivoli NetView 7.1.4

I am having 5 systems (computers) in the same network segment or
different.

(192.168.ABC.).
 Let us say the hostnames of the 5 systems are as follows:
Work Station 1
Work Station 2
Work Station 3
Work Station 4
Work Station 5

All these 5 systems are discovered by netview and their nodes are
displayed
on the console.
I create a submap in my  own function :

CreateESubmap (){
int nnodes;
??..
??..
symbolId = OVwCreateSymbolBySelectionName
(OVwGetMapInfo(),pSymbolList->symbols[i].submap_id,SubmapName,"Network:c
pEServer",submapName,ovwNormalStatus,ovwCompoundStatusSource,

NULL, ovwMergeDefaultCapabilities);

objectId = OVwDbSelectionNameToObjectId (submapName);
submapId = OVwCreateSubmap
(OVwGetMapInfo(),objectId,ovwSharedSubmap,ovwNoSubmapType,submapName,ovw
BusLayout,ovwNoSubmapFlags);

//WHEN THE CODE REACHES HERE I CAN SEE THE SUBMAP IMAGE WITH THE NAME
submapName IS SHOWN IN THE CONSOLE.

//Now I want to add symbols to the submap which is already created.
//I try to add these work stations to the submapName.Now I try
//to add all these 5 Work Stations to the submap.
//One Workstation at a time in this for loop

for(int i=0;i<4;i++){
            If(addcomponenttosubmap(submapid,objectId,workstation))
            {
            nnodes=nnodes+1
            }



}




The implementation of addcomponenttosubmap is illustrated below.


bool CNV_ESDiscoveryDlg::AddComponentToSubmap(OVwSubmapId  submapId,
CString Component)
{
            bool     bComponentAdded       = false;
            int                     i;

            LogMessage ("\nAddComponentToSubmap : Entrance");


            OVwObjectId                             objectId;
            OVwObjectIdList                       * pObjectIdList;
            OVwObjectInfo              * pObjectInfo;

            OVwSymbolId                           symbolId;


            OVwFieldBinding                       * pFieldValue;

            char                                          * pchHostname;
            char                                          nodeName[256];

            CString                                     ComponentName;





            ComponentName = Component;

            ComponentName.MakeUpper ();

            LogValue ("Component", ComponentName.GetBuffer(1));

            for (i = 0; i < MAX_OBJECTS; i++) {
                        m_objectList[i] = ovwNullObjectId;
            }

            pFieldValue = new OVwFieldBinding;
            pFieldValue->field_val = new OVwFieldValue;
            pFieldValue->field_id =
OVwDbFieldNameToFieldId("EServer_sysName");
            pFieldValue->field_val->is_list = FALSE;
            pFieldValue->field_val->field_type = ovwStringField;
            pFieldValue->field_val->un.string_val =
ComponentName.GetBuffer(1);


            pObjectIdList = OVwDbListObjectsByFieldValue(pFieldValue);
            LogError("AddComponentTosubmap :
OvwDbListObjectsByFieldValue");


            if (pObjectIdList != NULL) {

                        LogMessage ("Object list != NULL");
                        LogValue ("Object count", pObjectIdList->count);

                        if (pObjectIdList->count > 0) {
                                    objectId =
pObjectIdList->object_ids[0];

                                    pObjectInfo = OVwGetObjectInfo
(OVwGetMapInfo(), objectId);




symbolId =  OVwCreateSymbol (OVwGetMapInfo(),
submapId,
objectId,
"Computer:WinNT",
nodeName,
ovwNormalStatus,
ovwCompoundStatusSource,
NULL,
ovwMergeDefaultCapabilities);

if
(symbolId != ovwNullSymbolId) {
bComponentAdded = true;
//MessageBox(" MCP Componment Added ");
//MessageBox(nodeName);

}

else {
LogError ("AddComponentToSubmap OVwCreate Symbol");

}






                                    }




            }

            delete pFieldValue->field_val;
            delete pFieldValue;



            return bComponentAdded;

}   // AddComponentToSubmap



The problem I face is that a symbol gets added to the submap only when
pObjectIdList->count > 0 is true only for WorkStation 2 and WorkStation
5.
I can see these symbols under the submapName.
But for WorkStation 1 WorkStation 3 and WorkStation 4 the
pObjectIdList->count > 0 is false so nothing gets added to the
submapName.

Even though all the workstations are in the same network segment I am
getting this problem.

If I put a OVwErrorMsg(OVwError()) after pObjectIdList =
OVwDbListObjectsByFieldValue(pFieldValue) always I get the message
?success
?for all the 5 workstations. But after this pObjectIdList->count > 0 is
false for WorkStation 1 WorkStation 3 and WorkStation 4.


Why pObjectIdList->count > 0 is false for WorkStation 1 WorkStation 3
and
WorkStation 4?

Waiting for your response,

Thanking you,
Rajesh_______________________________________________
NV-L mailing list
NV-L@lists.ca.ibm.com
Unsubscribe:NV-L-leave@lists.ca.ibm.com
http://lists.ca.ibm.com/mailman/listinfo/nv-l (Browser access limited to
internal IBM'ers only)



_______________________________________________
NV-L mailing list
NV-L@lists.ca.ibm.com
Unsubscribe:NV-L-leave@lists.ca.ibm.com
http://lists.ca.ibm.com/mailman/listinfo/nv-l (Browser access limited to
internal IBM'ers only)

_______________________________________________
NV-L mailing list
NV-L@lists.ca.ibm.com
Unsubscribe:NV-L-leave@lists.ca.ibm.com
http://lists.ca.ibm.com/mailman/listinfo/nv-l (Browser access limited to
internal IBM'ers only)


_______________________________________________
NV-L mailing list
NV-L@lists.ca.ibm.com
Unsubscribe:NV-L-leave@lists.ca.ibm.com
http://lists.ca.ibm.com/mailman/listinfo/nv-l (Browser access limited to
internal IBM'ers only)

_______________________________________________
NV-L mailing list
NV-L@lists.ca.ibm.com
Unsubscribe:NV-L-leave@lists.ca.ibm.com
http://lists.ca.ibm.com/mailman/listinfo/nv-l (Browser access limited to 
internal IBM'ers only)

<Prev in Thread] Current Thread [Next in Thread>

Archive operated by Skills 1st Ltd

See also: The NetView Web