Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Mongi

#1
Hello again!

I'm not sure weather it's a new bug or it has been already fixed, so I decided to write about it anyway.

When we try to set description of any DCI with non-english and non-russian language the description is saved as "?" symbols, for example: نوع محل or 测试服务 will be saved as "????".

Same behavior in "Parameter" field of DCI.
#2
General Support / Re: DCI modification using protocol
October 11, 2010, 10:49:16 PM
Receiving full list is not a problem unless there are some "end of list" marker. I was confused with CMD_OBJECT_LIST_END and expected to find something similar about node list. Thanks for the tip with "END OF SEQUENCE" flag, seems to work now.

Does all lists sent by server ends with "END OF SEQUENCE" flag or there are exceptions?
#3
General Support / DCI modification using protocol
October 11, 2010, 09:28:26 PM
Hello.

I'm writing my own client to connect and operate with NetXMS using it's protocol. It was quite successful until I faced creation of DCI's.

The problem is that to create DCI of an object, you need to create DCI(you get just new ID) and then modify it's content. When I tried to modify it, I've go error RCC_OUT_OF_STATE_REQUEST. According to session.cpp and ClientSession::ModifyNodeDCI I need to lock the object DCI list somehow. Some hard search resulted the only command able to lock this DCI list of object is CMD_GET_NODE_DCI_LIST(and CMD_UNLOCK_NODE_DCI_LIST to unlock). But it has two disadvantages:
1) It gives you all of DCI within selected object
2) This list of DCI doesn't finish with any "LIST_END" command, like object list is closed by CMD_OBJECT_LIST_END. So, we have to wait for a timeout in order to figure out that server finished list sending. (Moreover, there is command CMD_NODE_DCI_LIST_END in protocol reference but it's totally missing in source code :-\ )

So, is there more straightforward way to create/modify new DCI without waiting for full DCI list (or without this list at all)?

If it's the only way for now, could you please implement some possibility in protocol to simply lock and unlock object DCI list for current session?
#4
Thanks for fast reply!

In addition, there is another problem with strings: some special chars get escaped on push, but never decoded in History.

For example:
QuoteC:\NetXMS\bin>nxpush.exe -H localhost -u user -P pass host.local:Test=\\//!@#$%^&*
Will be saved and showed as
Quote#5C#5C//!@#23$#25&*

Also, if you add non-english characters, then they are showed as they were UTF8 encoded, so "ЙЦУКЕН" will become "ЙЦУКЕН". You are using simple varchar type in MSSQL in order to store values and it will be better to switch to nvarchar, or there are limitations from other DB engines?
#5
We are planning to use NetXMS with our custom push-type counters. All numeric counters seem to work well, but string one has some problems.

First of all, they are limited to 255 chars (according to database configuration). Moreover, they can cause server to crush due to lack of string NULL-terminator.

Way to reproduce:
1) Create DCI, Parameter:Test, Type: string; Origin: Push Agent
2) Excute:
QuoteC:\NetXMS\bin>nxpush.exe -H localhost -u user -P pass host.local:Test=123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789
(it is string with 300+ symbols)
3) Open "Last values" -- here you will see probably all of string
4) Open "Show history" -- here are 2 possibilities:
   a) server crush and you wont see anything
   b) you are lucky to see first 127 symbols and a bunch of garbage from server memory till first NULL-symbol

Server 1.0.4, Windows; DB: MSSQL

In spite of server crush, Is there a way work with strings longer than 127 symbols?