From owner-freebsd-questions@FreeBSD.ORG Sun Sep 15 06:38:46 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1DB4DE18 for ; Sun, 15 Sep 2013 06:38:46 +0000 (UTC) (envelope-from btillman99@yahoo.com) Received: from nm25-vm1.bullet.mail.bf1.yahoo.com (nm25-vm1.bullet.mail.bf1.yahoo.com [98.139.212.155]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AC317214D for ; Sun, 15 Sep 2013 06:38:45 +0000 (UTC) Received: from [98.139.212.149] by nm25.bullet.mail.bf1.yahoo.com with NNFMP; 15 Sep 2013 06:38:44 -0000 Received: from [98.139.212.235] by tm6.bullet.mail.bf1.yahoo.com with NNFMP; 15 Sep 2013 06:38:44 -0000 Received: from [127.0.0.1] by omp1044.mail.bf1.yahoo.com with NNFMP; 15 Sep 2013 06:38:44 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 349142.12703.bm@omp1044.mail.bf1.yahoo.com Received: (qmail 65728 invoked by uid 60001); 15 Sep 2013 06:38:44 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1379227124; bh=r1MwILzleYlu1ryHQOlQP5S0NZ5hJy9z1BVWt2eYs+k=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=hq3udJD8thXhXyovzAdRNNNV3gE1MVBBSbwEYlQnVjbJ2PgoCCEEOn9UrST+FV1IfZbsIppZmeiR7ikxYIanQkiHmnijpdubVk/UBxrYu/B9WX43Jht1s+zq0hHfBjdmLIjxdbd+hlP5TXpaUurMRYB/iEWF0Zr8mTSX4aHEIpk= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=5wP8lkXr+5oiclXgqtbp4HomC1wvh8hK3Grbea5DWRKhPWbibzM6GyenZKefvzqBWUjsMYp0dc5aYb6onScXOM0Yq3+0BNwj10Syuev5pOo5gZ89IOe3h3qB3TdmcdctVdhZtvF8+Fz2jE5yav7dJRuyQScA8GUcjzHplLCz/Js=; X-YMail-OSG: gLE3lUIVM1lgglwJ0lZHLOH2j3hzj0a_klXjz_8j91Grmem KMlNkvotaWV57sR7pr9uvmVXTYhLWk5veV1UYANgvyvLNnvb5EcOeETth4DO 5qU7LXAwvqpLma5.HctQl76tk1RxSjR7Fn4z0ciN0EimGjeUOyuUnzLWACwt P869MZothlyadjs405pvd2azP463P6lZdFDeCC6FRUg6XfarJnK2X5dq43Yw RijUS.VoUPB3G97ueD0TBYnWymhb8lJ.5ZAKVJyUQ_8YuT6Z3Yiyg7ZMpSQG VHNuXUzko1Pn96QlfDboGA3WtGgsWUhjTNJzKy0C3Cc5w1eSn9Hqd42EStjh 2KMMPb3MWGMWiNq1x1u8pe13tXIXr0wkmv2pxMY5OXukjCn6aWdrB_3EP71W e278hTn1oAFZ2V5ku6bclQqTthElBwtvF68Y1M1ynHS3Bt5QOd.O8TI6eFxh HVZdnv.NJssXo8fwxaQlDGhZFWZN6Cw87PVdS_psI9aNf0WRhZvUdgZjZRTH grJF4jKg8G4vuF84Gh7kRdJO9S0u0dF6OwMo5D.LpqctLH0gkjCCaBqCqP1K aUmTzzNb6OOLQewp3PYkY445QZBjCx1vcB.ZaiJ0vg9Uy656cYSN1dZ325YU 5.lkxsbEpN6lvx43IJShsqY6F.e4yPbtuwnB3nw11nSHBgVcUM0KuqjJt6s9 fzf0mFYC. Received: from [98.203.44.66] by web165004.mail.bf1.yahoo.com via HTTP; Sat, 14 Sep 2013 23:38:43 PDT X-Rocket-MIMEInfo: 002.001, CgoKCl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCiBGcm9tOiBCZXJudCBIYW5zc29uIDxiYWhAYmFuYW5tb25hcmtpLnNlPgpUbzogQmVybnQgSGFuc3NvbiA8YmFoQGJhbmFubW9uYXJraS5zZT4gCkNjOiBKdWxpYW4gSC4gU3RhY2V5IDxqaHNAYmVya2xpeC5jb20.OyBmcmVlYnNkLXF1ZXN0aW9uc0BmcmVlYnNkLm9yZyAKU2VudDogU2F0dXJkYXksIFNlcHRlbWJlciAxNCwgMjAxMyAxMjozNyBQTQpTdWJqZWN0OiBSZTogRGlza2xlc3MgcXVlc3Rpb24KIAoKT24gMjAxMy0wOS0xNCAxNTo0MSwBMAEBAQE- X-Mailer: YahooMailWebService/0.8.157.561 References: <201309140905.r8E955xE062761@fire.js.berklix.net> <523467A5.6020902@bananmonarki.se> <523490C0.9060609@bananmonarki.se> Message-ID: <1379227123.52657.YahooMailNeo@web165004.mail.bf1.yahoo.com> Date: Sat, 14 Sep 2013 23:38:43 -0700 (PDT) From: Bill Tillman Subject: Re: Diskless question To: "freebsd-questions@freebsd.org" In-Reply-To: <523490C0.9060609@bananmonarki.se> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Bill Tillman List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Sep 2013 06:38:46 -0000 =0A=0A=0A=0A________________________________=0A From: Bernt Hansson =0ATo: Bernt Hansson =0ACc: Julian H. S= tacey ; 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 = =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: 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 ; 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 ; 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 To: Gary Kline 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 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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, ...