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 - Victor Kirhenshtein

#6496
General Support / Re: Timeout of web login
December 02, 2009, 01:27:02 AM
Hello!

I have patchet nxhttpd so "Alarms" page will refresh automatically every 15 seconds, and so session should not timeout. Replace file src/nxhttpd/alarm.cpp with attached one and recompile. Let me know if you need recompiled Windows binary of nxhttpd.
Hope this helps!

Best regards,
Victor
#6497
A pochemu v pervom sluchae bil katalog netxms-0.2.31, a vo vtorom - netxms-0.2.27? Ja patch delal dlja versii 0.2.31.
#6498
Zamenite src/server/core/netinfo.cpp na prilozennij. Dolzno pomoch'.
#6499
General / Re: problem with development
December 01, 2009, 11:46:48 AM
In general, steps are following:

1. create CSCPMessage object
2. fill it with necessary variables and set correct command code
3. create raw message (CSCP_MESSAGE) vith CSCPMessage::CreateMessage method
4. send raw message to agent as usual
5. receive response using RecvNXCPMessage function
6. create CSCPMessage object from received raw message
7. read variables from message object

Best regards,
Victor
#6500
Hi!

It's really difficult to estimate release time for this feature. We start working on it some time ago (it's called "zoning" in NetXMS), but then development was suspended. In a short time we plan to release stable version 1.0 and focus on developing 1.1 branch. This feature definitely will appear only in 1.1, if I will have enough resources - withing 6 month.

Best regards,
Victor
#6501
During some polls server may not close connection to agent gracefully, which cause this error on agent side. We will fix this in next version. For now, you can safely ignore these errors.

Best regards,
Victor
#6502
General / Re: problem with development
November 25, 2009, 12:24:06 PM
Yes, it could be encrypted, and in that case you should provide correct encryption context. However, if you are not using encryption, you can simple pass NULL.

Best regards,
Victor
#6503
General / Re: problem with development
November 24, 2009, 10:28:16 PM
CSCP is an old name for NXCP, and it's partially replaces in the code. In latest versions, there are no RecvCSCPMessage() function, only RecvNXCPMessage() - but it's the same function anyway.

Best regards,
Victor
#6504
Общие вопросы / Re: Огромная БД
November 24, 2009, 11:29:30 AM
Явно выраженного перекоса в сторону одной из таблиц нет. Можно почистить event log, но это всего лишь 34MB, не думаю что это решит проблему. Попробуйте включить slow query log в MySQL (http://dev.mysql.com/doc/refman/5.1/en/slow-query-log.html) - попробуем посмотреть, какие именно запросы тормозят, и будем их оптимизировать.
#6505
General / Re: problem with development
November 24, 2009, 11:24:10 AM
Hi!

You should create CSCPMessage object from CSCP_MESSAGE structure filled by RecvNXCPMessage function. After that, you can access to variables inside message via GetVariableXxx methods of class CSCPMessage. If you getting parameter's value from agent, you should be interested in variables VID_RCC - DWORD holding response code, and VID_VALUE - received value as string.

Best regards,
Victor
#6506
Hi!

No, it's not possible. We are planning to add this feature in future versions.

Best regards,
Victor
#6507
Currently it is not possible. Most likely such feature will be added in one of the next versions.

Best regards,
Victor
#6508
General Support / Re: Individual Service Monitorning
November 23, 2009, 12:47:55 PM
Hello!

You can monitor status of Windows services via agent's parameter System.ServiceState. It should be used as

System.ServiceState(service name)

You can also found discussion about it here: https://www.netxms.org/forum/index.php/topic,166.0.html

Best regards,
Victor
#6509
General / Re: problem with development
November 19, 2009, 09:46:33 AM
This define is required for porting code to Windows. On Windows, if you want to export function or class from DLL, you should add __declspec(dllexport) to it's declaration. So, on Windows we define LIBNETXMS_EXPORTABLE as __declspec(dllexport) when building DLL, and on other platforms it simply defines to nothing. So, if you are not writing your code for Windows or not writing a Windows DLL you can simply remove this or define to nothing.

Best regards,
Victor
#6510
General / Re: problem with development
November 18, 2009, 10:56:56 AM
Hello!

I see the following errors:

1. when you sending message to the agent, you give the wrong message size - instead of


send(socketId,&pRawMsg,sizeof(msg),0)


you should use


send(socketId,&pRawMsg,ntohl(pRawMsg->dwSize),0);


2. You use very small receive buffer - sizeof(CSCP_MESSAGE) will be something like 24 to 32 bytes, but incoming message could be much larger. You should use at least 1024 bytes buffer for receiving messages with single parameter's value and much larger if you wish to get lists from agent. We typically use buffers of 256KB. Other option is to receive message header first, check message size, and allocate buffer for received message dynamically.

3. Protocol messages use binary representation of data, so debugging with printf("%s") will not help much. You should print individual fields.

4. For header - there are many errors on different levels. I suggest you to use same declarations as in nms_cscp.h, especially for CSCP_MESSAGE and CSCP_DF structures, because they represents actual data positions in transmission stream. Don't forget to use #pragma pack or you will get incorrect results on some platforms or compilers.


And why you not using already written communication code in libnetxms and libnxsrv? libnxsrv contains ready to use C++ API for communicating with agents, which handles all communication and protocol things and gives you high level API.

Best regards,
Victor