Monthly Archives: April 2010

[Solaris Tip] Getting System Information

You have a production Solaris box handed to you and wanted to check on basic system information. Surprise!!! Surprise!!! Here are some tips that hopefully could help UNIX Admins and alike to keep up into their sleeves.

Determining Whether a System Has 32-Bit or 64-Bit Solaris Capabilities Enabled

[email protected]# isainfo -v

How to Display Solaris Release Information

[email protected]# cat /etc/release

Displaying General System Information

[email protected]# showrev -a

Display installed patches on the System

[email protected]# showrev -p

Displaying a System’s Host ID Number

[email protected]# hostid

Displaying a System’s Product Name

[email protected]# prtconf -vb

Displaying a System’s Installed Memory

[email protected]# prtconf | grep Memory

Displaying the Date andTime

[email protected]# date

Displaying a System’s Processor Type

[email protected]# psrinfo -v

Display the locales currently installed on your system

[email protected]# localeadm -l

Set a System’sDate andTime Manually

[email protected]# date 0121173404 (mmddHHMM[[cc]yy])
Thu Jan 21 17:34:34 MST 2004

Edit message of the day

[email protected]# vi /etc/motd

Get the Disk information as well as soft/hard/transport errors

[email protected]# iostat -En

Get the OBP environment variables

[email protected]# eeprom


ok> printenv

Well, if you don’t like the system information you gathered and want to reconfigure the system, here it is:

[email protected]# sys-unconfig

There you have it! Some simple tips on getting and reconfiguring the System Information on Solaris. Will update this list as we go along.

See you on my next note!!!

How to Extend Filesystem on AIX using JFS

We are now going to discuss extending a filesystem under JFS on AIX machine. It is really pretty simple, actually in just 3 commands (including the checking) we could easily extend an AIX filesystem. But for the benifit of everybody, I would include extra checking and commands for us to fully appreciate this task.

Check your filesystems current size and % utilization:

[[email protected]] / > df -g /ora/fs1263/u06
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
/dev/or1263u06    150.00     53.07   65%      118     1% /ora/fs1263/u06

Check your Logical Volume and see what Volume Group it resides:

[[email protected]] / > lslv or1263u06
LOGICAL VOLUME:     or1263u06              VOLUME GROUP:   datavg
LV IDENTIFIER:      000000000108ffffffff.6 PERMISSION:     read/write
VG STATE:           active/complete        LV STATE:       opened/syncd
TYPE:               jfs2                   WRITE VERIFY:   off
MAX LPs:            2048                   PP SIZE:        256 megabyte(s)
COPIES:             1                      SCHED POLICY:   parallel
LPs:                600                    PPs:            600
STALE PPs:          0                      BB POLICY:      relocatable
INTER-POLICY:       minimum                RELOCATABLE:    yes
INTRA-POLICY:       middle                 UPPER BOUND:    32
MOUNT POINT:        /ora/fs1263/u06        LABEL:          /ora/fs1263/u06
Serialize IO ?:     NO

Check the information regarding the Volume Group, this includes the free PP’s and PP size:

[[email protected]] / > lsvg datavg
VOLUME GROUP:       datavg             VG IDENTIFIER:  000000000108ffffffff
VG STATE:           active             PP SIZE:        256 megabyte(s)
VG PERMISSION:      read/write         TOTAL PPs:      2626 (672256 megabytes)
MAX LVs:            256                FREE PPs:       576 (147456 megabytes)
LVs:                19                 USED PPs:       2589 (662784 megabytes)
OPEN LVs:           19                 QUORUM:         4 (Enabled)
TOTAL PVs:          7                  VG DESCRIPTORS: 7
STALE PVs:          0                  STALE PPs:      0
ACTIVE PVs:         7                  AUTO ON:        yes
MAX PPs per VG:     32512
MAX PPs per PV:     1016               MAX PVs:        32
LTG size (Dynamic): 256 kilobyte(s)    AUTO SYNC:      no
HOT SPARE:          no                 BB POLICY:      relocatable

If you have available PPs for your desired filesystem, let us extend it:

[[email protected]] / > chfs -a size=+134G /ora/fs1263/u06
Filesystem size changed to 595591168

How is our filesystem now:

[[email protected]] / > df -g /ora/fs1263/u06
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
/dev/or1263u06    284.00    187.05   35%      118     1% /ora/fs1263/u06

If in case you encounter an error message:

0516-787 extendlv: Maximum allocation for logical volume or1263u06
is 1024.

Check on the maximum LPs for the Logical Volume – this must be increased to accomodate the new size. Where LPs = LV in MB / LP in MB then change the maximum LP to the ouput:

[[email protected]] / > chlv -x 2048 or1263u06

There you have it from start to finish with some troubleshooting tips.

See you on my next note!!!

Creating ISO image under Solaris

Sometimes you don’t want to load CDs or DVDs, and as HDD space becomes cheaper and cheaper, we want our CDs copied on our Hard Drive. Below is how to do it on a Solaris machine:

[email protected]# mkisofs -l -L -r -o /folder/your-image.iso /directory/to/image/

the parameters used are as follows:

-l Allow full 31 character filenames
-L This option will get POSIX.1-2001 semantics with mkisofs-2.02.(but you
may use -allow-leading-dots)
-r This is like the -R option, but file ownership and modes are set to 
more useful values. The uid and gid are set to zero, because they are 
usually only useful on the author’s system, and not useful to the client
-o filename is the name of the file to which the iso9660 filesystem image 
should be written.

See you on my next note!!!