Tips, tricks and other useful bits and pieces for Solaris.

Changing Hostname

When you need to change the hostname of a Solaris box it's hard to remember all the files it stashes it's name away in, and if you miss some it can cause some odd problems. The trick is you have to make sure that the hostname is changed in all of these files:

Creating a Swap file

When you need more swap space and rebuilding the partition isn't a realistic alternative you need to create a swap file (also from Solaris 2.6 an on Sun claims that there is no performance difference between using a swap file and a swap partition). Here are the steps:

  1. Create the swap file (make sure there's enough room on the partition you create it):

    # mkfile 1000m /SWAPFILE

  2. Add the file to the swap space:

    # swap -a /SWAPFILE

  3. Check to make sure that everything worked as it should have:

    # swap -l or # swap -s

  4. If you want the addition to swap to persist after a reboot you need to add a line to /etc/vfstab like this:

    /SWAPFILE -     -       swap    -       no      -

Forcing Ethernet Duplex and Speed

In the below examples it's assumed that your ethernet interface is called hme0. Some newer suns you eri0 and older ones use le0 or bme0 as well (specialized cards can get you yet more names). Substitute your ethernet device name as appropriate.

NFS Troubleshooting

Want to mount a share from a NetworkAppliance file server and guarentee that you are NFS version 3 and using TCP? Try this:

Now want to know if your current NFS sessions are using TCP or UDP as the transport protocol?

Look for errors on the interface:

Building Packages

No real information here since all my documentation got lost last time if formatted my laptops hard drive (and discovered I'd backed up the wrong directory ... doh.). However here is a link that looks useful:


CategorySoftware

SunSolaris (last edited 2005-12-02 15:46:20 by nashgwi)