Patch Name: PHCO_26020 Patch Description: s700_800 11.00 top(1) cumulative patch Creation Date: 02/02/06 Post Date: 02/03/07 Hardware Platforms - OS Releases: s700: 11.00 s800: 11.00 Products: N/A Filesets: OS-Core.CMDS-AUX,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP OS-Core.CORE-ENG-A-MAN,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP Automatic Reboot?: No Status: General Release Critical: No Category Tags: defect_repair hardware_enablement general_release Path Name: /hp-ux_patches/s700_800/11.X/PHCO_26020 Symptoms: PHCO_26020: 1. top(1) displays wrong values for the average cpu time spent in each state on a multiprocessor machine. 2. top(1) command is showing, the resident size of the process as, more than actual size of the process. PHCO_22686: top(1) output functionality corrected. PHCO_21892: In a multi processor system, if any processor other than the last processor is deallocated, top(1) shows incorrect cpu usage, average cpu usage and load averages information. PHCO_17439: 1. Long tty names cause unaligned output for top(1). 2. top(1) reports wrong tty name for processes which are not attached to a terminal. 3. top(1) may dump core if certain undocumented behavior of qsort(3) changes in future releases. PHCO_14809: top(1) displays wrong usernames. Extra character in top output at the lower right corner of the screen. Floating exception when screen is small. top(1) does not display any processes on a small screen for a multi processor system which has a large number of CPUs Defect Description: PHCO_26020: 1. top(1) is showing wrong values for average cpu time spent by all the active processors in each state. The average cpu time spent in each state was calculated by storing the sum of cpu time spent in each state by all the active processors in a variable and dividing it with number of active processors. There was a overflow occuring while assigning sum of cpu times spent by all the active processors. This problem can occur only on machines, up for long time. Ex: Cpu states: CPU LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS 0 0.31 6.7% 0.0% 0.0% 93.3% 0.0% 0.0% 0.0% 0.0% 1 0.34 14.4% 0.0% 6.7% 78.8% 0.0% 0.0% 0.0% 0.0% 2 0.44 54.8% 0.0% 6.7% 38.5% 0.0% 0.0% 0.0% 0.0% 3 0.57 83.7% 0.0% 1.0% 15.4% 0.0% 0.0% 0.0% 0.0% 4 0.29 80.8% 0.0% 0.0% 19.2% 0.0% 0.0% 0.0% 0.0% 5 0.54 34.6% 0.0% 2.9% 62.5% 0.0% 0.0% 0.0% 0.0% 6 0.54 25.0% 0.0% 6.7% 68.3% 0.0% 0.0% 0.0% 0.0% 7 0.30 97.1% 0.0% 0.0% 2.9% 0.0% 0.0% 0.0% 0.0% --- ---- ----- ----- ----- ----- ----- ----- ----- ----- avg 0.42 0.0% 0.0% 0.0% 100.0% 0.0% 0.0% 0.0% 0.0% Resolution: The variable, used for storing the sum is changed to to take care of large values. Now the overflow is not occuring and top(1) is giving correct output. 2. top(1) is showing the resident size of the process, more than the actual size of process, which is wrong. This was because, the total size of process was calculated as sum of text, data and stack, where as the resident size of the process includes sizes of private regions of uarea, shared memory, mmap regions and io mappings in addition to the resident text, data and stack. Ex: System: condor Wed Aug 22 21:18:42 2001 Load averages: 2.00, 2.00, 2.01 116 processes: 111 sleeping, 4 running, 1 zombie Cpu states: LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS 2.00 57.7% 0.0% 42.3% 0.0% 0.0% 0.0% 0.0% 0.0% Memory: 68012K (43412K) real, 58424K (42600K) virtual, 443276K free Page# 1/8 TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND ? 5828 root 187 0 56K 140K run 16336:24 80.65 80.51 syncp3 ? 29608 vts 195 20 216K 232K run 2534:49 18.05 18.02 mailx pts/15 17520 vts 178 20 776K 4880K run 0:00 1.48 0.38 top In the above example, top(1) is giving the resident size of a process as more than the size of the process. Resolution: Now the code of top(1) is changed to include, private regions of uarea, shared memory, mmap regions and io mappings to the actual size of the process. PHCO_22686: top(1) output functionality corrected. Resolution: Code has been modified to take care of this issue. The allocation of processors on fly also has been taken care. PHCO_21892: In a multiprocessor system of say, n processors, when a processor other than processor "n" is deallocated, top(1) skips the information of processor "n" instead of the deallocated processor. While calculating the averages, top(1) takes the deallocated processor into consideration instead of processor "n". Resolution: The mpctl(2) call is used in top(1) to find the allocated processors' numbers and top(1) is made to display and calculate information only for the allocated processors. PHCO_17439: 1. If the tty name of a process is more than 6 characters, the line corresponding to that process in the top output appears to be shifted towards right. This results in poor legibility. Resolution: top(1) will align the process information and the header dynamically based on the length of the longest tty name. 2. top(1) reports 'rroot' as tty name for processes which are not attached to a terminal. The reason is, a process, which is not attached to a terminal, will have the fields pst_major and pst_minor of the process data structure equal to -1 which matches the major and minor numbers of the boot device /dev/rroot. Resolution: If the pst_major and pst_minor fields of the process data structure are equal to -1, top(1) will display '?' indicating that the process is not attached to a terminal. 3. top(1) may dump core if certain undocumented behavior of qsort(3) changes in future releases. Resolution: top(1) has been modified so that it does not rely on the undocumented behavior of qsort(3) PHCO_14809: top(1) displays wrong usernames due to collisions while hashing. Extra character in top output at the lower right corner of the screen. Floating exception when screen is small. This occurs when the number of processes which can be displayed on the screen becomes zero. top(1) does not display any processes on a small screen for a multi processor system which has a large number of CPUs. The individual CPU state information dominates the screen and there is no space left for displaying processes. SR: 8606233010 8606202912 8606186147 8606146989 8606142594 5003410233 5003411835 5003397711 4701383430 4701383448 4701383455 Patch Files: OS-Core.CMDS-AUX,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: /usr/bin/top OS-Core.CORE-ENG-A-MAN,fr=B.11.00,fa=HP-UX_B.11.00_32/64, v=HP: /usr/share/man/man1.Z/top.1 what(1) Output: OS-Core.CMDS-AUX,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: /usr/bin/top: top.c $Revision: 82.1.1.20 $ $Date: 2002/01/30 09:0 8:32 $ find_ttys.c $Revision: 80.1 $ $Date: 96/09/06 17:19 :38 $ PATCH_11_00: top.o find_ttys.o 02/02/06 OS-Core.CORE-ENG-A-MAN,fr=B.11.00,fa=HP-UX_B.11.00_32/64, v=HP: /usr/share/man/man1.Z/top.1: None cksum(1) Output: OS-Core.CMDS-AUX,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: 1307441049 36864 /usr/bin/top OS-Core.CORE-ENG-A-MAN,fr=B.11.00,fa=HP-UX_B.11.00_32/64, v=HP: 3683654181 3296 /usr/share/man/man1.Z/top.1 Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: None Supersedes: PHCO_14809 PHCO_17439 PHCO_21892 PHCO_22686 Equivalent Patches: None Patch Package Size: 70 KBytes Installation Instructions: Please review all instructions and the Hewlett-Packard SupportLine User Guide or your Hewlett-Packard support terms and conditions for precautions, scope of license, restrictions, and, limitation of liability and warranties, before installing this patch. ------------------------------------------------------------ 1. Back up your system before installing a patch. 2. Login as root. 3. Copy the patch to the /tmp directory. 4. Move to the /tmp directory and unshar the patch: cd /tmp sh PHCO_26020 5. Run swinstall to install the patch: swinstall -x autoreboot=true -x patch_match_target=true \ -s /tmp/PHCO_26020.depot By default swinstall will archive the original software in /var/adm/sw/save/PHCO_26020. If you do not wish to retain a copy of the original software, include the patch_save_files option in the swinstall command above: -x patch_save_files=false WARNING: If patch_save_files is false when a patch is installed, the patch cannot be deinstalled. Please be careful when using this feature. For future reference, the contents of the PHCO_26020.text file is available in the product readme: swlist -l product -a readme -d @ /tmp/PHCO_26020.depot To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHCO_26020.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None