在Windows 10上是否有类似于"C:\Windows\System32\Taskmgr.exe“的开源项目?
该特性包括系统进程和它们正在使用的资源的列表,以及系统资源占用的实时统计,例如CPU/磁盘IO/网络IO/内存。
在这方面似乎没有足够的特性来代替构建的开源项目。
如果它是一个库来获取上面的系统信息,我们可以在此基础上开发UI/工具。
发布于 2019-03-27 18:27:44
达芙妮是一个在脑海中浮现的http://www.drk.com.ar/daphne.php
Daphne是一个用于杀死、控制和调试Windows进程的小型(系统托盘)应用程序。它的诞生是为了扼杀Windows进程,并几乎成为任务管理器的替代品。您可以通过将鼠标拖动到窗口上,右键单击主进程列表中的进程,或者使用“按名称杀死所有进程”命令键入进程名称来终止进程。您可以将任何窗口设置为始终处于顶部、透明、启用等等。
源代码可以在这里找到,http://www.drk.com.ar/daphne.php#Contribute和许可是GNU通用公共许可证。

发布于 2019-08-25 07:40:27
这是我必修的python答案:
有一个名为psutil的python库,它允许您从命令行或REPL对正在运行的进程进行完整的编程访问,以及更多的访问。
In [1]: import psutil
In [2]: proc = psutil.Process()
In [3]: pd = proc.as_dict()
In [4]: pd.keys()
Out[4]: dict_keys(['cmdline', 'memory_full_info', 'num_threads', 'username', 'name', 'num_handles', 'open_files', 'memory_percent', 'pid', 'create_time', 'memory_maps', 'connections', 'exe', 'nice', 'cpu_times', 'environ', 'ionice', 'cwd', 'io_counters', 'cpu_percent', 'num_ctx_switches', 'threads', 'cpu_affinity', 'memory_info', 'ppid', 'status'])
In [5]: proc.exe()
Out[5]: 'C:\\python36_64\\python.exe'
In [6]: proc.memory_full_info()
Out[6]: pfullmem(rss=71438336, vms=61792256, num_page_faults=36033, peak_wset=71516160, wset=71438336, peak_paged_pool=190608, paged_pool=190312, peak_nonpaged_pool=43952, nonpaged_pool=41648, pagefile=61792256, peak_pagefile=61939712, private=61792256, uss=64483328)它甚至可以处理Windows服务:
In [7]: services = list(psutil.win_service_iter())
In [8]: services
[<WindowsService(name='ABBYY.Licensing.ScreenshotReader.Windows.11.0', display_name='ABBYY Screenshot Reader 11 - Licensing Service') at 1163743151384>,
<WindowsService(name='AJRouter', display_name='AllJoyn Router Service') at 1163743153008>,
<WindowsService(name='ALG', display_name='Application Layer Gateway Service') at 1163743151832>,
<WindowsService(name='AMD External Events Utility', display_name='AMD External Events Utility') at 1163743153904>,
<WindowsService(name='AppIDSvc', display_name='Application Identity') at 1163743152504>,
<WindowsService(name='Appinfo', display_name='Application Information') at 1163743151496>,
<WindowsService(name='AppMgmt', display_name='Application Management') at 1163743152000>,
...................
In [10]: s = services[0]
In [11]: s.name(), s.pid()
Out[11]: ('ABBYY.Licensing.ScreenshotReader.Windows.11.0', 4508)
In [12]: sp = psutil.Process(4508)
In [13]: sp.cpu_percent()
Out[13]: 0.0
In [14]: sp.cmdline()
Out[14]:
['C:\\Program Files (x86)\\Common Files\\ABBYY\\ScreenshotReader\\11.00\\Licensing\\NetworkLicenseServer.exe',
'-service'] https://softwarerecs.stackexchange.com/questions/57155
复制相似问题