Date: Tue, 09 Jan 2001 21:39:46 +0000 From: Alexander Derevyanko <der@pc759.cs.msu.su> To: "Lu!s Croker" <unix.megared.net.mx!lcroker@pc759.cs.msu.su> Cc: Francisco Reyes <reyes.somos.net!fran@pc759.cs.msu.su>, Jahanur R Subedar <jjsoft.com!jahanur@pc759.cs.msu.su>, FreeBSD.ORG!freebsd-questions@pc759.cs.msu.su, FreeBSD.ORG!freebsd-isp@pc759.cs.msu.su Subject: Re: How to find the time.... Message-ID: <3A5B8522.EBDB426F@pc759.cs.msu.su> References: <Pine.BSF.4.21.0101081054370.16587-100000@unix.megared.net.mx>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A5B8522.EBDB426F>