Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Nov 2000 10:43:37 -0600
From:      "Josh Paetzel" <jpaetzel@hutchtel.net>
To:        "Benjamin Close" <linux@senet.com.au>, <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Where to put 'top' in the init scripts
Message-ID:  <00b301c0595a$ba2b4320$0200000a@vladsempire.net>
References:  <Pine.BSF.4.21.0011282310100.741-100000@bytes4u.nodomain.yet>

next in thread | previous in thread | raw e-mail | index | archive | help

----- Original Message -----
From: "Benjamin Close" <linux@senet.com.au>
To: <freebsd-questions@FreeBSD.ORG>
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00b301c0595a$ba2b4320$0200000a>