tcpdump mailing list archives

Re: SIGINFO on Windows


From: Guy Harris <guy () alum mit edu>
Date: Wed, 7 Jan 2004 14:31:00 -0800


On Jan 7, 2004, at 2:07 PM, Gisle Vanem wrote:
To get the same ^T function on Windows would be difficult. I don't think
there are console interrupt keys besides ^C/^Break (correct me if I'm
wrong).

I don't think there are - at least there aren't any that you can catch with SetConsoleCtrlHandler():

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ dllproc/base/setconsolectrlhandler.asp

There are other events that can be delivered to the handler, but they're generated by closing the console window, logging off, or shutting the system down, not by typing at the console.

But, then again, on most UNIXes it'd also be difficult - I don't think any, other than the BSDs (*BSD* and Mac OS X) and, it appears, Tru64 UNIX:

        http://devrsrc1.external.hp.com/STKT/impacts/i110.html

implement VSTATUS or SIGINFO, unless a patch such as

        http://www.cs.tau.ac.il/~didi/ctrl-t/

has been added to Linux (Linux didn't support ^O either?) or other UNIXes have adopted it recently.

 But then ^S would probably be more intuitive (statistics).

^T was originally a TENEXism:

        http://www.linique.com/dlm/tenex/tenex72.txt

"Another terminal interrupt character, control-T  is  serviced  by  the
EXEC.   It  interrupts a user's EXEC process to type out total CPU and
console time used, and status of the process being run under the EXEC."

RFC 339:

        http://www.faqs.org/rfcs/rfc339.html

speaks of it as the "time used query" character". I don't know whether, in TENEX, a program could capture ^T and print its own status information; perhaps that came later, although even that old TENEX document says it causes process status to be reported.

(On most BSDs, if NOKERNINFO isn't set, it causes the system load average, and information on the foreground process group for the terminal (status of an "interesting process" in that group, such as whether it's running or blocked, the program that's running, user and system mode CPU time, and percentage CPU and resident set size), to be printed. That's not implemented in Mac OS X.)

-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:tcpdump-workers-request () tcpdump org?body=unsubscribe


Current thread: