New and different in Solaris 11
New and different in Solaris 11Solaris 11 is binary compatible to Solaris 10 and application binaries are working well on Solaris 11. It's as well different to Solaris 10 (surprise...) and Solaris 11 Express since it's providing all the innovation which happened in the last 6 years. Users who are deeply entrenched with Solaris 10 (like me) have to cope with a number of changes which have the following background
New Solaris 11 Philosophies
Generational Change in regards of UNIX Search Paths
Solaris 10 is adhering to the first Unix generation (1970- mid nineties) command philosophy
- I use commands and shells dependent on my personal preference
- Software is being installed in many different places on the system.
- I configure my command search path and precedence depend on my personal need in my login environments
- I'm maintaining all my individual settings on new systems and accounts.
- I grew up with csh and sh
This first generation of Unix users has been succeeded by users who grew up with Linux and Windows systems. Their approach is different:
- I'm familiar with the GNU tools
- I expect all important commands to be found in /usr/bin
- bash or ksh are the shells of my preference
- I'm less familiar with account and system specific environment configuration. New software will introduce itself to /usr/bin
Solaris 11 is embracing this new generation of users
OS Boundaries: What can I expect to be found on my System?
Solaris 10 has been a traditional operation system which got installed by most users from a DVD with three major choices
- Solaris 10 Runtime only
- Full OS
- Full OS plus OEM
Adding packages to Solaris has been a more heavy weight process:
- Find install medium with the correct processor architecture
- Copy it to system
- Add System V package (cross fingers and hope that all dependencies are being met)
- Go back to step one if your packages requested more packages
Solaris 11 comes with the Image Packaging Systems (IPS) which allows to
- simplify the discovery and installation process through online network repositories
- enforces and supports automatic installation of all required and dependent packages
- increase the security of an installation by only installing the components required to perform the job
The one and only downside for software and scripts written for Solaris 10 is that some packages are not guaranteed to be installed upfront. Application developers of applications are strongly advised to check the existence of all required components before installation. IPS itself will be happy to answer these questions. Installing your software trough IPS technology itself is actually the way to go.
GNU Tools
Solaris 10 has been configured in such a way that it installed System V commands as "preferred" commands. XPG4 standardized commands have been installed by default in order to adhere to standards. BSD commands have been installed for backward compatibility reasons. GNU tools didn't belong to the standard installation.
Solaris 11 is following the philosophy that all important commands can be found in /usr/bin and the GNU tools are being installed by default. XPG4 compliant commands are now as well in the default location. BSD commands (/usr/ucb) are deprecated and their usage is being discouraged by making the package optional. The BSD commands are however available and supported.
Mitigating the Changes
The general problem of most users is, that they don't care a lot for the origin of a command. They check the different flavors. They use the first command which is solving the problem and they move on with their life...
The Solaris engineering did an outstanding job in rearranging the directories, commands and soft and hard links in such a way that almost everything works like before.
The collection below is an incomplete, yet growing list of technical articles which help to implement applications in a uniform way to operate them on Solaris 10 and Solaris 11 with a single source base.
- 14723 views
Oracle Solaris 11 Early Adopter Version available for Download (Final Functionality)
Oracle Solaris 11 Early Adopter Version available for Download (Final Functionality)Update
The original page is outdated. Oracle released Solaris 11. It is available through the Oracle download pages.
The early adopter release shouldn't be used anymore. It can't meet the qualitity standards of a servicable main stream OS version.
Original Content
Oracle is getting closer to the release of Solaris 11.
Oracle offers the Solaris 11 Early Adopter release for their OPN Gold levels members to download. The page states that It offers new features and the final functionality of Oracle Solaris 11.
The offer comes with a draft version of the documentation and a special early adopter license.
Time to take a test drive with Solaris 11 final functionality...
- 8893 views
Solaris 11 Changes: Changing the Node Name (nodename) of a System
Solaris 11 Changes: Changing the Node Name (nodename) of a SystemThe nodename is getting managed through SMF in Solaris 11. There is now one central place to manage the nodename.
The change of the nodename requires an update in a SMF service property and a restart of the service:
svccfg –s svc:/system/identity:node setprop config/nodename = “NewHostname”
svcadm refresh svc:/system/identity:node
svcadm restart svc:/system/identity:node
The current node name can be checked with the following command:
svcprop -p config/nodename svc:/system/identity:node
- 9317 views
Solaris 11 Changes: Managing Name Services (formerly known as /etc/resolv.conf)
Solaris 11 Changes: Managing Name Services (formerly known as /etc/resolv.conf)Oracle Solaris 11 is leaving the SVR4 file based system administration of Solaris 10 behind. It uses SMF to manage the configuration state of many services.
The /etc/nsswitch.conf configuration file became a read only file which reflects the current state of the SMF service. Changes in the name resolution now require the following thress steps
- Script the name vlaue pairs to be changed (strongly recommended)
- update the SMF properties with the command svccfg
- restart the name-service with the command svcadm
This can be done with a script like the one below:
#!/bin/ksh -pme=${0##*/}
tmpfile=$(/usr/bin/mktemp -t ${me}.XXXXXX)
cat > $tmpfile <<EOF
setprop config/password = astring: ("files ldap")
setprop config/group = astring: ("files ldap")
setprop config/host = astring: ("files dns")
setprop config/network = astring: files
setprop config/protocol = astring: files
setprop config/rpc = astring: files
setprop config/ether = astring: files
setprop config/netmask = astring: files
setprop config/bootparam = astring: files
setprop config/publickey = astring: files
setprop config/netgroup = astring: ldap
setprop config/automount = astring: ("files ldap")
setprop config/alias = astring: files
setprop config/service = astring: files
setprop config/printer = astring: ("user files ldap")
setprop config/project = astring: files
setprop config/auth_attr = astring: files
setprop config/prof_attr = astring: files
setprop config/tnrhtp = astring: files
setprop config/tnrhdb = astring: files
exit
EOFsvccfg -s svc:/system/name-service/switch -f $tmpfile || exit
rm $tmpfile
svcadm refresh svc:/system/name-service/switch:default
Will Fiveash from Oracle published this script in his blog.
- 10728 views
Solaris 11 Changes: Where is /usr/ucb ?
Solaris 11 Changes: Where is /usr/ucb ?Solaris 11 Express as a predecessor to Solaris 11 ist out and a few things changed and improved...
The directory /usr/ucb isn't there anymore ...
The usage of the BSD commands in /usr/ucb has always been discouraged. The BSD commands have been provided as a backwards compatibility option for SunOS 4.1. People used them in Solaris 2 since they had interesting features. It has never been a good idea to rely on them in Solaris 2
The problem: /usr/ucb isn't available in the standard Solaris 11 (Express) installation!
The solution: Install an optionally available package with the following command to get them:
$ pkg add compatibility/ucb
You'll get the following commands after the installation:
sschneid@scalingbits:~$ ls -l /usr/ucb total 433 drwxr-xr-x 2 root bin 3 2011-01-20 13:46 amd64 lrwxrwxrwx 1 root root 11 2011-01-20 13:46 arch -> ../bin/arch -rwxr-xr-x 1 root bin 7916 2011-01-20 13:46 basename -rwxr-xr-x 1 root bin 8156 2011-01-20 13:46 biff -rwxr-xr-x 1 root bin 13072 2011-01-20 13:46 chown lrwxrwxrwx 1 root root 12 2011-01-20 13:46 clear -> ../bin/clear -rwxr-xr-x 1 root bin 1417 2011-01-20 13:46 df -rwxr-xr-x 1 root bin 969 2011-01-20 13:46 du lrwxrwxrwx 1 root root 11 2011-01-20 13:46 e -> ../bin/edit -rwxr-xr-x 1 root bin 7908 2011-01-20 13:46 echo lrwxrwxrwx 1 root root 11 2011-01-20 13:46 edit -> ../bin/edit lrwxrwxrwx 1 root root 11 2011-01-20 13:46 ex -> ../bin/edit -rwxr-xr-x 1 root bin 22912 2011-01-20 13:46 expr -r-xr-xr-x 1 root bin 1397 2011-01-20 13:46 fastboot -r-xr-xr-x 1 root bin 1394 2011-01-20 13:46 fasthalt -r-xr-xr-x 1 root bin 1412 2011-01-20 13:46 file lrwxrwxrwx 1 root root 13 2011-01-20 13:46 finger -> ../bin/finger lrwxrwxrwx 1 root root 10 2011-01-20 13:46 fmt -> ../bin/fmt lrwxrwxrwx 1 root root 11 2011-01-20 13:46 fold -> ../bin/fold -rwxr-xr-x 1 root bin 12704 2011-01-20 13:46 from lrwxrwxrwx 1 root root 10 2011-01-20 13:46 ftp -> ../bin/ftp -rwxr-xr-x 1 root bin 12640 2011-01-20 13:46 groups lrwxrwxrwx 1 root root 11 2011-01-20 13:46 head -> ../bin/head lrwxrwxrwx 1 root root 13 2011-01-20 13:46 hostid -> ../bin/hostid lrwxrwxrwx 1 root root 15 2011-01-20 13:46 hostname -> ../bin/hostname drwxr-xr-x 2 root bin 3 2011-01-20 13:46 i86 -rwxr-xr-x 1 root bin 17196 2011-01-20 13:46 install -rwxr-xr-x 1 root bin 12508 2011-01-20 13:46 ln lrwxrwxrwx 1 root root 13 2011-01-20 13:46 logger -> ../bin/logger -rwxr-xr-x 1 root bin 18732 2011-01-20 13:46 ls lrwxrwxrwx 1 root root 11 2011-01-20 13:46 mach -> ../bin/mach lrwxrwxrwx 1 root root 12 2011-01-20 13:46 mail -> ../bin/mailx lrwxrwxrwx 1 root root 12 2011-01-20 13:46 Mail -> ../bin/mailx -r-xr-xr-x 1 root bin 13124 2011-01-20 13:46 mkstr lrwxrwxrwx 1 root root 11 2011-01-20 13:46 more -> ../bin/more lrwxrwxrwx 1 root root 14 2011-01-20 13:46 netstat -> ../bin/netstat lrwxrwxrwx 1 root root 11 2011-01-20 13:46 page -> ../bin/more lrwxrwxrwx 1 root root 15 2011-01-20 13:46 pagesize -> ../bin/pagesize -rwxr-xr-x 1 root bin 7940 2011-01-20 13:46 printenv -r-xr-xr-x 83 root bin 8420 2010-11-05 16:02 ps lrwxrwxrwx 1 root root 19 2011-01-20 13:46 quota -> ../lib/fs/ufs/quota lrwxrwxrwx 1 root root 10 2011-01-20 13:46 rcp -> ../bin/rcp lrwxrwxrwx 1 root root 12 2011-01-20 13:46 rdate -> ../bin/rdate lrwxrwxrwx 1 root root 12 2011-01-20 13:46 rdist -> ../bin/rdist lrwxrwxrwx 1 root root 13 2011-01-20 13:46 renice -> ../bin/renice lrwxrwxrwx 1 root root 6 2011-01-20 13:46 reset -> ./tset lrwxrwxrwx 1 root root 13 2011-01-20 13:46 rlogin -> ../bin/rlogin lrwxrwxrwx 1 root root 10 2011-01-20 13:46 rsh -> ../bin/rsh lrwxrwxrwx 1 root root 14 2011-01-20 13:46 ruptime -> ../bin/ruptime -rwxr-xr-x 1 root bin 12344 2011-01-20 13:46 rusage lrwxrwxrwx 1 root root 11 2011-01-20 13:46 rwho -> ../bin/rwho lrwxrwxrwx 1 root root 13 2011-01-20 13:46 script -> ../bin/script -r-xr-xr-x 1 root bin 32632 2011-01-20 13:46 sed -rwxr-xr-x 1 root bin 24724 2011-01-20 13:46 shutdown -rwxr-xr-x 1 root bin 35444 2011-01-20 13:46 stty -rwxr-xr-x 1 root bin 8144 2011-01-20 13:46 sum lrwxrwxrwx 1 root root 11 2011-01-20 13:46 tail -> ../bin/tail lrwxrwxrwx 1 root root 11 2011-01-20 13:46 talk -> ../bin/talk lrwxrwxrwx 1 root root 12 2011-01-20 13:46 tcopy -> ../bin/tcopy lrwxrwxrwx 1 root root 13 2011-01-20 13:46 telnet -> ../bin/telnet -rwxr-xr-x 1 root bin 12812 2011-01-20 13:46 test lrwxrwxrwx 1 root root 11 2011-01-20 13:46 tftp -> ../bin/tftp -rwxr-xr-x 1 root bin 12832 2011-01-20 13:46 touch -rwxr-xr-x 1 root bin 12328 2011-01-20 13:46 tr -rwxr-xr-x 1 root bin 24084 2011-01-20 13:46 tset lrwxrwxrwx 1 root root 13 2011-01-20 13:46 uptime -> ../bin/uptime -rwxr-xr-x 1 root bin 8500 2011-01-20 13:46 users lrwxrwxrwx 1 root root 15 2011-01-20 13:46 vacation -> ../bin/vacation lrwxrwxrwx 1 root root 12 2011-01-20 13:46 vedit -> ../bin/vedit lrwxrwxrwx 1 root root 11 2011-01-20 13:46 vi -> ../bin/edit lrwxrwxrwx 1 root root 11 2011-01-20 13:46 view -> ../bin/edit -r-xr-xr-x 1 root bin 17396 2011-01-20 13:46 vipw lrwxrwxrwx 1 root root 13 2011-01-20 13:46 vmstat -> ../bin/vmstat lrwxrwxrwx 1 root root 8 2011-01-20 13:46 w -> ../bin/w lrwxrwxrwx 1 root root 9 2011-01-20 13:46 wc -> ../bin/wc -rwxr-xr-x 1 root bin 14512 2011-01-20 13:46 whereis -rwxr-xr-x 1 root bin 8052 2011-01-20 13:46 whoami lrwxrwxrwx 1 root root 12 2011-01-20 13:46 whois -> ../bin/whois lrwxrwxrwx 1 root root 11 2011-01-20 13:46 xstr -> ../bin/xstr
The listing shows that many commands are soft links to their equivalent commands in /usr/bin.
Scripts with hard coded /usr/ucb commands should still work in Solaris 11 Express as they did in Solaris 10 as long as the optional package gets installed. The binaries seem to be smart binaries like the ps command. It behaves like a /usr/ucb/ps command if it is being callled with a full path or without a leading "-" in the option clause.
Conclusions
- Avoid using /usr/ucb commands in Solaris 2 systems whenever possible
- Install the compatibility/ucb package from Solaris 11 Express if absolutely needed.
- Be aware that a number of Solaris commands got folded into a single one which is leading to a polymorphic behavior
- Advantages of NOT having /usr/ucb installed
- fewer packages and files
- fewer needs for upgrades and patching
- fewer security vulnerabilities due to fewer files and commands installed on the system
- 31231 views
Solaris 11 Changes: Where is the BSD style ps command?
Solaris 11 Changes: Where is the BSD style ps command?Short Answer: In /usr/bin/ps
Background
Oracle's new operating system Solaris 11 (Express) is a modular operating system based on the IPS installation technology. This feature has been used by Oracle to make the BSD commands in the directory /usr/ucb an optional package which doesn't get installed by default (see previous post). The BSD commands shouldn't be used since they're a backwards compatibility courtesy allowing 20th century applications written for SunOS 4 to operate without changes.
The Conflict: The BSD ps command is outdated and cool at a time
The BSD ps command doesn't truncate output after 80 lines like it's brother from the System V side of the family (/usr/bin/ps)
Getting the best from both Worlds
The good news is that the Oracle developers solved the problem and they documented it in the sources: They ship only one binary which implements BSD and System V at a time! The only trick is to know how to make the command act in one or the other way:
Suboptimal Solution
Install the ucb compatibility package and use a hard coded link to call /usr/ucb/ps.
Oracle uses a hard link to /usr/bin/ps and the /usr/bin/ps binary behaves like a BSD command if it finds any notion of the string "ucb" in it's path of the executable.
This option is not recommended since you will want to make your application ready for the 21th century and leave the BSD paths behind you.
Recommended Solution
Call the command with ps or /usr/bin/ps
- omit the "-" character as first character in the first argument
- provide a BSD compliant parameter list (without the "-")
The binary will sort it out and behave like the BSD flavor of the command.
The beauty with this solution is
- No directory /usr/ucb is required in the search path
- /usr/ucb in the search path will not do any harm (Solaris 10)
- the scripts are using the correct BSD syntax
- maintenance costs for the next generation will be lower
Food for Thought
You will want to have a look for the Solaris 10 and 11 pargs and pgrep commands. They will most likely solve your problem as well and you can leave all worries about BSD style commands in a System V OS behind you.
- 14089 views
/usr/bin/ps with no dash runs in UCB mode -- no official doc?
Is there is any official Oracle documentation on this mode? Solaris 11 ps man page doesn't mention it, and I've not been able it to find anywhere else.
- Log in to post comments
Solaris 11 Changes: Where is /usr/ucb/whoami ?
Solaris 11 Changes: Where is /usr/ucb/whoami ?Answer: It's still available through /usr/ucb/whoami . The difference to Solaris 10 is, that this command became part of an optional package as described in a previous post. The BSD commands are still available through this package. They are deprecated and it is not a good idea to use this command since it may be removed in future.
Just in case: The whoami command displays the effective user:
sschneid@krachkaste:/home/sschneid $ whoami sschneid
Option for Solaris 11 (only...)
Stop using this command in /usr/ucb/whoami and use the GNU version of the command which is available in /usr/bin/whoami. The command is a different implementation. It doesn't matter since whoami has no options and it's doing the same by showing the effective user.
Anyone who is using a search path with /usr/bin before /usr/ucb/bin and a relative command invocation will not see any problems in Solaris 10 or 11.
What to do if the command is hard coded and it is supposed to work on Solaris 10 and Solaris 11 without any changes in the script?
Option for Solaris 10 and Solaris 11
The pity is that /usr/ucb/whoami is available by default only on Solaris 10. /usr/bin/whoami is available only on Solaris 11.
Solution: Switch from the whoami command to the
/usr/xpg4/bin/id -un
command. It shows as well the effective user and it is available on both versions of Solaris by default in the same place
It's not an option to use /usr/bin/id on Solaris 10 since it is not the xpg4 compliant implementation and it doesn't accept the -un option. The Solaris 11 version of /usr/bin/id is able to master the trick since it is xpg4 compliant.
Alternative option (honorable mention): The commmand
$ expr "`id`" : '.*(\(.*\)) gid='
will do the trick as well on Solaris 10 as well as 11. It extracts the effective user with expr. (contributed by Joachim Wolf).
- 19971 views
Solaris 11 EOF (End of Feature) Notices posted
Solaris 11 EOF (End of Feature) Notices postedOracle posted a new page with Solaris 10 features which will not be part of Solaris 11.
Solaris developers shouldn't use these frameworks if they want their application to work smoothly with Solaris 11. The list consists of archaic commands, drivers, features and legacy hardware which shouldn't be used in any application developed in the last 10 years. It's unlikely that it'll have impact on existing applications.
It's however a good opportunity for a spring cleaning in scripts, locales and legacy asian localization libraries.
- 8205 views