March 08, 2000 09:49 AM

Ending Errant Processes

Rating: (1)
Windows IT Pro
InstantDoc ID #8318
Tlist and Kill pick up where Task Manager leaves off
I often notice that Windows 9x has many benefits over Windows NT. For example, Win9x lets you easily handle PC Cards and PCI cards; in fact, you can handle most hardware more easily in Win9x than you can in NT. In addition, most popular games don't run under NT, and those that do run badly. Yet, most applications that run on NT also run on Win9x. So occasionally I ask myself why I use NT.

The...

ARTICLE TOOLS

You must be a paid Professional Member to access this entire article.

Already a Professional Member? Please log in now:

NOT A PROFESSIONAL MEMBER? YOU CHOOSE:

Monthly or Annual

Professional Membership

VIP Membership

Compare Member Benefits

Add a Comment

Heck, just use the Sysinternals programs. "Process Explorer" is a great program. Much more powerful and flexible than anything mentioned here. Also, pskill and pslist from sysinternals also allow you to do operations remotely.

Christoper9/6/2001 8:09:27 AM


I hope you will understand my poor english...

- You can use the TLIST -t syntax to view process hierarchy. Some services run several processes and TLIST -t shows them. When the service and/or these processes encounters an error, the processes are not managed by the Service Control Manager. They are "orphean", and you cannot stop them without a KILL. The environment of the processes is visible (service's processes are under 'System'; interactive (i.e. in a user session) are under your shell process, i.e. Explorer)

- You can see, when multiple instances of the same EXE are running, which one is to kill, by viewing the the processe's command line

For example:

System Process (0)
System (2)
smss.exe (20)
csrss.exe (26)
WINLOGON.EXE (34)
SERVICES.EXE (40)
SPOOLSS.EXE (67)
RPCSS.EXE (88)
LSASS.EXE (43)
NDDEAGNT.EXE (102)
explorer.exe (105) Program Manager
CMD.EXE (115) cmd - tlist -t
TLIST.EXE (214)
OUTLOOK.EXE (116) Bo¯te de rÚception - Microsoft Outlook
MAPISP32.EXE (221)
CMD.EXE (120) cmd
USRMGR.EXE (236) User Manager - MEDERIC
I launched USRMGR in a command line: the second CMD process PID 220.

- the KILL command is sometimes ineffective: a dialog box (i.e. a handle or a thread) makes impossible to kill the process. You have to close the dialog box on the desktop interface.

- Many server (in the client-server meaning) processes uses 1 thread by client connection. It's useful to see if a user is still connected to this application. If a batch job uses the REMOTECMD service (Res. Kit), the folowing command let's you manage jobs (= not shuting down the remotecmd) that are likely to run in the same time

- OH and NTHandle are 2 good tools more precise than TLIST to see handles, and by the way, locks on files or other resources. PULIST may help too, it gives you a remote process' list.

A sample batch:
rcmd \\\\myserver c:\\admin\\oh -t file myprocess>>c:\\temp\\result.txt

set rcm_state=
rcmd \\\\myserver "c:\\admin\\tlist rcmdsvc | FINDSTR NumberOfThreads" > nb_thread
findstr /C:"NumberOfThreads: 3" nb_thread
if %ERRORLEVEL%==0 set rcm_state=in_use
if "%rcm_state%"=="in_use" (sc \\\\neui3 query remotecmd) & (echo service remotecmd stopped))
if "%rcm_state%"=="" echo An other job is running, remotecmd stay running

RCMD, REMOTECMD (process rcmdsvc.exe), PULIST and OH are Resource Kit tools.

Long life to W2000 Mag!



David Davant 4/6/2000 12:04:31 PM


You must log on before posting a comment.

Are you a new visitor? Register Here
Free Power Tools Brochure
Get Mark Minasi's 17-page guide today!



      

Related Resources

The Essential Guide to Optimizing OLTP Performance
A Essential Guide by Intel, Microsoft
The Essential Guide to 64-Bit Server
A Essential Guide by AMD
More

advertisement

GOOGLE LINKS
SPONSORED LINKS
FEATURED LINKS

White Papers

Your remote offices contain valuable electronic data – are they adequately protected? Learn how proven technologies can reliably and cost-effectively back up a branch office from a central location, in real time, to disk or tape, and even utilize existing backup solutions.

Downloads

PacketTrap IT is a comprehensive and affordable network management and application monitoring solution that solves problems associated with bandwidth, network and application performance, and connectivity. Gain insight into your network - try PacketTrapIT free for 21 days!

Web Seminars

IT administrators have to solve a myriad of problems. This web seminar outlines the ten most common systems management pains - including managing highly distributed systems and dealing with data theft/loss – and the best practices to address each.

eLearning Series

We bring the experts direct to you to share their real-world perspective and expertise. During each event, three sessions stream in real time, so you can learn, ask questions, and get solutions.
Upcoming event: Getting the Most with Exchange 2010 with Paul Robichaux

Subscribe to Windows IT Pro!

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.