Patch Name: PHCO_26013 Patch Description: s700_800 10.20 swapinfo(1M) patch Creation Date: 02/03/04 Post Date: 02/03/08 Hardware Platforms - OS Releases: s700: 10.20 s800: 10.20 Products: N/A Filesets: OS-Core.SYS-ADMIN Automatic Reboot?: No Status: General Release Critical: No Path Name: /hp-ux_patches/s700_800/10.X/PHCO_26013 Symptoms: PHCO_26013: 1. swapinfo(1M) displays incorrect filesystem swap information when the user data space on the filesytem is greater than 4GB. 2. swapinfo(1M) displays incorrect filesystem swap information when the swap size is greater than 2GB. 3. swapinfo(1M) shows incorrect reserve value when adding secondary swap greater than 4GB. Defect Description: PHCO_26013: 1. swapinfo(1M) print incorrect information for filesystem swap, in the following conditions: - user data space on the filesystem is > 4GB - free space < 4GB and - free space + swap space > 4GB Steps for reproducing the problem are as follows: a. Create the filesystem swap of size 384MB on a filesystem with user data space greater than 4GB by following fstab entry. /dev/vg00/lvol1 /sfs swapfs min=49152,lim=49152,pri=2 0 2 The unit of min/lim is fs block size and in this case its 8kb, so the swap size is 49152*8 = 393216 = 380MB. Lets say the filesystem has 3880 MB free space. b. Since the min and lim is same Kb AVAIL, Kb FREE and LIMIT should have the same value if filesystem swap is not used. But swapinfo(1M) command shows a smaller value for Kb AVAIL and Kb FREE. Also, for PCT USED for total line it displays a value bigger than actual percentage. $ swapinfo -t Kb Kb Kb PCT START/ Kb TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME dev 524288 134860 389428 26% 0 - 1 /dev/vg00/lvol2 localfs 2048 0 2048 0% 393216 0 2 /sfs/paging reserve - 581616 -581616 memory 295100 159592 135508 54% total 821436 876068 -54632 107% - 0 - Resolution: Changed the data types to required data types such that the data will not overflow and printf formats be corrected as required. 2. swapinfo(1M) displays incorrect Kb USED and Kb FREE for filesystem swap when the filesystem swap size is greater than 2GB. Steps for reproducing the problem are as follows: a. Create the filesystem swap of size 1.5GB on a filesystem by following fstab entry. /dev/vg00/lvol1 /sfs swapfs min=192000,lim=192000,pri=2 0 2 The unit of min/lim is fs block size and in this case its 8kb, so the swap size is 192000*8 = 1536000 (approx 1.5GB). b. Execute swapinfo(1M) command. $ swapifno -t Kb Kb Kb PCT START/ Kb TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME dev 1048576 93196 955380 9% 0 - 1 /dev/vg00/lvol2 localfs 548864 0 548864 0% 1536000 0 2 /sfs/paging reserve - 487044 -487044 memory 779280 635576 143704 82% total 2376720 1215816 1160904 52% - 0 - Here swapinfo(1M) displays a smaller value for the filesystem swap, even though 1.5GB was setup for filesystem swap. Resolution: Changed the data types to required data types such that the data will not overflow and printf formats be corrected as required. 3. If a secondary swap of size greater than 4GB is added, swapinfo(1M) displays incorrect reserve value. Steps for reproducing the problem are as follows: a. Create a device swap area of greater than 4GB by following fstab entry. /dev/vg01/lvol1 ... swap pri=1 0 0 b. Execute the swapinfo(1M) command. $ swapinfo -t Kb Kb Kb PCT START/ Kb TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME dev 1048576 0 1048576 0% 0 - 1 /dev/vg00/lvol2 dev 2097152 0 2097152 0% 0 - 1 /dev/vg00/lvol10 dev 4194304 0 4194304 0% 0 - 1 /dev/vg00/lvol12 reserve - 4246144 -4246144 memory 933752 60560 872800 6% total 8273784 4306704 3967080 52% - 0 - swapinfo(1M) displays a large reserve space (of the order 4GB). Resolution: swapinfo source has been modified to take care of swap space greater than 4GB. SR: 8606217907 8606133779 8606204672 Patch Files: /usr/sbin/swapinfo what(1) Output: /usr/sbin/swapinfo: $Revision: 76.4.3.4 $ PATCH_10_20: swapinfo.o 02/03/04 cksum(1) Output: 3699750483 20480 /usr/sbin/swapinfo Patch Conflicts: None Patch Dependencies: s700: 10.20: PHKL_26063 s800: 10.20: PHKL_26064 Hardware Dependencies: None Other Dependencies: None Supersedes: None 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_26013 5a. For a standalone system, run swinstall to install the patch: swinstall -x autoreboot=true -x match_target=true \ -s /tmp/PHCO_26013.depot By default swinstall will archive the original software in /var/adm/sw/patch/PHCO_26013. If you do not wish to retain a copy of the original software, you can create an empty file named /var/adm/sw/patch/PATCH_NOSAVE. WARNING: If this file exists when a patch is installed, the patch cannot be deinstalled. Please be careful when using this feature. It is recommended that you move the PHCO_26013.text file to /var/adm/sw/patch for future reference. To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHCO_26013.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None