NT Task Manager

lqlq 2000-04-13 07:59:00
NT的Task Manager可以检测到某个Application 是否Hang,(Not Responding or Running).
我自己该怎样利用VC++,包括Microsoft的API 来检测一个Application是否Hang?就象Task Manager一样?
...全文
77 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复
Remote Task Manager: readme ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Please read this file carefully (especially the "Installation" chapter) before installing the program to your computer. IMPORTANT! If you obtained RTM not from our web page, but from another source (CD or a software library), please visit our home page where you might find a later version. Contents ~~~~~~~~ Program information Company information Description Installation (!) Registration Copyright and license Technical support Program information ~~~~~~~~~~~~~~~~~~~ Program Archive Name: rtm.zip Program Name: Remote Task Manager Program Version: 3.8.2 Program Release Date: September 22, 2005 Target OS: Windows NT 4.0, Windows 2000, Windows XP, Windows Server 2003 Platform: Intel x86 Brief Description: The remote manager for tasks, processes, services, devices, shares and events Software type: 30-day trial Company information ~~~~~~~~~~~~~~~~~~~ Company Name: SmartLine Inc Author Name: Ashot Oganesyan Contact E-mail Address: support@protect-me.com Contact WWW URL: http://www.protect-me.com Description ~~~~~~~~~~~ Remote Task Manager (RTM) is a systems control interface that can be run from any remote Windows NT/2000/XP computer. This lets Systems Administrators control most aspects of a remote environment. The simple-to-use, tabbed interface separates applications, services, devices, processes, events, shared resources and performance monitor, making each of these very easy to manage. With RTM you can: - Monitor all running tasks, processes, services, devices, shared resources and events on remote computers - Watch features of running tasks (the handle of the main window, process ID, etc.) - Watch features of running processes (process ID, CPU time, privileges used, memory, priority, etc.) - See which process is associated with a selected task - See which process is associated with a selected service - End a selected task correctly - Terminate a selected process at any time - Change priority of a selected process - Control which CPUs the process will be allowed to execute on - Stop, start, restart, pause and continue any selected service or device - Change startup parameters of a service or a device (name, account, startup type, dependencies, etc.) - Change service's repair parameters on Windows 2000/XP - Watch dependent services or devices - Adjust service's and device's security (permissions, auditing and owner) - Clear event logs - Archive event logs - Monitor a dynamic overview of the computer's performance (CPU and memory usage) - Manage shared resources on remote computers - Monitor all open TCP and UDP ports - Shut down and reboot remote computers - Create processes on remote computers - Lock computers remotely - And much more Installation ~~~~~~~~~~~~ To install RTM you MUST have administrative privileges. Run "setup.exe". You'll need to select the target directory for the install. If you wish to install RTM without an user intervention you should run RTM Setup with the /s parameter (e.g. "c:\setup.exe /s"). This gives an install that can be used from within a batch file. There is a special configuration file for silent setup: rtm.ini. With this file, you can customize the RTM installation parameters. For example: 1. "Install" parameters: Service - RTM Service and its related files will be installed Manager - RTM Manager and its related files will be installed Documents - documentation (readme.txt, register.txt) will be installed To specify a destination directory for RTM, you can supply the parameter InstallDir If you have the registration key-file for RTM, you can specify a directory with this file in the parameter RegFileDir 2. "Misc" parameters: Run - this parameter is used to launch an application or execute a batch file after a successful install. Registration ~~~~~~~~~~~~ See "register.txt" file. Copyright and license ~~~~~~~~~~~~~~~~~~~~~ See "license.txt" file. Technical support ~~~~~~~~~~~~~~~~~ See "contacts.txt" file. Copyright(c) 1998-2005 SmartLine Inc. All rights reserved. Remote Task Manager is a registered trademark of SmartLine Inc.
<?php namespace JasonGrimes; class Paginator {     const NUM_PLACEHOLDER = '(:num)';     protected $totalItems;     protected $numPages;     protected $itemsPerPage;     protected $currentPage;     protected $urlPattern;     protected $maxPagesToShow = 10;     protected $previousText = 'Previous';     protected $nextText = 'Next';     /**      * @param int $totalItems The total number of items.      * @param int $itemsPerPage The number of items per page.      * @param int $currentPage The current page number.      * @param string $urlPattern A URL for each page, with (:num) as a placeholder for the page number. Ex. '/foo/page/(:num)'      */     public function __construct($totalItems, $itemsPerPage, $currentPage, $urlPattern = '')     {         $this->totalItems = $totalItems;         $this->itemsPerPage = $itemsPerPage;         $this->currentPage = $currentPage;         $this->urlPattern = $urlPattern;         $this->updateNumPages();     }分页 (pagination),即将一个页面分成两个或两个以上的页面。有一种自动分页机制,可以将移动 Web窗体中的内容分割成一组组较小的页进行呈现,以适合于特定的设备。该机制还呈现可用于浏览到其他页的用户界面元素。无论你的NT服务器的内存有多大,它总是显得不够充足。当物理RAM从低端开始运行时,Windows NT使用了分页文件Pagefile.sys。为了运行不同的进程和应用程序,Pagefile.sys给物理内存分配了一些空间。在这些空间内允许交换数据页。 显然,系统在文件系统缓存中查找数据而不是在驱动器上搜索数据会提高系统的性能。太多的搜索操作会使处理器停顿下来。这就是短语“买更多的内存”成为计算机时代的陈词滥调的原因之一:RAM是你的朋友。管理内存可使你的“朋友”更高效。Windows NT下的Windows Task Manager ([Ctrl][Alt][Delete] | Task Manager)是一个可以为访问内存使用情况提供快捷重要信息的察看工具。考虑物理内存的大小并计算MEM Usage计数器的值,Memory Usage History提供了内存活动的即时情况。把CPU Usage计数器和CPU Usage History与MEM Usage计数器一作比较,就可以简单地得到性能的总的评价。如果你必须决定是否要立刻启动 Diskperf以进一步调查分页过多问题那就非常便利了。 Windows NT的分页文件可以通过Control Panel |System | Performance 标签| Virtual Memory进行管理。在这里,你可以控制分页文件的几个设置(包括大小和区域)。显然,你可以允许系统对它进行处理,但是为了获得最佳配置还是使用Vitual Memory Manager (VMM)为好。Windows NT分页文件的基本原则 Windows NT最初通过在物理RAM的数量上加上12MB以设定开始的分页文件大小。这12MB考虑到在系统故障时分页文件内容可被倾倒到一个日志中以防万一。如果看见了“停止”框和接着出现蓝屏死机,你就在操作中遇上了这个问题。如果开始的分页文件的大小小于这个数(物理RAM的数量上加上12MB),就会开始收到Running Out Of Memory消息。 Windows NT操作系统和其应用程序使用了大约10MB的RAM。所以,应该从物理RAM的数量上减去这个值。这会给你充分的回旋余地决定你的服务器的内存要求。 Windows NT要求分页文件的最小值为2MB。如果分页文件太小或者根本不存在,启动时就会出现警告消息。应该总是遵循RAM的最小值 12的规则。在任何情况下,分页文件都不能比服务器中的RAM的大小小。如果系统有32 MB的物理RAM,加上12MB后分页文件总的大小就是44MB。显然,分页文件越大越好。意思是增加对物理RAM的投资,而不是简单地增加分页文件的大小。如果没有足够的RAM,驱动器就会花太多的时间对分页文件进行读写。这只会降低服务器的速度,如果不得不重启服务器来清除I/O请求,甚至会导致服务器不能工作。而如果因为这个原因需要重启机器,那么可能就会有第二次。 默认的12MB RAM足以在必要时把分页文件的内容清除。小的分页文件限制了可以存储的内容并且可能耗完为应用程序保留的虚拟内存。如果RAM不足,就会有更多的分页,这反过来为驱动器增加了额外的负担,从而降低了系统的响应速度。在这样的情况下,Windows NT要求分页文件的最小值等于除了系统启动时1MB虚拟内存之外的物理RAM的大小,以便能够把调试信息写到一个文件上。 如前所述,分页文件的最大值和最小值在Virtual Memory对话框中指定。根据应用程序,分页文件会增大和缩小。当系统运行着时,不能压缩或维护分页文件。但是,使用各种第三方软件包如Diskeeper可对分页文件进行维护。

6,849

社区成员

发帖
与我相关
我的任务
社区描述
Windows 2016/2012/2008/2003/2000/NT
社区管理员
  • Windows Server社区
  • qishine
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧