From owner-freebsd-isp Tue Jan 9 14:43: 9 2001 Delivered-To: freebsd-isp@freebsd.org Received: from pc759.cs.msu.su (pc759.cs.msu.su [158.250.10.223]) by hub.freebsd.org (Postfix) with ESMTP id AD18637B400; Tue, 9 Jan 2001 14:42:47 -0800 (PST) Received: from pc759.cs.msu.su (uucp@localhost) by pc759.cs.msu.su (8.9.3/8.9.3) with UUCP id BAA52469; Wed, 10 Jan 2001 01:59:07 +0300 (MSK) (envelope-from der@pc759.cs.msu.su) Received: from pc759.cs.msu.su (megagame.my.home [10.0.1.5]) by gateway.my.home (8.8.8/8.8.8) with ESMTP id VAA28047; Tue, 9 Jan 2001 21:31:42 +0300 (MSK) (envelope-from der@pc759.cs.msu.su) Message-ID: <3A5B8522.EBDB426F@pc759.cs.msu.su> Date: Tue, 09 Jan 2001 21:39:46 +0000 From: Alexander Derevyanko X-Mailer: Mozilla 4.72 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 To: "Lu!s Croker" Cc: Francisco Reyes , Jahanur R Subedar , FreeBSD.ORG!freebsd-questions@pc759.cs.msu.su, FreeBSD.ORG!freebsd-isp@pc759.cs.msu.su Subject: Re: How to find the time.... References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org You can enable "lastcomm". See accton(?). "Lu!s Croker" wrote: > > You can put set the command in a script.... for example... > > #!/bin/sh > > echo "X command Logs" >/var/log/xcommand.log > date >>/var/log/xcommand.log #Log the date and time in a file > time >>/var/log/xcommand.log > > xcommand > > date >>/var/log/xcommand.log #Log again the time and date, when the > time >>/var/log/xcommand.log #command finish > > If you log the initial time and the final time, you can know the time > that the command was in execution... > > Greetings... > > > On Mon, 8 Jan 2001, Francisco Reyes wrote: > > > On Sun, 31 Dec 2000, Jahanur R Subedar wrote: > > > > > I am trying to find the time of when a particular command was executed. > > > > What command? Unless the program has some type of loging I don't believe > > there are logs to indicate when apps are run. > > Will you continue to need this? > > A possible solution, unless someone suggests something better, would be to > > run a cron job which does ps and sends the output to a log. > > > > You could use newsyslog to keep it under control (i.e. don't let it get > > too big). > > > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > with "unsubscribe freebsd-questions" in the body of the message > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message