跟踪使用过的应用程序
我最近一直在使用Wakoopa,我发现它很有趣。
我不知道(好吧,我有一个想法,但从未得到过关于它的真实数据)我在SO上花了多少时间,直到这个:
alt text http://img396.imageshack.us/img396/4699/wakoopaim1.png
所以我的编程问题是:
如何以编程方式跟踪正在使用的应用程序?
我最初的想法是使用“tasklist”命令和“netstat”之类的命令,并每 15 分钟进行一次池化或类似的操作,但我不认为这是这样的这就是他们这样做的方式。
.NET 中是否有一个库(我猜是 C# 中的)可以执行此操作? Windows 是否提供类似的服务? 那么java呢?
我通常至少对如何执行某些编程任务有一些模糊的想法,但对此我没有任何线索。
wakoopa 应用程序跟踪器也适用于 OSX 和 Linux,但我很清楚它们是三个不同的应用程序,每个平台一个应用程序
,顺便说一句,您使用了多少? :)
I've been using Wakoopa recently, and I find it quite amusing.
I had no idea ( well I had an idea but never got real data about it ) on how much time I spend in SO until this:
alt text http://img396.imageshack.us/img396/4699/wakoopaim1.png
So my programming question is:
How can I programmatically track the applications being used?
My initial though was to use something like "tasklist" command and "netstat" and pool every 15 minutes or something like that, but I don't think this is the way they're doing this.
Is there a library in .NET ( in C# I guess ) to do this? Does windows provides some kind of service like this? What about java?
I usually have at least some vague idea on how some programming task could be performed, but for this I don't have a clue.
The wakoopa app tracker works on OSX and Linux too, but it is clear to me they are three different apps, one per platform
BTW, how much do you used SO? :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
以下是一篇文章的链接,其来源涵盖了 Process Structure Routines API 检测 Windows NT/2K流程执行。 我认为 SysInternals 站点有 Process Monitor 的源代码,但我没有看到任何源代码。 本文应该为您指明 Windows 系统的正确方向。
这是一个对 Linux 系统可能有帮助的链接 PROCPS
这是一个 java swing top 实用程序的链接 < a href="http://www.cc.gatech.edu/~yannis/j-orchestra/example_proc_mon.html" rel="nofollow noreferrer">Monitor 它使用 JNI,所以不确定它是否真的适合作为一个java解决方案。
为了回答这个问题,我只是定期访问该网站。 我发现如果我经常去的话,我会花太多时间在上面。
Here is a link to an article with source covering the Process Structure Routines API Detecting Windows NT/2K process execution. I thought that the SysInternals site had source to Process Monitor, but I don't see any. The article should point you in the right direction for Windows systems.
Here is a link that may be helpful for Linux systems PROCPS
Here is a link to a java swing top utility Monitor It uses JNI, so not sure if it really fits as a java solution.
And to answer the SO question, I only periodically visit the site. I find I spend too much time on it if I visit regularly.
熟悉 Visual Studio 中的服务器资源管理器 -- 查看“流程”下的内容。
然后阅读 PerformanceCounter 类。
Familiarize yourself with the Server Explorer in Visual Studio -- look under 'Process'.
Then read up on the PerformanceCounter class.