From owner-freebsd-questions Tue Nov 28 8:42:14 2000 Delivered-To: freebsd-questions@freebsd.org Received: from ns1.hutchtel.net (ns1.hutchtel.net [206.9.112.100]) by hub.freebsd.org (Postfix) with ESMTP id 0AA0337B402 for ; Tue, 28 Nov 2000 08:42:11 -0800 (PST) Received: from mark8 (hutch-978.hutchtel.net [209.105.45.78]) by ns1.hutchtel.net (8.9.1/8.9.0) with SMTP id KAA25739; Tue, 28 Nov 2000 10:42:04 -0600 (CST) Message-ID: <00b301c0595a$ba2b4320$0200000a@vladsempire.net> From: "Josh Paetzel" To: "Benjamin Close" , References: Subject: Re: Where to put 'top' in the init scripts Date: Tue, 28 Nov 2000 10:43:37 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG ----- Original Message ----- From: "Benjamin Close" To: Sent: Tuesday, November 28, 2000 6:52 AM Subject: Where to put 'top' in the init scripts > Hiall, > As part of my prefered setup I like to have top running on a > console when I boot my home pc. However, my attempts to get this task to > happen have been invain. I tried to convince init to run it via an entry > in /etc/ttys without success ( It would run but not display on the correct > console, or init would respawn on the selected console too fast ). > > Next I tried a script in /usr/local/etc/rc.d which looks like: > #!/bin/sh > /usr/bin/top < /dev/ttyvb > /dev/ttyvb & > echo -n " top" > > Whilst " top" is echoed, the top process seems to be killed by the time I > get to log in. > > I believe I can put it in /etc/rc.local but would prefer to avoid this and > get the init script in /usr/local/etc/rc.d/ to run it. I'm at a loss why > it is killed/terminated. I know the process started as I've checked it's > return value. But why doesn't it run? > > Cheers, > Benjamin > > I don't know of any good answers to your question, but here is a solution that would probably work....even if it is ineligant. You could write a shell script to see if top is running and then start top if it is not....then add that as a cron job that runs every minute or so. Josh > > > 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