Leaderboard (728 x 90)

Friday, July 16, 2010

How do I get rid of old 10.x patches or superseded patches?

DO NOT USE SWREMOVE!  swremove will check the scripts for
the patch you ask it to remove, and happily remove whatever
file you tell it to, and replace it with an earlier version
of the patch from /var/adm/sw/patch/ (if one exists).

NOTE: If you have already removed previous OS version
patches with swremove, you will either
1) need to restore from backup, or 2) reload the OS.

First download and install one of the following patches,
which contain the HP-UX patch tools:

o 10.x: PHCO_20824 ('cleanup' only)
o 11.00: PHCO_27779 ('cleanup', 'check_patches', &
'show_patches')
o 11.11: PHCO_27780 ('cleanup', 'check_patches', &
'show_patches')

The patch tools come with 11.00, but you should still install
patch PHCO_24347 to fix several bugs that exist in it.

The 'cleanup' tool is used to commit patches while preserving
a set level of rollback, remove HP-UX 10.x patch information
from the IPD, and prune superseded patches from a depot.
The 'check_patches' utility checks for partially installed
(split) patches, incorrect patch_state, patch attribute
corruption, and objects within an archive library. The
'show_patches' tool can display the set of active or
superseded patches on a system.

To remove old 10.x patches from /var/adm/sw/patch/, use the
command:

# cleanup -i

Committing a patch causes rollback files associated with
that patch to be deleted from /var/adm/sw/save/.

To commit all patches that have been superseded at least
twice, use the command:

# cleanup -c 2

On 11.x, to commit a patch that has not been superseded,
use the command:

# swmodify -x patch_commit=true

In case you were wondering, 'cleanup -c 0' does not work.

WARNING: Once the above swmodify command has been executed,
you CANNOT roll back (remove) the patch unless you
remove the associated base software that the patch
modified. For this reason, I do not recommend
doing it unless you desperately need to free up
space under /var, and you have exhausted all
other means of doing so.

Reference:
http://www.faqs.org/faqs/hp/hpux-faq/section-158.html

How do I configure swlist to not display superseded patches?

A new option to swlist, "show_superseded_patches", was
introduced in HP-UX 11.00 via the SD-UX cumulative patch
PHCO_20078. In 11.00, by default, swlist displays all
installed patches, including superseded ones. In 11.10+,
by default, swlist does not display superseded patches.

Assuming you have PHCO_20078, or any more recent SD-UX
cumulative patch installed, you may change the default
behavior of swlist in 11.00. To do so, add the following
line to the file /var/adm/sw/defaults:

swlist.show_superseded_patches = false

Reference:
http://www.faqs.org/faqs/hp/hpux-faq/section-160.html

How can I install multiple HP-UX patches, without having to reboot more than once?

Use swcopy(1M) on each patch to copy the patch into a local
depot, then use swinstall(1M) to install all patches
contained in the local depot.

# swcopy -s /tmp/PHCO_12345.depot \
-x enforce_dependencies=false \* \
@ /tmp/my_patch_depot
# swcopy -s /tmp/PHCO_67890.depot \
-x enforce_dependencies=false \* \
@ /tmp/my_patch_depot

etc..

# swinstall -s /tmp/my_patch_depot -x autoreboot=true \*

The following script automates the process of creating the
depot:

#!/sbin/sh
# cd to the directory where the patches are (PHxx_xxxx)
# and start this script. it will extract the patches one
# by one and create a patch-depot in $PDEPOT.

PATH=/usr/bin:/usr/sbin
PDEPOT=/tmp/my_patch_depot
for PFILE in PH*[0-9]; do
sh $PFILE
rm $PFILE
done
# It's a good habit first reading the PHxx_xxxx.text
# files before deleting them.
# rm *.text
for PFILE in PH*depot; do
swcopy -s -x enforce_dependencies=false $PWD/$PFILE \* \
@ $PDEPOT
done
clear
echo \
"*******************************************************"
echo \
"PLEASE NOTE: The Patch depot $PDEPOT has been created."
echo \
"*******************************************************"
echo \
"Please start swinstall with $PDEPOT as the source, and"
echo \
"don't forget to unregister the depot"
echo \
"(e.g. swreg -u -l depot $PDEPOT)."


Reference:
http://www.faqs.org/faqs/hp/hpux-faq/section-159.html

Friday, July 9, 2010

Time Not Syncing With Remote NTP Server

All computers have their own internal clocks, implemented in hardware and software. These clocks have acceptable accuracy, but are not anywhere near perfect?they all exhibit ?clock drift,? letting their time drift by several seconds a day. While desktop users may not be inconvenienced by drift, system administrators cannot tolerate it. When running a server, it is essential to keep the system's time synchronized with the other servers it interacts with.

Linux provides a means to keep time in sync via the Network Time Protocol (NTP). A computer running the NTP client frequently probes one or more NTP servers and synchronizes its time with that of the server(s).

YaST provides a means to set-up one or more remote NTP server via the ?NTP Client? module found under "Network Services." A list of public NTP servers can be found at http://ntp.isc.org/bin/view/Servers/WebHome. OES servers can also be configured to serve as NTP servers. See the Novell Network Time Protocol Administration Guide for OES for more details.

The Problem:

When adding a remote time source in YaST, there are always at least two sources added to /etc/ntp.conf: the local computer and the remote time source. When the NTP daemon starts, it initially synchronizes the system time to the time server's time, then periodically performs the same synchronization in the background. If the time server is not immediately available, then NTP falls back on the default local time source.

Some users have observed that their system time is being synchronized to the remote server's time when xntpd initially starts, but then is only being synchronized to their local time thereafter. An example /var/log/ntp would look like this:


2 May 08:11:05 ntpd[2965]: synchronized to LOCAL(0), stratum 10
2 May 08:11:05 ntpd[2965]: kernel time sync disabled 0041
2 May 08:14:17 ntpd[2965]: synchronized to LOCAL(0), stratum 10
2 May 08:26:13 ntpd[2965]: kernel time sync enabled 0001
2 May 10:33:35 ntpd[3489]: synchronized to LOCAL(0), stratum 10
2 May 10:33:35 ntpd[3489]: kernel time sync disabled 0041

Also, executing xntpdc -p would reveal that the time is synchronized to the LOCAL, not the remote server (see the entry with the '*').

#  xntpdc -p

remote local st poll reach delay offset disp
=======================================================================
*LOCAL(0) 127.0.0.1 10 1024 377 0.00000 0.000000 0.11856
=prv-time.provo. 137.65.211.18 2 1024 377 0.00041 -262.1380 0.11470

The Solution:

The solution is to make NTP more persistent when probing the remote time server. This is done by appending the flags burst and iburst to the remote server; burst tells NTP to send a burst of eight packets to the remote server instead of one when the server is reachable, and iburst tells it to do the same when the server is not reachable. The result is faster and more reliable synchronizations.

These options can be added in the "NTP Client" YaST module by selecting "Complex Configuration" then editing the remote server. The options are added in the "Options" field and are space-delimited. They can also be added directly to the server in /etc/ntp.conf as follows:


server 137.65.1.123 burst iburst

A healthy /var/log/ntp will then look like this:


29 Apr 15:24:58 ntpd[6892]: synchronized to 137.65.1.123, stratum 2
29 Apr 15:24:58 ntpd[6892]: kernel time sync disabled 0041
29 Apr 15:26:15 ntpd[6892]: kernel time sync enabled 0001
2 May 08:10:41 ntpd[6892]: ntpd exiting on signal 15
2 May 08:13:33 ntpd[6684]: synchronized to 137.65.1.123, stratum 2
2 May 08:13:33 ntpd[6684]: kernel time sync disabled 0041
2 May 08:13:45 ntpd[6684]: kernel time sync enabled 0001


Reference:
http://www.novell.com/coolsolutions/feature/15345.html

Monday, July 5, 2010

Outlook Express Error Code : 0×800C0133

ข้อผิดพลาดหมายเลข 0×800C0133 เกิดขึ้นจากการที่ Outlook Express
ไม่สามารถจัดการกับ Inbox ที่มีขนาดเกิน 2 กิกะไบต์ได้นั่นเอง
โดยทั้งนี้ไม่ขึ้นอยู่กับจำนวนอีเมลล์ที่รับได้
ขึ้นตอนการแก้ไขทำได้หลายวิธีด้วยกัน แต่แนะนำให้ถือโอกาสนี้
สังคายนา Inbox ของคุณซะเลยก็ดีเหมือนกันนะ

ขั้นแรก สร้างเมลล์บ็อกซ์ขึ้นมาใหม่
โดยคลิ้กขวาบนรายการ Local Folders ที่อยู่ในกรอบหน้าต่างทางขวา
เลือกคำสั่ง New Folder ตั้งชื่อ เช่น 2008Q1 ซึ่งหมายถึงอีเมลล์
3เดือนแรกของปี 2008

จากนั้นใน Inbox คลิ้กเลือกอีเมลล์ตั้งแต่เดือนมกรา-มีนาคม คลิ้กขวา
เลือกคำสั่ง Move to Foder… เลือกย้ายไปที่โฟลเดอร์ 2008Q1
เพียงแค่นี้อีเมลล์ 3 เดือนแรกของปีก็จะถูกย้ายออกไปจาก Inboxแล้ว

ขั้นตอนต่อไป ก็คือการลดขนาด Inbox ด้วยการคลิ้กเมนู
File–>Compact โปรแกรม OE จะลดขนาดไฟล์ Inbox ลง
โดยคุณสามารถตรวจสอบขนาดไฟล์อินบ็อกซ์ได้ที่
C:\Document and Settings\(user)\Local Settings\Application Data\
Identities\{GIU}\Microsoft\Outlook Express
จะเห็นว่าไฟล์ Inbox.dbx มีขนาดลดลงแล้ว ให้ลองคลิ้กรับเมลล์อีกครั้ง

Reference: http://blog.ibiz.co.th/2008/12/15/oe-outlook-express-error-code-0x800c0133/