From owner-freebsd-questions@FreeBSD.ORG Thu Nov 17 09:32:35 2005 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 061D516A41F for ; Thu, 17 Nov 2005 09:32:35 +0000 (GMT) (envelope-from i.tanusheff@procreditbank.bg) Received: from mail.procreditbank.bg (mail.procreditbank.bg [212.95.179.198]) by mx1.FreeBSD.org (Postfix) with SMTP id D9AE943D45 for ; Thu, 17 Nov 2005 09:32:33 +0000 (GMT) (envelope-from i.tanusheff@procreditbank.bg) Received: (qmail 38586 invoked from network); 17 Nov 2005 11:32:32 +0200 Received: from unknown (HELO localhost) (127.0.0.1) by localhost with SMTP; 17 Nov 2005 11:32:32 +0200 Received: from proxy.procreditbank.bg ([127.0.0.1]) by localhost (mail.procreditbank.bg [127.0.0.1]) (amavisd-new, port 10024) with SMTP id 99127-613 for ; Thu, 17 Nov 2005 11:32:31 +0200 (EET) Received: (qmail 38553 invoked from network); 17 Nov 2005 09:32:31 -0000 Received: from unknown (HELO outmail.procreditbank.bg) (172.16.248.123) by mail.procreditbank.bg with SMTP; 17 Nov 2005 09:32:31 -0000 In-Reply-To: <200511161611.06437.db@traceroute.dk> To: db MIME-Version: 1.0 X-Mailer: Lotus Notes Release 6.5.1 January 21, 2004 From: Ivailo Tanusheff Message-ID: Date: Thu, 17 Nov 2005 11:32:31 +0200 X-MIMETrack: Serialize by Router on DOMINO_HQ/PROCREDITBANK(Release 6.5.1|January 21, 2004) at 11/17/2005 11:32:29 AM, Serialize complete at 11/17/2005 11:32:29 AM X-Virus-Scanned: by amavisd-new using ClamAV at procreditbank.bg Content-Type: text/plain; charset="US-ASCII" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: questions@freebsd.org Subject: Re: Monitoring a program X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Nov 2005 09:32:35 -0000 You can take a snapshot of files being used by lsof: Port: lsof-4.76.1.1 Path: /usr/ports/sysutils/lsof Info: Lists information about open files (similar to fstat(1)) Maint: obrien@FreeBSD.org B-deps: R-deps: WWW: http://people.freebsd.org/~abe/ Hope this will help you :) Ivailo Tanusheff Senior System administrator ProCredit Bank (Bulgaria) AD db Sent by: owner-freebsd-questions@freebsd.org 11/16/2005 06:11 PM To questions@freebsd.org cc Subject Monitoring a program Hi all I would like to know what files a program access during it's life time (and maybe also the internet connections it makes), how should I do this? I have considered fstat, find, ktrace and searching the source or binary for path strings, but I guess I need a hook for open(). I'm running 5.4 on a ia32, but if there is a 6.x only program it is also welcome. Best regards db _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"