From owner-freebsd-questions@FreeBSD.ORG Fri Dec 21 12:30:05 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EFF2116A417 for ; Fri, 21 Dec 2007 12:30:05 +0000 (UTC) (envelope-from unga888@yahoo.com) Received: from web57010.mail.re3.yahoo.com (web57010.mail.re3.yahoo.com [66.196.97.114]) by mx1.freebsd.org (Postfix) with SMTP id 97D7F13C448 for ; Fri, 21 Dec 2007 12:30:05 +0000 (UTC) (envelope-from unga888@yahoo.com) Received: (qmail 2718 invoked by uid 60001); 21 Dec 2007 12:30:04 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=Gj6q79ltFxFy/qZwl7OluSNa0Cso2wJ0HTpLoxeg5p1MgWjG6Px670qET5jECth7JbqCwab0T0HCDVcxn/v8/K2lrqGysLcwylsQC/uf7zknuJIBbPsiHIoh8TP791m91T1ggYP3kL43rAjerqtSk4pTideNyAIEk3cXbqK/8jk=; X-YMail-OSG: w1yn_hcVM1neNoTKsoolANjHxMsZeX9CK1wWXpqnh2AWBXWoBFEigBID0XfZnM7v5OtpaMtSuTrLvGgR_LnM5bz0V7J4v30n7Hnf70Rpt2TqTn47ihs- Received: from [165.21.154.13] by web57010.mail.re3.yahoo.com via HTTP; Fri, 21 Dec 2007 04:30:04 PST Date: Fri, 21 Dec 2007 04:30:04 -0800 (PST) From: Unga To: freebsd-questions@freebsd.org In-Reply-To: <200712201854.51070.pieter@degoeje.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <782437.2008.qm@web57010.mail.re3.yahoo.com> Subject: Re: What priority this app running? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Dec 2007 12:30:06 -0000 --- Pieter de Goeje wrote: > On Thursday 20 December 2007, Unga wrote: > > Hi all > > > > $ ps auxl -w | grep amarok > > test 1707 0.0 9.4 61680 48544 ?? S > 12:29AM > > 0:17.29 amarokapp 1003 1 1 20 0 > ksere > > > > Could I check with the list what is the priority > this > > amarokapp is running? > Priority isn't shown in the output above. Try > $ ps -o pri,ni,rtprio,command -p `pgrep amarok` > This will display priority, nice value and realtime > priority (in that order). > > > > The ps man page doesn't show the values for > priority, > > therefore, what should be the values it should > display > > for lowest and highest priority (realtime)? > A lower value means higher priority. Realtime > priority 0 is as high as you can > get. See also rtprio(1). > Thanks all for replies. Priority is still not clear to me. $ ps -o pri,ni,rtprio,command -p `pgrep amarok` PRI NI RTPRIO COMMAND 20 0 normal amarokapp 1) I wonder why there are 3 columns for priority, not just one? 2) How should I read above? Is it Priority=20, ie. NI=0, RTPRIO=normal? Does it all mean the same thing, like the bytes=1048576 and KB=1024 and MB=1? 3) The rtprio(1) says "Priority is an integer between 0 and RTP_PRIO_MAX (usually 31). 0 is the highest priority". But when I run following command: $ ps aux -o pri,ni,rtprio,command USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND PRI NI RTPRIO COMMAND root 10 99.2 0.0 0 8 ?? RL 7:40PM 0:00.00 [idle: cpu1] 171 0 idle:25 [idle: cpu1] root 26 0.0 0.0 0 8 ?? WL 7:40PM 0:00.02 [irq18: envy24ht -80 0 intr:4 [irq18: envy24ht test 1212 0.0 9.3 58544 48176 ?? S 8:06PM 0:06.15 amarokapp 20 0 normal amarokapp That is, PID PRI NI RTPRIO 10 171 0 idle:25 26 -80 0 intr:4 1212 20 0 normal This shows priority ranges at least from -80 to 171 contrary to the range mentioned in rtprio(1). Does this means PID=26 has a higher priority than PID=1212? 4) Can a PRI=0 be considered Realtime? 5) What is the meaning of priority=0 in /etc/login.conf? Realtime? 6) What is the value should I set for priority in /etc/login.conf if I want Realtime? Kind Regards Unga ____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs