nv-l
[Top] [All Lists]

RE: [NV-L] Some systems dont get added to the submap.

To: Tivoli NetView Discussions <nv-l@lists.ca.ibm.com>
Subject: RE: [NV-L] Some systems dont get added to the submap.
From: Leslie Clark <lclark@us.ibm.com>
Date: Wed, 20 Sep 2006 10:04:37 -0400
Delivery-date: Wed, 20 Sep 2006 15:07:08 +0100
Envelope-to: nv-l-archive@lists.skills-1st.co.uk
In-reply-to: <OFCACDC3B2.A6C5CFBD-ON882571EF.0048C6B0-882571EF.00495639@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

Rajesh, no one wants to discourage you from taking advantage of the programming interface, but I for one would just like to be sure you know about the alternatives that have led to those APIs being less used than they used to be. My apologies if you know all this already.

If you are only trying to represent those hosts from different subnets in a common submap, then a Smartset based on the field "EServer_sysName ~ ." (it exists), will give you that. The Smartset editor is under Tools. Things in the Smartsets remain managed by netmon and ipmap.

If however you intend to also write a management application that is going to manipulate their status, then you may have a reason to go to the trouble of developing a topology using the APIs.

Cordially,

Leslie A. Clark
IT Services Specialist, Network Mgmt
Information Technology Services Americas
IBM Global Services
(248) 552-4968 Voicemail, Fax, Pager



Greg Keetch <gkeetch@ca.ibm.com>
Sent by: nv-l-bounces@lists.ca.ibm.com

09/20/2006 09:21 AM
Please respond to
Tivoli NetView Discussions <nv-l@lists.ca.ibm.com>

To
Tivoli NetView Discussions <nv-l@lists.ca.ibm.com>
cc
Subject
RE: [NV-L] Some systems dont get added to the submap.









Rajesh,

It looks like you the condition (pObjectIdList->count > 0) is returning
false for some of the systems because there are no matches for the
conditions you are searching for (field EServer_sysName = workstationname
?). This may be due to a hidden character in the field data (space),
character case, etc. so I would double check the field values in the DB.

Based on the documentation for OVwDBListObjectsByFieldValue, if no match
was found that the OVwObjectIdList will contain no object IDs and still be
considered successful.

I'm not sure if this could help you, but maybe you could achieve what you
need by using the location.conf file or a smartset.

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] Some systems dont get    
            09/20/2006 03:09          added to the submap.                
            AM                                                            
                                                                         
                                                                         
            Please respond to                                            
             Tivoli NetView                                              
               Discussions                                                
            <nv-l@lists.ca.ib                                            
                 m.com>                                                  
                                                                         
                                                                         





Jane,
Sorry I did not mention anything in the subject line of the mail
earlier.
The earlier mail which I sent in html format failed to reach nv-list
because it was 60 KB and I had to switch to plain text format.

In the scenario I am using there will be certain systems with our SNMP
MIB running on them. We need display them on the console using our own
submap representation. The submap is created perfectly but some of its
components fail to add.

The problem is that
1. Some systems are not getting added to the submap. They fail to add
when pObjectIdList->count > 0 is false.
2.I want to know why the condition (pObjectIdList->count > 0) is
becoming false for some systems (ie pObjectIdList->count is 0 instead of
being 1).


Thanks,
Rajesh
-----Original Message-----
From: nv-l-bounces@lists.ca.ibm.com
[mailto:nv-l-bounces@lists.ca.ibm.com] On Behalf Of Jane Curry
Sent: Wednesday, September 20, 2006 3:22 PM
To: Tivoli NetView Discussions
Subject: Re: [NV-L] (no subject)

Hi Rajesh,
Perhaps you might explain a bit at a higher level, what you are trying
to achieve?  Most people who use NetView do not need to resort to
programming with the APIs.  Perhaps there is an easier way of achieving
what you want??
Cheers,
Jane

Lakka, Rajesh Kumar wrote:
> 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.
> 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
nodeName[256];
>             CString                                     ComponentName;
>             ComponentName = Component;
>             ComponentName.MakeUpper ();
>             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)
>

--
Tivoli Certified Consultant & Instructor
Skills 1st Limited, 2 Cedar Chase, Taplow, Bucks, SL6 0EU, UK
Tel: +44 (0)1628 782565
Copyright (c) 2006 Jane Curry <jane.curry@skills-1st.co.uk>.  All rights
reserved.

_______________________________________________
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