Bug 34155

Summary: mistake in Handbook Section 3.5 Processes
Product: Documentation Reporter: Marian Cerny <cerny>
Component: Books & ArticlesAssignee: Michael W Lucas <mwlucas>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Marian Cerny 2002-01-22 08:50:00 UTC
In Handbook, Section 3.5 - Processes:

>    As you can see in this example, the output from [12]ps(1) is organized
>    in to a number of columns. PID is the process ID discussed earlier.
>    PIDs are assigned starting from 1, go up to 65536, and wrap around
                                                 ^^^^^
>    back to the beginning when you run out. TT shows the tty the program
>    is running on, and can safely be ignored for the moment. STAT shows

This is confusing. In the example above (output from ps) is
"72210  p0  R+     0:00.00 ps",
 ^^^^^
and in the example below (outpout from top) is
"last pid: 72257;  load averages:  0.13,  0.09,  0.03    up 0+13:38:33  22:39:10"
           ^^^^^

So after a while of investigation I found out that on my computer there
also are processes with PID higher than 65536. The highest value I have
seen was 99651. After a while, new processes got numbers around 500.

So I think that "65536" should be changed to "99999", if 99999 is the
right value.

How-To-Repeat: Have a look at Hanbook Section 3.5, then look for "65536".
Comment 1 Peter Pentchev 2002-01-22 12:13:23 UTC
On Tue, Jan 22, 2002 at 12:47:29AM -0800, Marian Cerny wrote:
> 
> >Number:         34155
> >Category:       docs
> >Synopsis:       mistake in Handbook Section 3.5 Processes
> >Originator:     Marian Cerny
> >Release:        FreeBSD 4.4-RELEASE
> >Organization:
> private
> >Environment:
> FreeBSD ivetka 4.4-RELEASE FreeBSD 4.4-RELEASE #0: Tue Sep 18 11:57:08 PDT 2001
>     murray@builder.FreeBSD.org:/usr/src/sys/compile/GENERIC  i386
> >Description:
> In Handbook, Section 3.5 - Processes:
> 
> >    As you can see in this example, the output from [12]ps(1) is organized
> >    in to a number of columns. PID is the process ID discussed earlier.
> >    PIDs are assigned starting from 1, go up to 65536, and wrap around
>                                                  ^^^^^
> >    back to the beginning when you run out. TT shows the tty the program
> >    is running on, and can safely be ignored for the moment. STAT shows
> 
> This is confusing. In the example above (output from ps) is
> "72210  p0  R+     0:00.00 ps",
>  ^^^^^
> and in the example below (outpout from top) is
> "last pid: 72257;  load averages:  0.13,  0.09,  0.03    up 0+13:38:33  22:39:10"
>            ^^^^^
> 
> So after a while of investigation I found out that on my computer there
> also are processes with PID higher than 65536. The highest value I have
> seen was 99651. After a while, new processes got numbers around 500.
> 
> So I think that "65536" should be changed to "99999", if 99999 is the
> right value.

Yep, 99999 is the correct value, as witnessed by the PID_MAX constant
in <sys/proc.h>.

Patch attached for the convenience of doc committers.

G'luck,
Peter

-- 
I am not the subject of this sentence.

Index: doc/en_US.ISO8859-1/books/handbook/basics/chapter.sgml
===================================================================
RCS file: /home/ncvs/doc/en_US.ISO8859-1/books/handbook/basics/chapter.sgml,v
retrieving revision 1.55
diff -u -r1.55 chapter.sgml
--- doc/en_US.ISO8859-1/books/handbook/basics/chapter.sgml	11 Jan 2002 02:50:21 -0000	1.55
+++ doc/en_US.ISO8859-1/books/handbook/basics/chapter.sgml	22 Jan 2002 12:11:18 -0000
@@ -780,7 +780,7 @@
     <para>As you can see in this example, the output from &man.ps.1; is
       organized in to a number of columns.  <literal>PID</literal> is the
       process ID discussed earlier.  PIDs are assigned starting from 1, go up
-      to 65536, and wrap around back to the beginning when you run out.
+      to 99999, and wrap around back to the beginning when you run out.
       <literal>TT</literal> shows the tty the program is running on, and can
       safely be ignored for the moment.  <literal>STAT</literal> shows the
       program's state, and again, can be safely ignored.
Comment 2 Michael W Lucas freebsd_committer freebsd_triage 2002-01-22 13:14:22 UTC
Responsible Changed
From-To: freebsd-doc->mwlucas

Mmmm... easy fix, I'll take it.
Comment 3 Michael W Lucas freebsd_committer freebsd_triage 2002-01-22 13:22:15 UTC
State Changed
From-To: open->closed

Fixed, thank you!  It may take up to 24 hours for the on-line Handbook 
to be regenerated.