From owner-freebsd-isp Mon Jan 8 9: 1:53 2001 Delivered-To: freebsd-isp@freebsd.org Received: from unix.megared.net.mx (megamail.megared.com.mx [200.52.207.52]) by hub.freebsd.org (Postfix) with ESMTP id 45DFF37B400; Mon, 8 Jan 2001 09:01:33 -0800 (PST) Received: from localhost (lcroker@localhost) by unix.megared.net.mx (8.11.0/8.11.0) with ESMTP id f08Gwvs24099; Mon, 8 Jan 2001 10:58:57 -0600 (CST) (envelope-from lcroker@unix.megared.net.mx) Date: Mon, 8 Jan 2001 10:58:57 -0600 (CST) From: Lu!s Croker To: Francisco Reyes Cc: Jahanur R Subedar , freebsd-questions@FreeBSD.ORG, freebsd-isp@FreeBSD.ORG Subject: Re: How to find the time.... In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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-isp" in the body of the message