Archive for the ‘Solaris’ Category

Adding and Configuring New Network Interface in Solaris 10

May 19th, 2025, posted in Solaris
Share
ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
e1000g0: flags=1000843 mtu 1500 index 2
inet 192.168.1.1 netmask ffffff00 broadcast 192.168.1.255
ether 0:c:29:21:12:f5
bash-3.2# ifconfig -a plumb
ifconfig: SIOCSLIFNAME for ip: e1000g0: already exists
bash-3.2#
bash-3.2# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
e1000g0: flags=1000843 mtu 1500 index 2
inet 192.168.1.1 netmask ffffff00 broadcast 192.168.1.255
ether 0:c:29:21:12:f5
e1000g1: flags=1000842 mtu 1500 index 3
inet 0.0.0.0 netmask 0
ether 0:c:29:21:12:ff
bash-3.2#
bash-3.2# ifconfig e1000g1 10.10.10.1 netmask 255.255.255.0 up
bash-3.2# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
e1000g0: flags=1000843 mtu 1500 index 2
inet 192.168.1.1 netmask ffffff00 broadcast 192.168.1.255
ether 0:c:29:21:12:f5
e1000g1: flags=1000843 mtu 1500 index 3
inet 10.10.10.1 netmask ffffff00 broadcast 10.10.10.255
ether 0:c:29:21:12:ff
bash-3.2# ls -ltr /etc/hostname*
-rw-r–r– 1 root root 9 Jan 31 06:12 /etc/hostname.e1000g0
bash-3.2# gedit /etc/hostname.e1000g1
bash-3.2# ls -ltr /etc/hostname*
-rw-r–r– 1 root root 9 Jan 31 06:12 /etc/hostname.e1000g0
-rw-r–r– 1 root root 14 Jan 31 06:46 /etc/hostname.e1000g1
bash-3.2# reboot
Share

Error: Your “crontab” on unexpected end of line. This entry has been ignored

January 20th, 2024, posted in Solaris
Share

Everytime you edit your crontabe file, the error “Your “crontab” on <server> unexpected end of line. This entry has been ignored” is sent to the users email. This happens if there is a blank line in your crontab file.


For instance, in the following crontab file there is a blank line between the last two cron jobs.

root@sunsolaris# crontab -l
# The root crontab should be used to perform accounting data collection.
#
# The rtc command is run to adjust the real time clock if and when
# daylight savings time changes.
#
10 1 * * 0,4 /etc/cron.d/logchecker
10 2 * * 0  /usr/lib/newsyslog
15 3 * * 0 /usr/lib/fs/nfs/nfsfind

30 4 * * * /usr/local/bin/disk_check,sh
;;;;
;;;
;;
;

To resolve the problem edit the crontab file and look for the blank line and delete the line. In the above, after editing the crontab, it should look lie the follows:

root@sunsolaris# crontab -l
# The root crontab should be used to perform accounting data collection.
#
# The rtc command is run to adjust the real time clock if and when
# daylight savings time changes.
#
10 1 * * 0,4 /etc/cron.d/logchecker
10 2 * * 0  /usr/lib/newsyslog
15 3 * * 0 /usr/lib/fs/nfs/nfsfind
30 4 * * * /usr/local/bin/disk_check,sh
;;;
;;
;

You can see the  blank line removed from the crontab file.

Share

Memory missing in Solaris 10 with ZFS

January 7th, 2024, posted in Solaris
Share

Ever wondered all the precious memory installed on your server has gone? Among many other reasons, if you are running Solaris 10 and use ZFS file system then there may be your answer.

ZFS Adaptive Replacement Cache (ARC) tends to use up to 75% of the installed physical memory on servers with 4GB or less and upto everything except 1GB of memory on servers with more than 4GB of memory to cache data in a bid to improve performance.

This can significantly affect performance on mission critical servers running Databases etc.

To identify how much memory uses:

# kstat -m zfs | grep size

        data_size                       18935877120
        hdr_size                        66041496
        l2_hdr_size                     0
        l2_size                         0
        other_size                      11310112
        size                            19013228728

Here “19013228728” (approx 18G) indicates the total memory used by ZFS.

Alternatively, the following mdb command show ZFS ARC usage:

# echo "::arc" | mdb -k|grep size
size                      =      2048 MB
hdr_size                  =  12493584
data_size                 = 2048608256
other_size                =  86475456
l2_size                   =         0
l2_hdr_size               =         0

It makes sense to cap the maximum ZFS ARC can use on servers where memory requirement for other services is more.

To set the maximum limit for ZFS ARC, edit /etc/system file and add the following line

set zfs:zfs_arc_max=2147483648

where 2147483648 restricts the usage to a maximum of 2GB physical memory. Unfortunately, this requires a reboot for the setting to take effect and cannot be dynamically changed.

Share

Free Hands On Practice Lab For Solaris 11

July 1st, 2023, posted in Solaris
Share

Hi, I was doing some researching on database migration from AIX and Solaris and I found some interesting stuff..

Oracle has provided some free lab session for new Solaris administrators to get their hands dirty..
If you are new to Unix and want to try them out, you can check out the links below !!

Just a side note, I came to know about Wintel environments, either  Oracle/MSSQL on Windows Server 2008/2012. It was a utter pain to work with the permissions and services. Unix/Linux is still better enterprise operating systems.

Share