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 - x199x

#1
Oh I cause that bug. It is not relate to the unsigned integer problem. Because the counter of the inflow will be zero when the agent restart. for example, the agent network infolw  now is 1000000000,and it save to the DB and the agent machine reatart. the network infolw will set to zero. When the server get the "Net.Interface.BytesIn(eth0)" from the same agent again. 0 mimus 1000 is a negative number.
So That bug cause:
1)when the agent machine restart
2)the first point I have said above.
#2
hi,victor
In netxms-1.1.6 I set the DCI of my interface "Net.Interface.BytesIn(eth0)"(kb/s)  and set it to Delta value(average per second)
There is two problem I meet:
1)In linux/window,the counter of the inflow of interface can increase until it reach an bottleneck(maximum value),and then it become to zero again,It is a cycle. But if the netxms get two values near the bottleneck left and right, and the second value minus the first one,it will come up a negative number. It will cause a bug,isn't it?
2)I ergodic the database(mysql) of a agent(idata_103) file:idata_value  and try to find the DCI "Net.Interface.BytesIn(eth0)"(kb/s)  and I found that the is 11634 records but there is 151 records is negative number(from -1813 to -33059395).This is a bug become of the negative number. It may not cause by the above problem. Because of some of the negative number is samll.
there is my sql command:
SELECT
  idata_value
FROM idata_103
WHERE item_id = 84
AND idata_value < 0;


If it is a bug,how I can slove it?  Thanks!
#3
Hi
  Thanks for your detail answer and suggestion!  Best wish!
#4
hi,victor:
I want to auto add 4 DCI for the interfaces when the server found the Node object first time.So I try to do it in server when the node object load the Templates "@System.Agent" first timeI define a function "ApplyInterfaceDCI()" to do it.
Its's source code is below.
It come true is like it: 1.Get the agent's interface list  2.Create interface's DCI with the interface index 3.Add the DCI to the Node object.


void Node::ApplyInterfaceDCI()
{
    //try to get the interface list,if try 100 times it also can not get it,it will break.
    InterfaceList *pIfList = NULL;
    int k=100;
    while (pIfList == NULL && k>0)
    {
        pIfList = getInterfaceList();
        k--;
    }
   
    //set the DCI for all the interface
    if(pIfList != NULL)
    {

        for(int j = 0; j < pIfList->getSize(); j++)
        {
                DWORD ifIndex = 0;
                ifIndex = pIfList->get(j)->dwIndex;
                       
                char parametrName[4][100];
                sprintf(parametrName[0],_T("Net.Interface.BytesIn(%d)"),ifIndex);
                sprintf(parametrName[1],_T("Net.Interface.BytesOut(%d)"),ifIndex);
                sprintf(parametrName[2],_T("Net.Interface.PacketsIn(%d)"),ifIndex);
                sprintf(parametrName[3],_T("Net.Interface.PacketsOut(%d)"),ifIndex);
               
                //set DCI for one interface
                for (int i=0; i<=3; i++)
                {
                    DCItem *pItem = NULL;
                    pItem = new DCItem(CreateUniqueId(IDG_ITEM), parametrName[i], DS_NATIVE_AGENT,
                    DCI_DT_INT, 60, 30, this,DCM_AVERAGE_PER_SECOND);
                       
                    pItem->setStatus(ITEM_STATUS_ACTIVE , false);
                    if (pItem != NULL)
                    {
                       BOOL bSuccess;
                       bSuccess = this->addItem(pItem);
                       if (!bSuccess)
                       {
                           delete pItem;
                       }
                    }
                }//for
   
       }//for
   }//if

   if (pIfList != NULL)
    {
       delete pIfList;
       pIfList = NULL; 
    }
         
}


There are a few question for my source code
1.BeforeI use " pIfList = getInterfaceList();" to get the interface list ,should I add a "lock" to avoid the source conflict?
2.When I use " pIfList = getInterfaceList();" to get the interface list , it may not success get the interface list sometimes, why?  I have to try to call "getInterfaceList()" in maximum 100 time if it always fail, will it cause some potential problem?
3.When I use pItem = new DCItem() to create a DCI and add it success, I did not free that DCIiem object, will it cause memory leak?
4.Is my code have some potential fault? Please point to it,Thanks!

Best wish!
#5
General / Re: About the Event
April 18, 2012, 01:48:32 PM
Thanks!
It help a lot
#6
General / About the Event
April 15, 2012, 04:05:50 PM
hi,victor
  When the Event generate in the Server. We can see the Event in the Console. Does the console active "ask" the Server whether an Event generate circularly? Or the Server active "tell" the Console in time when an Event is generate ?
  I saw the code,it may be the second situation. But I am writing my own client with java api. I don't know how I can get it in java api when the Server "tell" the client a Event is generations.?
Thanks!
#7
Thanks for your answer.
But I saw the  iostat source code,and found that, the  iostat  get the disk queue with the  Field 11 — weighted # of milliseconds spent doing I/Os
while netxms with the Field 9 — # of I/Os currently in progress.

So I think, may be there is something wrong with the iostat to get the disk queue value.
#8
Hi:
I used the netxms1.1.6, Linux
I found the System.IO.DiskQueue to get the disk queue value in netxms is far different from that I get with "iostat" tool. (Event the netxms flush the value in one minutes and iostat flush the value in one second)
So I saw the source code in netxms and iostat. Both of then get the value through the /proc/diskstats. they get the value is such like that:

   8    0 sda 34567 17159 1358372 355080 20268 49302 556588 1263830 1 150950 1622600
                                                                                                  |                |
                                                                                              netxms          iostate

but the netxms get the 11th value ( it is 1 ) while the iostate get the last one (it is 1622600) to do the calculation.

I want to know,if the concept of "disk queue"  in netxms is different from that in "iostat"?    or what's the  definition of "disk queue" in netxms.

Thanks!
#9
Windows / About the "System.Memory.Virtual.Total" problem
February 26, 2012, 11:44:08 AM
Hi,
    I want to get the total Virtual Memory information in window(windows 7 and windows 2000). But I found that the value of it is bigger than that I see in the windows system.
    The "Virtual Memory" in Netxms is the "pagefile.sys" File's size add the physical memory size.
    In usual,the virtual memory in system is equal to the  "pagefile.sys" size. But,Why the "Virtual Memory" in Netxms include the physical memory?
    I see the code of H_MemoryInfo. The "Virtual Memory" is get by the MEMORYSTATUSEX struct's ullTotalPageFile parameter. Is it a bug?
Thanks
#10
hi:
I see the code to get the "System.IO.DiskQueue":
In linux,it get the data from /proc/diskstats and calculate it. But the finally value is far different from the value  that I get with the "iostat" command
In windows,it get the finally value by directly read the data (may be with existing file or api ,) I get the finally in picture below!

in all, the "System.IO.DiskQueue" in Netxms 1.1.6 is different from the  "DiskQueue" in windows and linux, It  may be some "concept" discrimination.

I want to know, the indicator value of "System.IO.DiskQueue"(It mean, in which number range represent the I/O is normal,in wihch number range represent unnormal )

Thanks!
#11
General / about the “System.CPU.Usage.Guest”
December 01, 2011, 10:04:42 AM
Hi:
   when I use the nxget to get the parameter "System.CPU.Usage.Guest" ,it's value always be "0.000000" . It's value is always be zero,It is something wrong on it,How can I fix it in the source code?
Thanks!
#12
General / Maybe it's a bug
November 28, 2011, 05:37:19 PM
In the console,when I right click a node to set a DCI.It can automatic display the parameter it(the node) support in normal. But sometimes,it can not display those parameter it support(it show nothing in the window). That phenomenons appear in version 1.1.5 and 1.1.6, maybe it is a bug. How I can fix it? Thanks!

#13
My boss was worried and I was waitting for your answer

Thanks for your answer in time ;D
#14
General Support / Ask for the Netxms 1.1.5 download url
November 17, 2011, 06:42:15 AM
hi,Victor:
Our team is developpig the monitor base on the Netxms 1.1.5. But nowadays,the netxms 1.1.5 download page is out of day.
Can you offer me the download page of netxms 1.1.5
what I need to download is the  "nxagent-1.1.5.exe"(32bit X86) and the "nxmc-1.1.5-win32-x86.zip"
if you give me the Url ,I can download it !

Best regards
Thank you~
[email protected]
#15
Windows / Develop the agent in windows
November 15, 2011, 03:09:00 PM
I want to do something to support the hard disk monistor in the agent(both in windows and linux).
but when I build the agent in win 7 with VC 2005. It put lots of errors.(such as lake of openss library file)

my question is: how I can build the agent source code in Windows? Is it something I should make attention? or some software that agent dependent on  I did not install?