Archive for Solaris Sparc

Solaris Patch Cluster Error Codes

 Ever wonder what those codes mean when you are applying a solaris patch cluster

With regular programs a 0 is good and a 1 is bad.  Same basic theory, but you get diffrent error codes for diffrent reasons.  Most of the time you will get a 0 when the package is patch/upgraded and a 1 when you don’t even have the package, or it is already at the same level.  So a 1 is not as bad as it sounds.

Exit code     Meaning
0     No error
1     Usage error
2     Attempt to apply a patch that’s already been applied
3     Effective UID is not root
4     Attempt to save original files failed
5     pkgadd failed
6     Patch is obsoleted
7     Invalid package directory
8     Attempting to patch a package that is not installed
9     Cannot access /usr/sbin/pkgadd (client problem)
10     Package validation errors
11     Error adding patch to root template
12     Patch script terminated due to signal
13     Symbolic link included in patch
14     NOT USED
15     The prepatch script had a return code other than 0.
16     The postpatch script had a return code other than 0.
17     Mismatch of the -d option between a previous patch install and the current one.
18     Not enough space in the file systems that are targets of the patch.
19     $SOFTINFO/INST_RELEASE file not found
20     A direct instance patch was required but not found
21     The required patches have not been installed on the manager
22     A progressive instance patch was required but not found
23     A restricted patch is already applied to the package
24     An incompatible patch is applied
25     A required patch is not applied
26     The user specified backout data can’t be found
27     The relative directory supplied can’t be found
28     A pkginfo file is corrupt or missing
29     Bad patch ID format
30     Dryrun failure(s)
31     Path given for -C option is invalid
32     Must be running Solaris 2.6 or greater
33     Bad formatted patch file or patch file not found
34     The appropriate kernel jumbo patch needs to be installed

Comments

Configure NTP client on Solaris 10

You need to start by editing the /etc/inet/ntp.conf file

# cat /etc/inet/ntp.conf
# define driftfile
driftfile /etc/inet/ntp.drift

# define servers:
server pool.ntp.org
server pool.ntp.org

#
# define peers:
peer ntpb.server.comany.com
peer ntpc.server.comany.com

Now you need to start up the ntp deamon.

Below is how you would do it in soalris 10.

root@server#svcadm enable ntp
root@server#svcs |grep ntp
online 13:35:01 svc:/network/ntp:default

[root@server# ps -ef|grep ntp
root 1459 1188 0 13:37:23 console 0:00 grep ntp
root 1393 1 0 13:35:01 ? 0:00 /usr/lib/inet/xntpd

You can also check the status using ntpq command at the command line.  There are many other useful commands that can be used for ntpq, which you can see by issuing the command help.

ntpq> peers
remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
+64.247.17.248   99.150.184.201   2 u  597 1024  377   28.365   11.667  26.918
-ns1.keeleysam.c 99.150.184.201   2 u  579 1024  377   66.606   29.525 105.990
+server1-a.your. 64.202.112.75    2 u   98 1024  377   45.574   -4.273   1.323
*time.nist.gov   .ACTS.           1 u  316 1024  157   71.618   -3.789   0.983
ntpq>

Other wise use the approate /etc/init.d/ntpd  script

Some important notes to keep in mind when setting up ntp.

If the accuracy of a clock becomes too insufficient (off by more than about 17 minutes), NTP aborts the NTP daemon, with the assumption that something has gone wrong with either the client or server. In order to synchronize well with a server, the client needs to avoid step adjustments.1

Which means if you clock is more then 17 minutes off when settign up NTP you should set it by hand first because NTP gets angry if it is off by more then 17 seconds

Comments

restart sshd on solaris 10

# svcs|grep ssh
online Aug_15 svc:/network/ssh:default

# svcadm disable ssh

# svcadm enable ssh

or just
# svcadm restart ssh

Comments

« Previous Page « Previous Page Next entries »