Bug 21022

Summary: top in no-idle mode on SMP machines drops processes
Product: [Retired] Red Hat Linux Reporter: Need Real Name <rob>
Component: procpsAssignee: Alexander Larsson <alexl>
Status: CLOSED NOTABUG QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-06-19 14:55:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Need Real Name 2000-11-17 16:47:37 UTC
On a dual-cpu machine running top displays all active processes. Putting
top into no-idle mode (eg. press 'i' to not display processes that get no
cpu time) only displays half of the processes (presumably all the processes
running on one cpu but not on the other).

Comment 1 Preston Brown 2001-02-01 20:31:47 UTC
I cannot duplicate this:

  2:38pm  up 34 days, 20:49, 42 users,  load average: 1.06, 0.34, 0.17
296 processes: 267 sleeping, 4 running, 24 zombie, 1 stopped
CPU0 states: 87.4% user, 12.1% system,  0.0% nice,  0.0% idle
CPU1 states: 83.2% user, 16.1% system,  0.0% nice,  0.1% idle
Mem:   517024K av,  513096K used,    3928K free,   40512K shrd,   18996K buff
Swap:  265064K av,   59028K used,  206036K free                  429320K cached

  PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
29936 pbrown    20   0   296  296   240 R    77.5  0.0   0:26 spinner
29935 pbrown    17   0   296  296   240 R    75.4  0.0   0:27 spinner
29938 root      11   0  2836 2836  1212 R    10.7  0.5   0:00 build
29937 pbrown    10   0  1128 1128   768 R     4.1  0.2   0:01 top
24269 root       0   0   164  164     0 T     0.0  0.0   0:00 vi

{1005}$ cat /etc/redhat-release 
Red Hat Linux release 7.0 (Guinness)


Comment 2 Need Real Name 2001-02-02 06:28:17 UTC
It seems to only affect some procs... Note how raid5d drops out in no-idle mode
despite the fact that it's obviously working. Primarily I've seen ssh (scp)
processes not be displayed... I can find other examples if it will help...
                                                                -Rob

[no-idle mode off:]
 12:44am  up 44 days,  7:21, 29 users,  load average: 16.76, 16.85, 16.79
161 processes: 147 sleeping, 14 running, 0 zombie, 0 stopped
CPU0 states:  5.0% user, 94.3% system,  0.2% nice,  0.0% idle
CPU1 states:  5.1% user, 94.5% system,  0.4% nice,  0.0% idle
Mem:   516972K av,  515124K used,    1848K free,   30820K shrd,   10484K buff
Swap:  393464K av,   28684K used,  364780K free                  457764K cached

  PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
 6379 prod      20  10  1404 1404  1004 R N  17.2  0.2  50:05 in.ftpd
 4935 prod      20  10  1404 1404  1004 R N  16.8  0.2  50:02 in.ftpd
 4944 prod      20  10  1404 1404  1004 R N  16.8  0.2  49:45 in.ftpd
 4936 prod      20  10  1404 1404  1004 R N  16.6  0.2  49:48 in.ftpd
 4942 prod      19  10  1404 1404  1004 R N  16.6  0.2  50:06 in.ftpd
 4943 prod      19  10  1404 1404  1004 R N  16.6  0.2  49:46 in.ftpd
 4949 prod      20  10  1404 1404  1004 R N  16.6  0.2  49:49 in.ftpd
 6380 prod      19  10  1404 1404  1004 R N  16.6  0.2  50:03 in.ftpd
 4958 prod      20  10  1404 1404  1004 R N  16.2  0.2  49:47 in.ftpd
 4937 prod      19  10  1404 1404  1004 R N  16.0  0.2  50:09 in.ftpd
   11 root     -17 -20     0    0     0 SW<   5.7  0.0 272:42 raid5d
30849 root       8   0  1112 1112   828 R     3.4  0.2   0:01 top
 5036 root       3   0  1128 1128   828 S     2.5  0.2   9:51 top
32177 prod       0   0  1264 1264  1004 S     0.7  0.2   0:00 ssh
31104 prod      19   0   912  912   744 S     0.5  0.1   0:00 populate.sh
32181 root       1   0  1340 1340  1072 S     0.5  0.2   0:00 ssh


[no-idle mode on:]
 12:44am  up 44 days,  7:21, 29 users,  load average: 16.17, 16.72, 16.75
159 processes: 139 sleeping, 19 running, 1 zombie, 0 stopped
CPU0 states:  5.1% user, 94.2% system,  0.3% nice,  0.1% idle
CPU1 states:  9.0% user, 89.3% system,  0.3% nice,  0.1% idle
Mem:   516972K av,  513812K used,    3160K free,   30088K shrd,   10484K buff
Swap:  393464K av,   28684K used,  364780K free                  457228K cached

  PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
 4937 prod      20  10  1404 1404  1004 R N  16.8  0.2  50:11 in.ftpd
 4949 prod      20  10  1404 1404  1004 R N  16.6  0.2  49:50 in.ftpd
 4936 prod      18  10  1404 1404  1004 R N  16.3  0.2  49:50 in.ftpd
 4944 prod      20  10  1404 1404  1004 R N  16.3  0.2  49:47 in.ftpd
 4958 prod      20  10  1404 1404  1004 R N  16.3  0.2  49:48 in.ftpd
 6380 prod      19  10  1404 1404  1004 R N  16.3  0.2  50:05 in.ftpd
 6379 prod      18  10  1404 1404  1004 R N  16.0  0.2  50:06 in.ftpd
 4942 prod      19  10  1404 14041004 R N  15.8  0.2  50:08 in.ftpd
 4935 prod      18  10  1404 1404  1004 R N  15.5  0.2  50:03 in.ftpd
 4943 prod      19  10  1404 1404  1004 R N  15.5  0.2  49:48 in.ftpd
30849 root       4   0  1112 1112   828 R     2.5  0.2   0:02 top
 5036 root       2   0  1128 1128   828 R     1.0  0.2   9:51 top
30171 root       0   0  1816 1752  1412 R     0.5  0.3   0:00 sshd
23542 prod      18   0   896  896   876 R     0.2  0.1   0:00 install.sh
32422 prod      20   0   364  364   308 R     0.2  0.0   0:00 tee
18331 root       0   0  1820 1756  1412 R     0.0  0.3   0:33 sshd


Comment 3 Alexander Larsson 2002-08-08 13:21:59 UTC
Idle processes are those that are sleeping or zombies. The raid5d process above
is sleeping, therefore it is removed in the no idle case.