From owner-freebsd-hackers Fri Jul 3 07:18:58 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA04030 for freebsd-hackers-outgoing; Fri, 3 Jul 1998 07:18:58 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA04024 for ; Fri, 3 Jul 1998 07:18:57 -0700 (PDT) (envelope-from joelh@gnu.org) Received: from mail.camalott.com (root@[208.203.140.2]) by freefall.freebsd.org (8.8.8/8.8.5) with ESMTP id HAA23772 for ; Fri, 3 Jul 1998 07:17:35 -0700 (PDT) Received: from detlev.UUCP (tex-113.camalott.com [208.229.74.113]) by mail.camalott.com (8.8.7/8.8.5) with ESMTP id JAA12738; Fri, 3 Jul 1998 09:19:03 -0500 Received: (from joelh@localhost) by detlev.UUCP (8.8.8/8.8.8) id JAA10403; Fri, 3 Jul 1998 09:19:02 -0500 (CDT) (envelope-from joelh) Date: Fri, 3 Jul 1998 09:19:02 -0500 (CDT) Message-Id: <199807031419.JAA10403@detlev.UUCP> To: kuku@gilberto.physik.RWTH-Aachen.DE CC: marc@bowtie.nl, kuku@gilberto.physik.RWTH-Aachen.DE, freebsd-hackers@freefall.cdrom.com In-reply-to: <19980703141950.02992@gil.physik.rwth-aachen.de> (message from Christoph Kukulies on Fri, 3 Jul 1998 14:19:50 +0200) Subject: Re: trace/KTRACE From: Joel Ray Holveck Reply-to: joelh@gnu.org References: <199807030924.LAA20365@gilberto.physik.RWTH-Aachen.DE> <199807031209.OAA24029@bowtie.nl> <19980703141950.02992@gil.physik.rwth-aachen.de> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >>> I would like to find out where an application 'hangs' for >>> some overly long time (possibly a network/socket call or something) >>> Or are there any other ways (other than profiling, which is also an a >>> posteriori method) to 'watch' what an app does? >> Can't you use gdb and attach to the running process? >> gdb 'progname' 'pid' > And then? How would I see what the program is doing? ^C-ing is > not what I wish. > I believe the mentioned 'truss' seems to do what I want. When gdb attaches to a process, it halts it. You can then do a backtrace to find what's going on. Happy hacking, joelh -- Joel Ray Holveck - joelh@gnu.org - http://www.wp.com/piquan Fourth law of programming: Anything that can go wrong wi sendmail: segmentation violation - core dumped To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message