Greetings, all,

I'd like to request any hints anyone might have on how we can monitor user interactions with the command shell (yes, both Unix and Windows) for certain Hackystat applications.

For example, in the HPC domain, many environments require the programmer to execute commands in a shell to build, execute, and debug their programs. To understand the process of HPC development, it would be extremely useful if we could provide a Hackystat sensor that would capture the commands invoked, the time at which they were invoked, and their return values/data. This would significantly improve our ability to create a model of what developers do (when are they running the code in a serial manner vs. a parallel manner, what are the results of execution, etc.) While this sounds quite Big Brotherish (and, of course, it is), please note that the user would maintain control over whether such logging is enabled.

We've already implemented the obvious approach for Unix, which is to leverage the .history file. In most cases, this is a very easy way to log the commands that were entered and the time at which they were entered. There are two problems with this solution: (1) Windows doesn't implement the history mechanism, and (2) it doesn't provide us with the return value/output from the command.

I've done a bunch of googling today and have not had any success, other than to be reminded that the Lisp community, as usual, solved this problem around 25 years ago (with the "dribble" command). AFAIK, doesn't appear to be any ready-made hooks in either the Windows or Unix environment to allow a shell to be extended to capture commands after they are entered and the results as they are printed out.

So, my questions are:

(1) Does anyone have any pointers to ideas on how to address this that doesn't require us to pursue (2)?

(2) So, let's say we were going to produce our own custom Unix shell with such logging facilities.
   (a) Are we crazy?
   (b) Couldn't this be some kind of simple wrapper over the user's current 
shell?
(c) Is there some kind of open source command-loop processor we can use to implement this?
   (d) What else should we be aware of from your experience?

(3) Any equivalent insights for Windows?

Cheers,
Philip




Reply via email to