Date: Sat, 14 Sep 2013 23:38:43 -0700 (PDT) From: Bill Tillman <btillman99@yahoo.com> To: "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org> Subject: Re: Diskless question Message-ID: <1379227123.52657.YahooMailNeo@web165004.mail.bf1.yahoo.com> In-Reply-To: <523490C0.9060609@bananmonarki.se> References: <201309140905.r8E955xE062761@fire.js.berklix.net> <523467A5.6020902@bananmonarki.se> <523490C0.9060609@bananmonarki.se>
next in thread | previous in thread | raw e-mail | index | archive | help
=0A=0A=0A=0A________________________________=0A From: Bernt Hansson <bah@ba= nanmonarki.se>=0ATo: Bernt Hansson <bah@bananmonarki.se> =0ACc: Julian H. S= tacey <jhs@berklix.com>; freebsd-questions@freebsd.org =0ASent: Saturday, S= eptember 14, 2013 12:37 PM=0ASubject: Re: Diskless question=0A =0A=0AOn 201= 3-09-14 15:41, Bernt Hansson wrote:=0A> On 2013-09-14 11:05, Julian H. Stac= ey wrote:=0A>> Hi, Reference:=0A>>> From:=A0=A0=A0 =A0=A0=A0 Bernt Hansson = <bah@bananmonarki.se>=0A>>> Date:=A0=A0=A0 =A0=A0=A0 Sat, 14 Sep 2013 09:36= :58 +0200=0A>>=0A>> Bernt Hansson wrote:=0A>>> Hello list!=0A>>>=0A>>> I ha= ve a setup with a diskless machine and working, but I can not log in=0A>>> = as root on the diskless. How to proceed?=0A>>=0A>> Log in as non root & see= what /var/log shows=0A>> Mount the media elsewhere then either=0A>> =A0=A0= =A0 give a good look at what might be wrong,=0A>> =A0=A0=A0 relax some rest= rictive permissions=0A>> =A0=A0=A0 create some temporary back doors.=0A>> = =A0=A0=A0 rlogin, ssh, no or simple password on toor etc=0A>>=0A>> Cheers,= =0A>> Julian=0A>=0A> I solved it. Root did not have a password as strange a= s it may be.=0A=0AUnsolved. Root do not have a password, pressing enter at = the passwd =0Aprompt gives "sorry"=0A______________________________________= _________=0Afreebsd-questions@freebsd.org mailing list=0Ahttp://lists.freeb= sd.org/mailman/listinfo/freebsd-questions=0ATo unsubscribe, send any mail t= o "freebsd-questions-unsubscribe@freebsd.org"=0A=0A=0A=0AIt's been a long t= ime since I did this but there was some command for passwd for root which I= had to do as well. The initial diskless boot will login you in with root w= ithout a password as I recall. Aha, here it is...=0A=0Acd /etc=0Acp passwd = master.passwd /pxeroot/conf/default/etc/=0Acd /pxeroot/etc=0Apwd_mkdb -d /p= xeroot/etc master.passwd=0A=0AYou may need to adjust this based on your set= up. I found lots of good info on diskless booting at this site:=0A=0Ahttp:/= /www.nber.org/sys-admin/FreeBSD-diskless.html From owner-freebsd-questions@FreeBSD.ORG Sun Sep 15 06:47:23 2013 Return-Path: <owner-freebsd-questions@FreeBSD.ORG> Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 13A1EF01 for <freebsd-questions@freebsd.org>; Sun, 15 Sep 2013 06:47:23 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CC37D21A1 for <freebsd-questions@freebsd.org>; Sun, 15 Sep 2013 06:47:22 +0000 (UTC) Received: from r56.edvax.de (port-92-195-74-65.dynamic.qsc.de [92.195.74.65]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx02.qsc.de (Postfix) with ESMTPS id EB14D278DD; Sun, 15 Sep 2013 08:47:13 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id r8F6l55d003879; Sun, 15 Sep 2013 08:47:05 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Sun, 15 Sep 2013 08:47:05 +0200 From: Polytropon <freebsd@edvax.de> To: Gary Kline <kline@thought.org> Subject: Re: howto kill x if x is running? Message-Id: <20130915084705.d41b6141.freebsd@edvax.de> In-Reply-To: <20130915062046.GA12535@ethic.thought.org> References: <20130915062046.GA12535@ethic.thought.org> Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: FreeBSD Mailing List <freebsd-questions@freebsd.org> X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Polytropon <freebsd@edvax.de> List-Id: User questions <freebsd-questions.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-questions>, <mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions> List-Post: <mailto:freebsd-questions@freebsd.org> List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-questions>, <mailto:freebsd-questions-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 15 Sep 2013 06:47:23 -0000 On Sat, 14 Sep 2013 23:20:46 -0700, Gary Kline wrote: > say that I have a utility xxx running sometimes. xxx is > soaking up a chunk of my load. I have to use top to find if > xxx is running, then kill -9 to kill xxx and have a steady load of, > say, between 0.10 and 0.15. what's the script that can do this? Quick and dirty, needs adjustments. Repeat the following (endless loop, depending on the shell you're using): top -n | awk '/%/ { load=$11; sub("%", "", load); sub("\\.", "", load); if(load > 1000 && load < 1500) print $1 }' | xargs kill -9 The margin is coded in the conditional: 1000 means 10.00% WCPU (load 0.10), 1500 means 15.00% WCPU (load 0.15). You will have to set the "valid load" accordingly. Done some minor testing, killed my media player (as expected). I'm sure someone will present a much better, less dirtier approach to accomplish the requested task. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1379227123.52657.YahooMailNeo>