UCMDB and UD Practitioners Forum (Previously CMS)
cancel
Showing results for 
Search instead for 
Did you mean: 

Discovery Job: Collect Network Data by Shell or SNMP

Highlighted
JamesII
Member

Discovery Job: Collect Network Data by Shell or SNMP

uCMDB Ver: 7.5

Running job "Collect Network Data by Shell or SNMP". In side of the python script it runs a command: for i in `ps -e|awk '{print $1}'`; do echo __[$i]; pfiles $i | grep 'sockname: AF_INET'; done;echo $?.

If I read the man pages correct for pfiles, it stops each process to investigate it. Now, call me nieve, but stopping each service on a production box would be bad. Am I missing something? How is this command not harmful? But my second question is, on a UNIX box, how do I map a process to the port that it's using?

 

 

P.S. This thread has been moevd from Application Perf Mgmt (BAC / BSM) Support and News Forum to CMS and Discovery Support and News Forum. - Hp forum Moderator

3 REPLIES
Amit Bandekar
Honored Contributor

Re: Discovery Job: Collect Network Data by Shell or SNMP

For mapping process to the port, create a properties file (something similar to the portNumberToPortName.xml) and enter the mapping in there by defining appropriate variable names.Use these variable names within the python script to determine the process.

--Amit
JamesII
Member

Re: Discovery Job: Collect Network Data by Shell or SNMP

So is this using the "Collect Network Data by Shell or SNMP" job or is this a custom discovery job that I'd have to create? Becuase according to HPs documentation "Collect Network Data by Shell or SNMP" will map running processes to ports. I just need to know about the pfiles command.
Mr_Grincheux
Super Collector

Re: Discovery Job: Collect Network Data by Shell or SNMP

You are partially right, in BAC 7.5 job "Collect Network Data by Shell or SNMP" only collects network data and stores them into DDM mysql database.

Then you have to run another process called "Process to process by network data" which will reconciliate info from DDM database and map process info (fetched by "Host resources by shell") to port info.

Regarding pfiles, you need to have a root access to see informations of all running processes but it does not stop any process.
If you want to use pfile, you will have to call it via sudo or equivalent tool.
//Add this to "OnDomLoad" event