DCI problem...

Started by sushizang, June 11, 2009, 08:04:29 AM

Previous topic - Next topic

sushizang

Using NetXMS agent, some custom process can not be recognized.

That process really executing in the system(Linux).

I can check it using "ps -ef".

But, When I get it on NetXMS console, just return value '0'.

Other custom process is works fine.

Using SNMP protocol, can not be auto recognize that OID(PID). Right?

Could you help me?

Thanks.
Regards.

Victor Kirhenshtein

Could you please post output of ps -ef and NetXMS parameter you are using to count your custom processes?

Best regards,
Victor

sushizang

# ps -ef | grep node
root      7549     1  0 13:41 ?        00:00:01 ./node_agent -d

parameters:
node_agent
node_agent -d
./node_agent
./node_agent -d

All of return values are '0'.


Thanks.
Regards.

Victor Kirhenshtein

Is node_agent real executable or shell script? If it is a shell script, then executable name will be sh (or bash, ksh, etc. - whatever your shell is), so Process.Count(node_agent) will always return 0 - because it will look for executable named node_agent. You can find processes by command line using Process.CountEx, like this:

Process.CountEx(".*","^node_agent")

Please note, that Process.CountEx uses regular expressions to find matching processes.

Best regards,
Victor

sushizang

Yes, you right. That's a python script.

And "Process.CountEx(".*","^node_agent")" not work, just return '0', But "python" return '1'.

Thanks.
Regards.

Victor Kirhenshtein

It's my mistake: ^node_agent is not correct regexp - ^ character means "beginning of the line", but command line in your case doesn't starts with node_agent, it starts with ./node_agent, so you should either remove leading ^ or use Process.CountEx(".*","^\\./node_agent")

Best regards,
Victor

sushizang

Yes.

"Process.CountEx(".*"," node_agent")" and (".*","  ./node_agent") works fine.

But, (".*"," \\./node_agent") not works. (Don't care)


Thanks.
Regards.