From owner-freebsd-questions@FreeBSD.ORG Sun Dec 23 03:09:49 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 6FFE716A417 for ; Sun, 23 Dec 2007 03:09:49 +0000 (UTC) (envelope-from unga888@yahoo.com) Received: from web57011.mail.re3.yahoo.com (web57011.mail.re3.yahoo.com [66.196.97.115]) by mx1.freebsd.org (Postfix) with SMTP id 3586813C458 for ; Sun, 23 Dec 2007 03:09:49 +0000 (UTC) (envelope-from unga888@yahoo.com) Received: (qmail 89813 invoked by uid 60001); 23 Dec 2007 03:09:48 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=U9ZD8J32nKT39pOY/fnRbLIhkG+URetb/OkmefwT+ZwHNTZ7TL66oey6IxrIYcwGkk61ct5Pf58im5vga7WAKnOJRy8L4Wf4w3KIsbmaIZqfzz+/ixgWNPW+yx7541xlcpoERNucC/MDFsL0CFQa+7RzzpWDwQlADoSqJgYjslE=; X-YMail-OSG: SEWFWhoVM1mZnJMZzwjeIcU8JzMxQRxFgUEQlZ9d.QGObENNcn0oNUQYnZLZBZ13J7Me.1.8RSagfhSRUu4lezB7l4eValDBKlgTr3urBEGRfIdUZX8- Received: from [165.21.154.15] by web57011.mail.re3.yahoo.com via HTTP; Sat, 22 Dec 2007 19:09:47 PST Date: Sat, 22 Dec 2007 19:09:47 -0800 (PST) From: Unga To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <514379.74969.qm@web57011.mail.re3.yahoo.com> Subject: Understand process priority 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: Sun, 23 Dec 2007 03:09:49 -0000 Hi all $ ps -o pri,ni,rtprio,command -p `pgrep amarok` PRI NI RTPRIO COMMAND 20 0 normal amarokapp 1) Are there are 3 priority values per process, or 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? Is it 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