Para matar processos que travam



O Service Center pronto para aplicar o Kill


É comum um aplicativo "travar¨, congelando ou recusando-se a obedecer quanto a determinados comandos. Várias podem ser as razões: configuração inadequada no caderno de definições (notebook) do aplicativo, falta de memória RAM, sobrecarga da CPU, saturação da memória de vídeo, travamento do processador pelo chipset de vídeo, corrupção do executável, gravações feitas com clusters cruzados, conflito de interrupção solicitada, invasão de canal DMA ocupado, DLL desatualizada etc etc etc. Quando isso acontece e você verifica que além de congelar o aplicativo acabou travando aparentemente tudo, porque nem dando Ctrl+Esc você consegue controlar as coisas pela Windows List (teoricamente você poderia fechar o tal aplicativo por ali, dando um Close em cima dele), chegou a hora da solução final, o Kill, ou seja, matar o processo. Há três maneiras principais de fazer isso: 1) Pelo Warp Center; 2) Por killers da WPS; e 3) Por killers fora da WPS. O método mais seguro e eficiente é o terceiro.


1) Matando pelo Warp Center - Este é o processo mais fácil, rápido e econômico, porque você utiliza um serviço já existente no seu Warp e não gasta dinheiro nem perde tempo fazendo downloads e registrando programas. Porém, não é sem motivo que fizeram o ditado "o barato sai caro¨: o kill do Warp Center geralmente não funciona. Assim mesmo, é bom você saber como se habilita esse serviço. Basta você ir ao Config.sys e adicionar a seguinte linha:


SET SCKILLFEATUREENABLED=ON

Feito isso e reiniciada a máquina, você já pode ir ao botão com janelinhas do Warp Center e clicar com o mouse, segurando a tecla Ctrl: será mostrada uma tira com a relação dos processos em andamento no sistema. Aí, sabendo o nome do processo relativo ao aplicativo que travou (às vezes o aplicativo tem uma nome de fantasia e o seu verdadeiro nome, o do processo, é outro bem diferente, nada intuitivo) você clica no processo e receberá uma caixa com pedido de confirmação do kill sobre o processo; você confirma e pronto! Se funcionar, funcionou, você está de parabens (mas não conte com isso, para não se desiludir).



2) Matando pela WPS - Existem vários aplicativos(e até gerenciadores de arquivos, como o FM2) que se propõem a executar o kill process diretamente na WPS com mais eficiência do que o Warp Center, e alguns realmente funcionam. Mas apenas em casos de "travadas" mais leves, menos complicadas. os mais conhecidos são:

Watch Cat, dos programadores alemães Felix von Normann e Thomas Opheys, que está na versão 2.1, de 1995. Esse aplicativo é um dos melhores. Cria um objeto Gato no seu desktop, que ao ser clicado abre as disponibilidades de controle e kill dos processos pela WPS. Mas o melhor do Watch Cat é que ele trabalha (principalmente e muito bem!) na linha de comando, com apresentação gráfica (tipo Norton) e por ali é muito difícil ele falhar se você souber fazer a coisa certa, mas às vezes falha. O Watch Cat, em caso de emergência, pode ser acessado por mecanismos de acesso que o próprio usuário define quando da instalação, através do teclado, por uma porta serial e até pelo joystick. O Watch Cat é usado pelo PC que faz a manutenção deste Site. Pode ser puxado na BMT Micro e seu registro custa U$ 27. Há opções de desconto, conforme a quantidade, além de disponibilidade de manual impresso e conector de hardware para o acionamento. Veja:

WatchCat 2.1 Prices - only for U.S.A. and non-European countries - 5/95

price
Item Pieces p/pce You get
----------------------------------------------------------------------
Registered version 1 $ 27 WatchCat 2.1 registered
2 $ 24 to you, one standard
3 - 9 $ 20 license, update quarantee
10 - 49 $ 19 and a program disk.
50 - 99 $ 16
100 - 499 $ 12
500 + $ 8
----------------------------------------------------------------------
1st Aid Package 1 $ 62 WatchCat 2.1 registered
2 $ 59 to you, license, update
3 - 5 $ 54 guarantee, program disk,
6 + $ 50 support, printed manual,
hardware connector
----------------------------------------------------------------------
Printed manual 1 $ 13 Bound and printed manual
2 + $ 12 with superior quality.
----------------------------------------------------------------------
Hardware connector 1 $ 27 Ready built hardware
2 $ 24 connector in a housing.
3 + $ 22
----------------------------------------------------------------------
Update message eMail free We immediately tell you
FAX $ 3 when a new version of
letter $ 2 WatchCat is available.
phone $ 10
----------------------------------------------------------------------




O Osrm2 Light Resource Monitor, da C.O.L. Systems Inc, que esrtá na versão 3.0, de 1995 e pode ser adquirido pelo BBS do Pete Norloff (não há versão de demonstração: você dá telnet, paga com cartão internacional (U$59.00) e leva na hora. Vale a pena). Além de executar o kill pela PM, o Osrm2 oferece uma série de utilitários monitoradores. É um pacote realmente muito útil. Aqui vai um apanhado geral sobre o que ele faz:

The Osrm2(tm) Lite Performance Monitor with Multi-User Performance Interface (MUPI) is a kernel level, real time, performance monitoring and management tool for system and application resource usage under OS/2 2.x, OS/2 SMP, and OS/2 Warp. Including a configurable sample rate, performance threshold setting and alarms, working set, thread detail
display, kill process options, as well as real time graphical indicators and long term data logging for post processing analysis, the Osrm2(tm) Lite Performance Monitor provides the most comprehensive monitoring tool for OS/2 2.x systems.

In addition to the main monitor, Osrm2(tm) Lite includes three powerful new system measurement and reporting utilities designed to provide detailed insight into system resource activity through intensive monitoring and data logging. The Osrm2(tm) Tools include:

AppMon for detailed application Process and Thread monitor and logging
FileMon for detail level file and disk monitor and logging CacheMon for detail level cache and memory monitor and logging

Unlike other monitors, the Osrm2(tm) Lite Performance Monitor, Osrm2 AppMon, Osrm2 FileMon, and Osrm2 CacheMon utilities work with information retrieved directly from the OS/2 kernel. This is a superior, less intrusive, and less resource consumptive method of collection compared to other performance monitoring products.

A comprehensive logging capability is available that writes performance data records to a binary log file from the main monitor as well as the three Osrm2(tm) Tools utilities. Osrm2(tm) Lite includes an OS/2 REXX extension DLL supplying new REXX functions to allow you to process the log file output using the standard OS/2 REXX language. By creating an output log,
users can use the Osrm2(tm) Lite REXX functions to develop an unlimited number of performance analysis and capacity planning applications to report on the OS/2 resource measurements and metrics.

Osrm2(tm) Lite also provides a threshold detection facility that allows you to specify various performance related threshold criteria that can be detected by Osrm2(tm) Lite and automatically alert you of problems at your workstation.

The product was designed to provide the hobbyist, small business owner, developer, corporate user, and network OS/2 analyst with informative performance and resource usage displays and reporting capability.

C.O.L. Systems Inc. has been in the business of providing practical OS/2 systems performance monitoring and management software since 1989.




Process Commander - Este é considerado o melhor de todos, e também o mais caro (U$64,99 ), com a desvantagem de não poder ser baixado por download. Você tem de comprar e esperar a remessa pelo correio. É produzido pela Stardock e você pode adquiri-lo na BMT Micro.
Aqui, uma descrição do que o Process Commander faz:

Process Commander is a software package developed for OS/2 Warp to improve system stability, manage processes and monitor system activities. Process Commander is a set of programs that allow
users to manage their tasks, reliably recover from "system hangs",
administer systems remotely, and develop custom system
management programs using Process Commander's command line
utilities and enhanced keyboard driver. All this along with a setting to
alternatve between "end user" mode and "advanced user mode"
making Process Commander easy to use for every day users as well
as an extremely powerful tool for the technical adept. Process
Commander provides a set of PM and command line utilities that are
useful for every OS/2 user.

Process Commander requires Warp 3.0 or higher, 8 megs of RAM, a
486sx or higher processor and 4 MB of disk space. Process Commander contains the following components: Process Commander PM
An easy to use process management tool that allows users
(both novice and experienced) to manage their OS/2 resources
at great detail (from shared memory to thread priority to
semaphores). Has a dynamic interface for end users as well as
experts.
Process Commander Server
A new server which mode can telnet from any computer and
even any operating system into Process Commander and kill,
shutdown, reboot and in fact do everything you set it up to do.
Second, all of the Power Tools below automatically work
remotely (the accept a host name), so that you not only can list
processes locally with "ps" but also remotely by calling "ps
hostname:".
Process Commander Power Tools (command line tools)
A complete set of command line tools that offer all of the
power of Process Commander including programs to kill,
suspend and resume programs or modify their priority.
Enhanced Keyboard
This offers the ability to lock the system from the keyboard,
and re-map special keys such as the Windows 95 key. We also
plan to enable users to remap any key to any other key. For
example, remap the Shift and the Ctrl key (swap them).
Process Commander Full Screen
A full screen version of Process Commander PM. If your
system hangs, you simply hit Ctrl+Alt+Del (you can remap
this) and Process Commander Full Screen comes up. From
here, you can shut down your system, kill a process, go to a
command line shell, etc.
The Enhanced Shutdown
The Enhanced shutdown of Process Commander provides a
quicker way to shutdown the system. The Enhanced
Shutdown also provides a Shutdown Folder. The Enhanced
Shutdown is integrated directly into the OS/2 Workplace.



Service Center - Este é um pacote grátis (eu disse grátis!) que pode ser puxado no Super Site (é o arquivo SERVCENT.ZIP, que tem, 697k). O freeware é de autoria do programador Martin Farrent (http://ourworld.compuserve.com/homepages/mgfarrent) e está na versão 3.0, de 1996. A ilustração desta dica é o Service Center em ação no PC do @Macarlo. Segue-se uma descrição do pacote, pelo autor:


'Service Center' is a freeware utility suite for OS/2. It contains a system information tool, a process killer, a front end for McAfee's OS2SCAN, a class/ini purger, a tool to create program objects, a button to backup and edit your config.sys and a scheduler to run programs automatically.


This package contains 16 files:
- service.exe
- install.exe
- scanpan.exe
- purger.exe
- prockill.exe
- objwiz.exe
- schedule.exe
- mem.exe
- rxextras.dll
- service.hlp
- scanpan.hlp
- purger.hlp
- prockill.hlp
- schedule.hlp
- service.ico
- readme.1st (this file)



'Service Center 3.0' is freeware. You may copy and redistribute it free of charge as long as you do not sell the program or change any of the files included in the package. If you redistribute this program you must include all 16 files named above. If you wish to include 'Service Center ' on a shareware CD or floppy you are free to do so, provided you do not charge for the program itself. In this case, I'd appreciate notification (see my Compuserve address given below).

Requirements:
ReXX must be installed on your machine (if you're using Warp, this is most probably already the case). I've only tested the program with OS/2 Warp 3.0, but I know that some features won't perform with earlier versions of OS/2. I don't anticipate problems with 4.0 - but I haven't been able to test this yet.

Installation:

Unzip the 16 'Service Center' files into a temporary directory (folder) of their own and run install.exe. Or install straight from a disk. A program object will be created on your desktop during installation.

Improvements in 3.0:
'Service Center' is no longer mainly a front end for external tools, but has progressed to a suite of integrated utilities. The exception is the virus scanning facility, which consists of a graphical control panel for McAfee's OS2SCAN.EXE. The virus scanner itself is not provided in this package.

The future:
I plan to make new functions available as add ons, which I shall only upload to my website, no longer to any other online sites. From there, users will be able to download them and install them in Service Center's MoreApps folder. So check this site out every now and again. Later, the add ins will be fully integrated into new versions of the program. These will be available at my web site and in Compuserve's OS2BVEN - and wherever else people care to put them.


I'd greatly appreciate any comments you have on 'Service Center 3.0'. Please mail them to my Compuserve address:

100045,1712

or visit my website: http://ourworld.compuserve.com/homepages/mgfarrent





3) Matando pela linha de comando - Este, como já foi dito, é o método mais seguro porque este tipo de aplicativo, destinado a dar o kill, terá de sempre de entrar em modo texto para poder se livrar da Single Input Queue do OS/2. Os que fazem esse servico (WatchCat, Process Commander e Control-Alt-Del Commander) utilizam a interface em modo texto tela cheia. O Control-Alt-Del Commander está na versão 2.0, custa U$36,99 para compra por RIP (paga com cartão internacional, em cinco minutos recebe um e-mail com um endereço e a chave para fazer o download). Segue-se uma pequena descrição do aplicativo:

Ctrl-Alt-Del Commander (CAD Commander) takes control of the boot services of an OS/2 Warp system and prevents accidental rebooting of OS/2 from within any type of OS/2, DOS, or Windows session. In addition, it also allows "rebooting" of the Workplace Shell without stopping any running applications. Finally, it gives complete command over all applications' status (including their priorities), and allows selective shutdown of errant applications which cannot normally be shutdown via OS/2's Ctrl-ESC key sequence.