Since I'm not good at comparing lists, I figured I might not be only one having this problem so I share this.
Here is a dos batch file that combines the output of tasklist and pdshow.
It will show which java.exe belongs to which LMS process and how much Memory and CPU time that process has used.
Something like this:
LmsProcess Pid Process Memory CPU
--------------------- ------ ------------------- -------------- ------
UPMDbEngine 15856 dbsrv10.exe 1.251.816 K 1:02:27
UPMDbMonitor 23232 dbmonitor.exe 6.128 K 0:00:08
Tomcat 24480 tomcat.exe 578.976 K 0:41:01
TomcatMonitor 10840 cwjava.exe 10.284 K 0:00:33
Apache 14456 Apache.exe 11.008 K 0:00:06
RMEDbEngine 12740 dbsrv10.exe 437.908 K 4:30:43
Proxy 12936 perl.exe 3.992 K 0:00:50
NameServer 12948 cwjava.exe 15.748 K 0:00:40
NameServiceMonitor 12744 cwjava.exe 9.612 K 0:00:32
EDS 1784 cwjava.exe 35.944 K 0:01:58
LicenseServer 12356 cwjava.exe 13.232 K 0:00:34
IpmDbEngine 7000 dbsrv10.exe 16.940 K 0:03:20
INVDbEngine 11188 dbsrv10.exe 17.312 K 0:13:57
FHPurgeTask Transient terminated
FHDbEngine 18552 dbsrv10.exe 27.712 K 0:15:20
ESS 17608 cwjava.exe 55.060 K 0:06:25
EssMonitor 12836 cwjava.exe 10.632 K 0:00:31
EventFramework 20940 cwjava.exe 33.396 K 0:00:37
PMServer 8952 cwjava.exe 20.836 K 0:01:04
SyslogCollector 8772 cwjava.exe 33.656 K 0:22:34
EPMDbEngine 8784 dbsrv10.exe 16.144 K 0:11:19
EPMServer 22440 cwjava.exe 49.416 K 0:04:37
FHServer 8252 cwjava.exe 22.724 K 0:04:23
diskWatcher 8260 diskWatcher.exe 2.124 K 0:00:00
DFMMultiProcLogger 8324 cwjava.exe 8.996 K 0:00:31
DFMLogServer 8332 cwjava.exe 12.064 K 0:00:35
DFMCTMStartup Administrator has shut down this server
DfmBroker 8348 brstart.exe 1.360 K 0:00:00
DfmServer 24292 CS_sm_server.exe 2.168 K 0:00:00
DfmServer1 20212 CS_sm_server1.exe 2.176 K 0:00:00
DCRDevicePoll Transient terminated
CSSCPServer 24636 cwjava.exe 15.280 K 0:01:17
CSRegistryServer 16192 cwjava.exe 13.116 K 0:00:33
CSDiscovery Transient terminated
CmfDbEngine 960 dbsrv10.exe 64.488 K 4:33:36
CmfDbMonitor 13752 dbmonitor.exe 6.060 K 0:00:12
DCRServer 19148 cwjava.exe 61.460 K 0:08:17
CMFOGSServer 21316 cwjava.exe 112.608 K 8:42:12
Just cut- paste the stuff below in a text editor and save the result as pds.bat, a batch file or download the attached batch file.
The script uses the pdshow command so The CSCOpx\bin directory has to be in the PATH of the user running this batch.
If you find this usefull let me know
Cheers,
Michel
@echo off
setlocal enabledelayedexpansion
: ______________________________________________
: | |
: | pds.bat Dimension Data |
: | |
: | mh at didata dot be 3-Dec-2011 |
: |_____________________________________________|
echo.
echo LmsProcess Pid Process Memory CPU
echo --------------------- ------ ------------------- -------------- --------
tasklist /NH /V > tlist.txt
for /f "tokens=*" %%a in ('" pdshow -brief | find /v "**" | find /v "State " "') do (
set str=%%a .
set proc=!str:~0,22!
set state=!str:~22,42!
set pid=!str:~64,6!
call:findtask !pid! !proc! "!state!"
)
echo.
del tlist.txt
goto:EOF
:findtask
set state=%~3
set proc=%~2 .
set proc=%proc:~0,23%
set pid=%~1
for /f "useback tokens=*" %%a in ('%pid%') do set pid=%%~a
if NOT "%pid%" == "0" goto nor
echo %proc% %state%
goto:EOF
:nor
set t=%proc% %pid% .
<nul set /p ".=%t:~0,32%
for /f "tokens=*" %%a in ('" type tlist.txt | find " %pid% " "') do (
set ln=%%a
echo !ln:~0,19! !ln:~63,14! !ln:~148,8!
)
goto:EOF
Great job Michel !
Cisco should think about the introduction of a "contrib" directory in the CSCOpx directory tree like HP OpenView has had in former times for NNM. They put some very helpful public customer scripts in that directory. The scripts were tested once but provided without support - but always have been very helpful - at least as a starting point for own scripts.
Thanks Martin,
I suppose cisco will point to cosi for people that would want to contribute http://cosi-nms.sourceforge.net/
I'm planning to clean up some of the batch and perl scripts I use and post them here. Seems the right place to me.
Cheers,
Michel