Showing posts with label Solaris. Show all posts
Showing posts with label Solaris. Show all posts

Tuesday 6 February 2018

How to Set a Solaris 11 Machine's NIS Domain Name

If domainname command not showing any output then you need to check either defaultdomain or NIS domain is configured or not.

Steps which we need to follow to set the NIS domain name as describe below.

1. Please run  "cat /etc/defaultdomain" command and check the output that domain is set or not.

    #domainname

The above command shows you the current domain name on the server, if no output is display you need to set the domain by below command.

   #domainname UNIX

Run the below command to check the output again.

   #domainname
   UNIX

You can see the output. All the above command is used for checking and setting the domain name on the Solaris operating server.

2. If you want to set the domain using NIS, then first please check the NIS/DOMAIN service is running or not

root@sun:~# svcs status nis/domain
STATE          STIME    FMRI
disabled       18:20:04 svc:/network/nis/domain:default

In my Solaris machine, currently NIS domain services is stop, we will start it later once we will configured the NIS domain name on the Solaris server.

3. Now you need to configure the NIS domain for your machine ( in my case - UNIX is my domain name)

root@sun:~# svccfg -s svc:/network/nis/domain setprop config/domainname = UNIX

If you see the above command, "svccfg" command is used to configure the domain and set the proper properties.

4. In the final step once the configuration has been completed you need to refresh & enable the NIS domain service again.

root@sun:~# svccfg -s nis/domain:default refresh
root@sun:~# svcadm enable nis/domain

You can check the NIS domain service status as describe in step 2. 

5. Now you can verify the domain name using below command so we can ensure that the NIS domain name has been set successfully. 

root@sun:~# domainname
UNIX
The above command output show "UNIX" domain name which we set during the configuration, so using these above method we can easily set the NIS domain name on the Solaris operating server.

Thursday 21 December 2017

Solaris Server process Monitoring tool- prstat

We have different type of tools and command which are used in Solaris or other Unix system to monitor the system process. But if we are talking about only Sun Solaris server then we have very good process tool which is called "prstat".

In this post, we will find that how prstat is work on the Solaris platform.

   !-[solaris]# prstat

When you run the above command on the command line you will get the below output on the CLI screen which are refreshing in every few seconds and sorting all the information regarding the system resource.

  PID USERNAME  SIZE   RSS STATE  PRI NICE      TIME  CPU PROCESS/NLWP

 21322 root      11M 3236K cpu0    59    0   0:00:00 0.0% prstat/1

 21323 root      18M 4788K sleep   59    0   0:00:00 0.0% sshd/1

 22345 root      10M 2188K sleep   59    0   0:00:00 0.0% bash/1

   584 root       13M 3832K sleep   59    0   0:01:59 0.0% nscd/51

   154 root       13M 2068K sleep   59    0   0:00:00 0.0% syseventd/18

   183 root     1772K  776K sleep   59    0   0:00:13 0.0% utmpd/1

   538 root       11M 2572K sleep   59    0   0:00:00 0.0% picld/4

Total: 12 processes, 31 lwps, load averages: 0.00, 0.00, 0.00


This is a quick view of the prstat command but if you wanted to get a different view of the same info, like a summary of what users own these CPU consuming processes

   !-[solaris]# prstat -a

If you run prstat with the -a option (prstat -a) you will get an output similar to the default one, but the last few lines of it will be used for providing a really useful report of the users consuming top system resources.


  PID USERNAME  SIZE   RSS STATE  PRI NICE      TIME  CPU PROCESS/NLWP

 21322 root      11M 3236K cpu0    59    0   0:00:00 0.0% prstat/1

 21323 root      18M 4788K sleep   59    0   0:00:00 0.0% sshd/1

 22345 root      10M 2188K sleep   59    0   0:00:00 0.0% bash/1


 NPROC USERNAME  SWAP   RSS MEMORY      TIME  CPU

     5 root      52M   13M   1.3%   0:00:00 0.0%

    50 root      841M  571M    56%   0:22:22 0.0%

     2 daemon     17M 4520K   0.4%   0:00:04 0.0%

Total: 12 processes, 31 lwps, load averages: 0.00, 0.00, 0.00

We have different type of syntax which we can used to monitor the Solaris server process which are listed below.

!-[solaris]# prstat -L  -> This shows thread per line instead of one process per line
!-[solaris]# prstat -s -> prstat output can be sorted using set of sub-options .sub options are                  cpu,pri,rss,size,time 
!-[solaris]# prstat -t  -> It provides complete users resource utilization.
!-[solaris]# prstat -Z  -> It provides summary per local zone.

Monday 30 October 2017

How to change a disk in SVM Solaris volume manager

In this post, I will take my sparc server machine. My Sun Sparc server consist 2 hard disk, let us assume the server has 2 hard disk: c0t0d0 and c0t1d0. We will assume c0t0d0 failed and need to be replaced.

Step by Step Method as described below:

1. In the initial step, we will find that which hard disk is down or faulty. To check this we will used "format" command.

!-[solaris]## format
       0. c0t0d0 <__drive type unknown__>
          /pci@0,600000/pci@0/pci@8/pci@0/scsi@1/sd@0,0
       1. c0t1d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
          /pci@0,600000/pci@0/pci@8/pci@0/scsi@1/sd@1,0

If you see the "format" command output, we have two disk "c0t0d0,c0t1d0". Disk "c0t0d0" is in faulty state and it's down, You can see the drive type is in unknown state.

2. If you are running the "metastat" command you can see the status of hard disk which is show status in "need maintenance".

!-[solaris]## metastat    # will show status in "need maintenance"

        flags           first blk       block count
     a        u         16              8192            /dev/dsk/c0t0d0s7
     a        u         8208            8192            /dev/dsk/c0t0d0s7
     a    p  luo        16              8192            /dev/dsk/c0t1d0s7
     a    p  luo        8208            8192            /dev/dsk/c0t1d0s7

!-[solaris]## metadb -d c0t0d0s7
!-[solaris]## metadb

Using above command we delete metadb on failing disk and check that metadb on the other disk.

4. Now, we will unconfigure the corresponding disk which is down right now. This is the main step of this post so you can more careful while running the command which is given below.

!-[solaris]## cfgadm -al
!-[solaris]## cfgadm -f -c unconfigure c0::dsk/c0t0d0
!-[solaris]## cfgadm -al

Using cfgadm command we will unconfigure the c0t0d0 faulty hard disk so that we will replace the down hard disk in next step.

5. Now you can change the faulty disk to new one and reconfigure it again with same name.

!-[solaris]## cfgadm -c configure c0::dsk/c0t0d0
!-[solaris]## cfgadm -al

6. In this steo we will duplicate partitionning schema of first disk to the second and create metadb.

!-[solaris]## prtvtoc /dev/rdsk/c0t1d0s2 | fmthard -s - /dev/rdsk/c0t0d0s2
!-[solaris]## metadb -a -f -c2 /dev/dsk/c0t0d0s7

7. In second last step you will run all the below command for replacement of the failinf SVM partition.

!-[solaris]## metastat
!-[solaris]## metareplace -ef d4 c0t0d0s4
!-[solaris]## metareplace -ef d3 c0t0d0s3
!-[solaris]## metareplace -ef d1 c0t0d0s1
!-[solaris]## metareplace -ef d0 c0t0d0s0
!-[solaris]## metareplace -ef d5 c0t0d0s5
!-[solaris]## metareplace -ef d6 c0t0d0s6
!-[solaris]## metasync d0
!-[solaris]## metasync d1
!-[solaris]## metasync d3
!-[solaris]## metasync d4
!-[solaris]## metasync d5
!-[solaris]## metasync d6
!-[solaris]## metasync d7

8. In final step you need to make the disk bootable so that operating system will be boot on the mirror disk.

!-[solaris]## installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c0t0d0s0

Using this step you can make a disk bootable. I hope this post is useful for you. You are requested to please comment on the post if you have any issue, I will try to back you with my answer.

Friday 20 October 2017

Solaris zone: error: net0: failed to create VNIC: operation not supported

In this post, I will discuss with you one of the most interesting error which I am facing when I boot the local zone on Solaris 11.3. The description of this interesting issue as describe below.

Description of error:

!-[solaris]# zoneadm -z sun01 boot

zone 'sun01': error: net0: failed to create VNIC: operation not supported

zoneadm: zone sun01: call to zoneadmd(1M) failed: zoneadmd(1M

I have try to create and configure the  VNIC on Solaris 11.3 operating server but it get failed with the same error.

!-[solaris]#dladm create-vnic -l net0 vnic01

dladm: vnic creation failed: operation not supported

If you are also facing a such error while booting the local zone on solaris 11 server, then please use the below solution to resolve such issues.

Solution of error:

➥ This error "failed to create VNIC: operation not supported" would normally come when there are not enough mac addresses to assign to the zone. So now we need to add alternate mac addresses to the network interface.So before adding the new mac address we will stop LDM.

!-[solaris]#ldm list-domain

NAME            STATE     FLAGS  CONS   VCPU MEMORY  UTIL NORM UPTIME

primary         active    -n-cv- UART   8    8G      2.0% 2.0% 41d 20h 14m

0004fb0000060000ff1d3d8336112f6f active    -n---- 5001   50   64G     0.1% 0.1% 18h 23m

➥ Now log in to the Solaris global zone and check if net0 have additional MAC addresses or not. Please use the below command to check the status.

!-[solaris]# dladm show-phys -m

LINK               SLOT    ADDRESS           INUSE CLIENT

net0               primary 0:21:f6:d6:d3:e5  yes  net0

                   1       0:14:4f:f9:6d:8d  no   --

                   2       0:14:4f:fb:10:2b  no   --

                   3       0:14:4f:f9:41:d6  no   --

                   4       0:14:4f:f8:dd:c8  no   --

net1               primary 0:21:f6:51:be:4d  yes  net1

➥ Now zone will start without any issue, as we have assigned the new mac address to this zone.

!-[solaris]# zoneadm -z sun01 start

Please let me know if you are facing any issue regarding this error.

Monday 11 September 2017

Solaris – Add/remove network interface to a running zone (dynamic Change)

This will describe how to add a network interface to a running non-global zone, without having to reboot the zone. The new interface will persist between reboots.

First you add the entry to the zone configuration. This is the part that lets it persist between reboots. This is done from the global zone:

!-[solaris]# zonecfg -z sunz01
zonecfg:slabsunz01> add net
zonecfg:slabsunz01:net> set address=XXX.XXX.XX.XXX
zonecfg:slabsunz01:net> set physical=bge0
zonecfg:slabsunz01:net> end
zonecfg:slabsunz01> verify
zonecfg:slabsunz01> commit
zonecfg:slabsunz01> exit

Now we have to manually add a new interface to the running zone. Do this from the global zone as well

!-[solaris]# ifconfig bge0 addif XXX.XXX.XX.XXX netmask XXX.XXX.X.X zone sunz01 up

Created new logical interface bge0:3

Note: The ‘addif’ tells ifconfig to create a logical interface using the next available.

!-[solaris]# ifconfig -a
lo0:1: flags=2001000849 mtu 8232 index 1 inet 127.0.0.1 netmask ff000000
bge0:1: flags=1000843 mtu 1500 index 2 inet XXX.XXX.XX.XXX netmask ffffff00 broadcast XXX.XXX.XX.XXX
bge0:3: flags=1000843 mtu 1500 index 2 inet XXX.XXX.XX.XXX netmask ffffff00 broadcast XXX.XXX.XX.XXX

That's it! you're done.

In case you want to remove the interface -

To remove the interface from a running zone. From the global zone, remove the interface. You must first determine which logical interface [alias] you wish to remove.

!-[solaris]# ifconfig bge0:3 down
!-[solaris]# ifconfig bge0:3 unplumb
!-[solaris]# zonecfg -z sunz01
zonecfg:slabsunz01> remove net address=XXX.XXX.XX.XXX
zonecfg:slabsunz01> commit
zonecfg:slabsunz01> exit

Tuesday 18 July 2017

How to use zoneadm command in Solaris Servers

Please find the "zoneadm" commands with an example as describe below.
 
How to Verify a Solaris zone:

To verify the local solaris zone you need to run the below command with syntax.

!-[solaris]#zoneadm -z <zone> verify

Example: !-[solaris]#zoneadm -z sunz01 verify

In this example once you run the above command, if your zone is installed properly without any error then this is not showing you any output, that's means it is verified. After running the command if it is showing a message then you need to check the configuration of this zone.

How to Installing a Solaris zone:

To install the local Solaris zone you need to run the below command with syntax.

!-[solaris]#zoneadm -z <zone> install

Example: !-[solaris]#zoneadm -z sunz01 install

In this example when you run the above command then your local zone has been started for installation. It is installed the local zone using the Solaris repostiory or flar images which you are kept at server location.

How to Ready a Solaris zone:

To move the local zone in ready or maintainance state you need to run the below command.

!-[solaris]#zoneadm -z <zone> ready

Example: !-[solaris]#zoneadm -z sunz01 ready

In this example, when we run the above command then your local zone moved in to ready or maintianance state.

How to Boot a Solaris zone:

To boot the solaris zone on global system, you need to run the below command with syantx.

!-[solaris]#zoneadm -z <zone> boot

Example: !-[solaris]#zoneadm -z sunz01 boot

After running the above command your local solaris zone has been boot successfully if it is not showing any error during boot time. If you see any message during the boot time then please check where is the issue.

How to Reboot a Solaris zone:

To reboot or restart the solaris zone on Solaris server, you need to perform the below command on global zone.

!-[solaris]#zoneadm -z <zone> reboot

Example: !-[solaris]#zoneadm -z sunz01 reboot

Using this command the local zone "sunz01" has been restart again successfully. You need to run this command from global zone only.

➤ How to Shutdown/Halt a Solaris zone:

If you want to shutdown or halt your local zone without login it, then you need to run the below command from global zone.

!-[solaris]#zoneadm -z <zone> halt

Example: !-[solaris]#zoneadm -z sunz01 halt

After running this command local solaris zone state change from running to installed state that's means your server is shutdown now.

How to Uninstall a Solaris zone:

If you want to uninstall any solaris zone then you need to run the below command for uninstall the zone.

!-[solaris]#zoneadm -z <zone> uninstall -F

Example: !-[solaris]#zoneadm -z sunz01 uninstall -F

"-F" syntax is used to uninstall the zone forcefully.

How to Viewing a Solaris zone:

if you want to local zone current status and any other display information you need to run the below command.

!-[solaris]#zoneadm list -icv

 ID NAME       STATUS      PATH               BRAND   IP
   0 global         running        /                        solaris      shared
   1 sunz01        running       /zones/sunz01   solaris      excl
   2 sunz02        running       /zones/sunz02   solaris      excl

Using above command you can check the current status of all installed zones on Solaris server. It is show you the zone path and zone information. All the above command you need to run from Global zone with root privileges

Solaris Package administration in Solaris 10 Operating System

In this article, we will provide all the commands with an example which describe as below.

pkginfo- It displays all software package information.
pkgadd- It installs all software packages to the system.
pkgrm- It removes a package from the system.
pkgchk- It checks package installation state.
pkgtrans- It translates packages from one server format to another.

Commands & Syntax for checking a package information:

For checking a packages information on Solaris 10 operating system we will used the "pkginfo" command. You can find the all command and syntax related to "pkginfo" is listed below.

Please use the below command to display information about installed software packages.

!-[solaris]# pkginfo | more

Please use the below command to view additional information.

!-[solaris]# pkginfo -l | more

Please use the below command to view information of a specific package.

!-[solaris]# pkginfo -l SUNWman

Please use the below command to find how many packages are currently installed.

!-[solaris]# pkginfo | wc -l

To list all installed software packages, please use the below command.

!-[solaris]# more /var/sadm/install/contents

These above commands with their syntax are daily used on Solaris 10 platform.

Commands & Syntax for checking a package installation:

For checking an information about packages are installed or not on the server , we need to use "pkgchk"  command. Please find the below example as describe below.

Please use the below command to check the contents & attributes of a currently installed package.

!-[solaris]# pkgchk SUNWpkgs

Please use the below command to list the all files contained in a software package.

!-[solaris]# pkgchk -v SUNWpkgs

Please use the below commands to find if the contents & attributes of a file have changed since it was installed with its software package.

!-[solaris]# pkgchk -p /etc/shadow 

Please use the below commands to list information about selected files that make up a package.

!-[solaris]# pkgchk -l -p /usr/bin/showrev

If the packages is installed already then in that case "pkgchk" command don't show any output that clear meaning is that packages is already installed on the server.

Commands & Syntax for adding a package software:

For adding a packages on the server, we will used the "pkgadd" command. Please find the below commands and their syntax which is daily used on Solaris operating system.

Please use the below command to add a software packages from DVD. For this you need to move on dvd directory where all the packages are listed.

!-[solaris]# pkgadd -d . SUNWpkgs

Using above command you can add the packages from DVD.

Commands & Syntax for removing a package software:

For removing the packages from the server, we will used "pkgrm" command. Please find the below commands and their syntax as listed below.

Please use the below command to remove the software packages.

!-[solaris]# pkgrm SUNWpkgs

Please use the below command to remove a package from the spool directory.

!-[solaris]# pkgrm -s /export/pkg SUNWldam

Commands & Syntax for translating a packages format:

For translating a packages format from one format to another , we will used the "pkgtrans" command for the same.

Please use the below command to translate a package from file system format in /var/tmp to data stream format.

!-[solaris]# pkgtrans /var/tmp /tmp/SUNWpkgs.pkg SUNWpkgs

Please use the below command to create a data streamed package.

!-[solaris]# pkgtrans -s Product /var/tmp/stream.pkg SUNWpkgg SUNWpkgs

NFS mount on Solaris 11 Non-Global zones systems

In this article, we would learn how we mount folder from one Non-Global zone to another zone on Solaris 11 operating system using network file sharing.

For an example, we can use take a two local zone "sunz01" & "sunz02". We will mount one folder named "/export/backup" from "sunz01" local zone to another zone "sunz02" on "/project/export/data" location.

Step by Step method of NFS mount on Solaris 11:
 
➦ In the first step we will create the directory on "sunz02" zone where we want to mount the folder.

sunz02#mkdir /project/export/data
 
➦ In second step, we will make a configuration for this process. So for this work you need to login on global zone with root access and make an entry on the dfstb configuration file.

sun#vi /etc/dfs/dfstab

share -F nfs -o rw=sunz02 /zones/sunz01/root/export

If you see the above entry, we have provided the read/write access to directory on sunz02 server where we mount the folder from sunz01 local zone.
 
➦ In next step you need to login on sunz02 server and mount the shared folder using below command.

sunz02#mount sun:/zones/sunz01/root/export/backup /project/export/data
 
➦ Once you run the above command the folder is mount from one local zone to another zone temporarily. You can go to the directory and verify that the data which is listed on /export/backup folder is show on sunz02 directory.
 
➦ In the last step you need to restart the NFS service on the global zone so the configuration files and other changes makes affect. But these configuration are available until we are not taking reboot of the zone.

If you have any query regarding this topic, please post your comment here, we will get back to you shortly.

Tuesday 11 July 2017

How to Remove or Delete a Non-Global Zone from Solaris Operating system

As you aware that Non-Global zone are hosted on Global zone on Solaris Operating system. You can check the Non-Global zone list using "zoneadm" command. It will show you are running and installed zones on Global zones.
 
Please find the below step by step method to remove of local zone from global zone.

Step by Step Method of removal a Non-Global Zone:

First of all you need to check the Non-Global Zone list to ensure which zone is running on the server.

global# zoneadm list -iv

You will see a display that is similar to the following:

ID  NAME     STATUS       PATH                           BRAND      IP
 0    global       running         /                                   solaris    shared
 1    sunz01       running         /zones/sunz01                solaris    shared
In the above command output you can see the Non-Global Zone "sunz01" is running, which we need to remove or delete from Solaris Server.

Now, we need to shutdown the required zone which we need to delete. We can shutdown the Non-Global zone using below commands.
--------------------------------------------
global#zoneadm -z sunz01 halt
or
global#zoneadm -z sunz01 shutdown
or
global#zlogin sunz01 shutdown
-------------------------------------------
In next step when your Non-Global zone shutdown you need to uninstall the local zone. You can used the below method to uninstall the Non-Global Zone.

global#zoneadm -z sunz01 uninstall

Using above command Non-Global zone "sunz01" has been uninstall successfully.

In the last step you need to remove or delete all dataset and configuration files of Non-Global zone "sunz01" from Global zone.

global#zonecfg -z sunz01 delete

Using above command all the configuration files related to this Non-Global zone has been deleted successfully. Now you can remove the folder related to this zone.

So using above method we can remove or delete the Non-Global zone from global zone or Solaris Operating system. Please let me know if you are facing any issue during using this process.

Saturday 24 June 2017

Sun Solaris zonecfg commands with an example

"zonecfg" command is very useful command which is mostly used during configuration of new zone or installed zone as well as for removal of any zone configuration files.

This command are valid for Sun Solaris 10.x,11.x,12.x version.

➤ Command for creating a Solaris zone:

Please find the below commands to creating a zone on Sun Solaris server. The command must be run on Global zone with root user.

!-[solaris]# zonecfg -z <zone>

Example: !-[solaris]# zonecfg -z sunz01

Once you run the above command, you can enter in the configuration file, where you can add or edit the configuration for the zone.

Command for deleting a Solaris zone:

Please find the below command to deleting a Solaris zone from Global zone.

!-[solaris]# zonecfg -z <zone> delete -F

Example: !-[solaris]# zonecfg -z sunz01 delete -F

using above command you can delete or remove the configuration file of solaris local zone.

Note: You need to shutdown and uninstall the local zone before deleting the configuration files of Sun Solaris local zone.

Command for display zone current configuration:

Please find the below command to display the current configuration of local Solaris zones.

!-[solaris]# zonecfg -z <zone> info

Example: !-[solaris]#zonecfg -z sunz01 info

This command output show you the zonename, zonepath, autoboot etc attributes information of the solaris zone.

Command for zone creation file:

Please find the below command to create a solaris zone creation file.

!-[solaris]#zonecfg -z <zone> export

Example: !-[solaris]#zonecfg -z sun01 export

Once the creation file has been export you can use this file to another zone creation as well as for restoration of this local zone if any problem occur on this zone.

Thursday 25 May 2017

How to increase the file system size in Solaris 10/11 operating system

When you file system get full on Sun Solaris operating system , you need to increase it but on Solaris platform it is quite different from other unix operating version.

The below method are used for both type of Sun Solaris version 10/11. You can used the same command on different version platform.

➤ Mostly on Solaris 10/11 machine we have only use default storage pool. if you server is not connected to any SAN, then zpool name should be "rpool".

If you want to check which zpool are present on the Solaris box, you can run the below command for this work.

!-[solaris]# zpool status

Using the above command you can check which zpool storage are present on the solaris server. In my case my Solaris box is connected to SAN storage, so it is display both system default "rpool" & "san" storage system.

➤ Let's suppose you want to increase the size of root file system on server, then first you need to check the current disk space on the filesystem.

To check the current file size of filesystem you can use "df -h" command. This command will show you the filesystem size in correct manner.

On my Solaris box the root filesystem was created with rpool storage, so if I need to increase or extend the size of root filesystem I need to take space from this zpool.

For example, If you want to 5 Gb more space on root filesystem then please use the below command to extend the root filesystem size more 5 Gb. In my case my current root filesystem size is 12Gb so I will extend it to 17 Gb.

!-[solaris]# zfs set quota=17G rpool/ROOT/solaris-1

You can add the 5 Gb space in your current size (12Gb).

!-[solaris]# zfs set reservation=17G rpool/ROOT/solaris-1

In above command you can reserve the 17G space to root filesystem. You can check the new filesystem space using "zfs get quota" command.

Please comment on the post if you are facing any issue regarding the filesystem.

Monday 22 May 2017

Sun Solaris 11 failed connect to studio repo connection refused error

On Solaris server when you are trying to download the packages from the oracle repo server then sometimes you are facing a connection refused error.

Sun Solaris 11 failed to connect the studio repo during downloading the packages online from Oracle server. You can find the error message which you are getting normally on the Solaris server.

!-[solaris]# pkg install pkg://solaris/x11/diagnostic/x11-info-clients

pkg: 1/3 catalogs successfully updated:
Unable to contact valid package repository
Encountered the following error(s):
Unable to contact any configured publishers.
This is likely a network configuration problem.
Framework error: code: 7 reason: Failed connect to studio-repo.oracle.com:1008; Connection refused
URL: 'http://studio-repo.oracle.com' (happened 6 times)

Framework error: code: 7 reason: Failed connect to solaris-repo.oracle.com:1008; Connection refused
URL: 'http://solaris-repo.oracle.com/versions/0/'
any suggestion ??


If you see the above error you can see that when I try to install the X11 info clients packages on the server, I am getting a framework error which describe that failed to connect with Solaris repo.

Normally , user afraid with such type of error while working on it but I believe its very small error and get resolved in two steps.

Just go through my below solution which is very useful for such type of error troubleshooting.

You need to check the pkg services on the Solaris operating system, please check they are enable or not on the server.

!-[solaris]# svcs \*pkg\*
STATE          STIME    FMRI
disabled       May_22   svc:/application/pkg/dynamic-mirror:default
disabled       May_22   svc:/application/pkg/mirror:default
disabled       May_22   svc:/application/pkg/server:default
online         13:27:09 svc:/system/pkgserv:default
online         13:27:09 svc:/application/pkg/zones-proxy-client:default
online         13:27:09 svc:/application/pkg/repositories-setup:default

If you see the above pkg service result , lot of service related to packaging system are disable, so you need to restart the all disable and enable service then after again start to install the package.

Please post your comment on my blog, if you have any query related to this topic.

Sunday 21 May 2017

Step by Step method to enable SAR (System Activity Reporter) on Solaris Server

When you work on Solaris operating system, you need to managed the performance of the operating system. If the performance are very good then your server behave normal and run the long time without any issue.

Sometime your Solaris server performance is not good and memory and resource utilization get very high, then you need to find out what is the cause of this high utilization and if you are working on client project then your client must want the report.

So on Solaris server we are used SAR (System Activity Reporter) to generate all the report related to server health.

SAR (System Activity Reporter) is used to troubleshoot the performance issue on Sun Solaris Servers. Using SAR (System Activity Reporter) we can troubleshoot or monitored the disk, memory or CPU performance issues on the Solaris operating system servers.

Step by step procedure to enable SAR (System Activity Reporter):

⏩ By default SAR utility are installed on the Solaris 11 operating system. If you want to check the current service status of SAR, then you need to run the below command.

!-[solaris]# svcs status sar
disabled        May_22  svc:/system/sar:default

You can used also below command to check the current status of SAR services.

!-[solaris]# svcs -a | grep -i sar
disabled        May_22  svc:/system/sar:default

In above command output, if you see currently the sar service is disable so in the next step we need to enable this service

⏩ In this step, you need to enable the SAR services which is disable on the my solaris server.

!-[solaris]# svcadm enable svc:/system/sar:default

Using above command the SAR service has been started, if you want to check the current status please run the below command.

!-[solaris]# svcs status sar
enabled        May_22  svc:/system/sar:default

⏩ We will make a setup for automatic data collection, once we enable the sar service. The default script for SAR utility are located the below directory location.

/usr/lib/sa/sa1➤ This is a shell script to collect and store data in the binary file /var/adm/sa/sadd, where dd is the current day.

/usr/lib/sa/sa2➤ This is a  shell script for generating daily report in the file /var/adm/sa/sardd, where dd is current day.

As these above script are used normally to collect the automatically data from Solaris Server. If you required the daily report or weekly report then you need to add both the script in crontab file which is describe in next step.

⏩ If you required the SAR report regularly then you need to make an entry of above script on the crontab file.

!-[solaris]# crontab -e

Using these command you can edit the existing file and make an entry of above script according to your requirement when you want to generate the report.

Please comment on my post, if you have any query related to this sar topic.