Recently while stumbling my way through Solaris I came across a command I’m not familiar with.
/usr/bin/true is a shell script which when run will return true (execute successfully.)
Now, this code clearly goes back a bit into UNIX history and I was amused to see exactly how the developers coded it. With that in mind, and against all copyrights and rights reservations I now present the complete and unabridged code for /usr/bin/true:
bash-2.03$ more /usr/bin/true
# Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
# All Rights Reserved
# THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T
# The copyright notice above does not evidence any
# actual or intended publication of such source code.
#ident "@(#)true.sh 1.6 93/01/11 SMI" /* SVr4.0 1.4 */
Why on earth would you copyright this? Perhaps even more impressive is the point that this is version 1.6! What did previous versions of this look like? And why such a big deal about this being unpublished source code? Hell, it’s not even source code, let alone published.
Well, if you’re curious, this script is all comments, therefore when it is run it does nothing… Of course it does nothing quite successfully, therefore returning ‘true’ for the purposes of evaluating conditions.
I do have to give the developers of this credit for simplicity. I’m sure if it weren’t for the lawyers this could have been a one line file.
unix, solaris, source code, programming, development, opensource
To change the display resolution or refresh rate on a SunBlade 100 or similar Sun hardware isn’t as easy as it sounds. Or at least it’s not obvious. These directions are for an M64 type graphics accelerator. The steps are similar for other Sun graphics accelerators, but the command will be different (maybe
ffbconfig). Check your hardware documentation for details.
These coommands should be run as root. I recommend running these commands via ssh from another system. If you accidentally change the resolution to something that is not supported you won’t be able to see so well to change it back.
To change video settings you’ll first want to find out what the card and display are capable of.
m64config -res ?
This will print the resolution and refresh rate options you have. Where three numbers are listed this represents the horizontal and vertical resolution and refresh rate respectively.
The current configuration will be shown with a
 next to it. Write down the current resolution and refresh rate. There are a lot to choose from and you’ll want to know you can get back to one that works.
Configurations marked with a
 are not supported by the video card and will probably not work.
To change the settings run this command with the desired resolution/refresh rate. The
now forces the system to change these settings immediately rather than at next refresh.
m64config -res 1024x768x75 now
Your monitor should click and flicker and with luck will then come back at the new resolution. If it doesn’t you can change it back to the old settings by running the
m64config command with the orignal settings. You did write the old setting down like I told you to right?
solaris, sun, unix, system administration, sysadmin
Here’s a quick way to find out what hardware is installed in your Solaris system, including RAM, CPUs, PCI cards, and external devices. The output will usually include the size of each memory chip in the system.
The one trick to using this command is to make sure you use the backtick instead of a single quote around the
uname -i. The backtick is typically shift tilde and forces the command between the backticks to be executed and substituted in to that part of the command.
prtdiag actually displays system diagnostic information. I’ve used this on Solaris 7 through 10. The best parts is you do not even need to be root to execute this.
For more info on
prtdiag check out the man page.
solaris, sun, unix, system administration, sysadmin
It looks like Oracle is re-aligning themselves with Sun Solaris as their preferred 64-bit platform. In the March issue of Oracle Magazine they have a short announcement on the topic:
Oracle has chosen the Solaris 10, Sun Microsystems’ multiplatform, open source operating system, as its preferred development and deployment platform for most 64-bit architectures. Solaris 10 will be used throughout Oracle’s development organization, and Oracle will release and ship 64-bit versions of all Oracle products on Solaris prior to, or simultaneously with, release on other operating systems.
Check out the whole article here or sign up to get your free copy of Oracle Magazine.
Thanks to Jon G. for sending this on to me.
oracle, database, database administration, dba, systems administration, sysadmin, solaris, sun, sun microsystems, UNIX, open source, 64-bit
Here is an example of the kernel parameter settings I typically use for Oracle Database on Solaris. This is provided only as an example. You should not implement these settings without understanding what they do!
For a more in-depth explanation of these parameters see my other article Semaphore Settings and Shared Memory for Oracle Database.
You should always consult the Oracle documentation for your platform and release of Oracle for recommended kernel settings.
These settings reside in the /etc/system file on Solaris and must be setup by the root user. Any line beginning with an asterisk (*) is treated as a comment and not processed by the operating system. After these settings are implemented in teh /etc/system file the system will need to be rebooted for them to take affect.
* Example Semaphore and Shared Memory Settings *
* for Oracle on Solaris *
* Written by Jon Emmons *
* www.lifeaftercoffee.com *
* Shared memory settings
* shmmax sets the largest memory segment in bytes
* which can be allocated
* shmmin sets the smalles memory segment in bytes
* which can beallocated
* shmmni defines the maximum number of shared memory
* segments in the entire system
* shmseg defines the maximum number of shared memory
* segments which can be used by one process* Semaphore settings
* semmni sets the number of semaphore sets available
* semmsl sets the number of semaphores per set
* semmns sets the total number of semaphores available
* the actual semaphores available will be the lesser of
* (semmni * semmns) or semmns
* semopm determines the maximum number of operations
* per semop call
database, database administration, database tuning, dba, solaris, system administration, oracle