Renaborges.com

Explaining and Managing Service Management Facility (SMF) - Oracle Solaris Administration

April 1, 2015
Service Management  Facility (SMF) is a way to organize and manage the services in Solaris. It's a unified mechanism to manage the services Start / Stop, Restart services with dependencies. When the OS boot up the SMF run a Start-up Services Configuration for all the services with dependencies; Without Run Control (RC) scripts, it's easy to manage. If you come across a problem with one of the services you can take actions with the commands from SMF to manage the service. These actions can be manually manipulated by the svcadm command, include enable, disable, refresh, restart, and mark. Every service has a Fault Management Resource Identifier (FMRI) which includes the service name and instance name. Example:
svc:/system/console-login     (only service name identification)
svc:/system/console-login:vt2 (included the instance identification "vt2") 

 
A service can have many independent instances. For example a web server configured to listen on port 88, and other configured to listen on port 80 are instances of the web service. However, the first instance of every service is normally the default instance. Example of Virtual Terminal (VT):
svc:/system/console-login:default
svc:/system/console-login:vt2
svc:/system/console-login:vt3

 
SMF provides a set of command-line utilities that interact with SMF and accomplish standard administrative tasks.
 
svcadm => Provides the ability to perform common service management tasks, such as enabling, disabling, or restarting service instances.
 
svccfg => Provides the ability to directly display and manipulate the contents of the service configuration repository. You can list the properties for each service using svccfg command with listprop. You might see lots of files/scripts that make 
part of that service such as start, stop, refresh etc. You will also find the log and you can cat any of the available files. Example:
svccfg -s svc:/network/sendmail-client:default listprop
 
svcs => Gives detailed views of the service state of all service instances in the service configuration repository.
 
svcprop => Retrieves property values from the service configuration repository with an output format appropriate for use in shell scripts.
 
You might need to have administration rights to run the following commands:
 
1 - To check the status of a service:
reny@solaris11_2:~$ svcs svc:/system/console-login:vt2
STATE          STIME    FMRI
online         Mar_27   svc:/system/console-login:vt2

 
2 - To disable a service instance first check if it has dependents, if it has like the one in the example below then you cannot disable this service:
svcs -D FMRI
reny@solaris11_2:~$ svcs -D svc:/network/smtp:sendmail
STATE          STIME    FMRI
online         Mar_27   svc:/milestone/multi-user:default

 
3 - Disabling a service:
svcadm disable FMRI
 
4 - Enabling a service:
svcadm enable
FMRI
 
5 - Verify that the service has been enabled:
reny@solaris11_2:~$ svcs -x svc:/network/smtp:sendmail
svc:/network/smtp:sendmail (sendmail SMTP mail transfer agent)
State: online since March 27, 2015 11:42:39 AM GMT
See: sendmail(1M)
See: /var/svc/log/network-smtp:sendmail.log
Impact: None.

 
6 - Enabling service dependencies:
svcadm enable -r FMRI
 
7 - Restart a service:
svcadm restart FMRI
 
8 - Determine why the service is in maintenance:
svcs -x
FMRI
Then cat the log or consult the man page mentioned to determine what the error is.
 
9 - Determine if any process that are dependent to the service have stopped. Usually, when a service is in maintenance state, all processes associated with that instance have stopped, however, just make sure running the command below which lists all of the processes that are associated with service instance as well as PDIs for those processes.
reny@solaris11_2:~$ svcs -p svc:/network/smtp:sendmail
STATE          STIME    FMRI
online         Mar_27   svc:/network/smtp:sendmail
               Mar_27       2253 sendmail

 
10 - Restore the service:
svcadm clear
FMRI
 
For more information about SMF (Introduction to SMF) click here. About Managing SMF Services click here.
 

What is Boot Environment and How to Manage It

March 31, 2015
Boot Environment (BE) is a bootable instance of the image of the Oracle Solaris operating system and of any other software packages  installed in this image. Think in your particular OS, let's say Windows 7, with all your programs and updates installed on it,  creating a BE of this OS is to have all your  programs and updates saved in a partition as a file, where you can boot in case the main one in use gets corrupted for instance. However, Boot Environment belongs particularly for Solaris be...

Continue reading...
 

Getting Information About Packages in Solaris - Image Packaging system (IPS)

March 31, 2015
The pkg list command will tell you if a package is installed, frozen, obsolete or renamed under the column IFO.

I "i" = Package is installed
F "f" = If a package is frozen, you can only install or update to packages that match the frozen version.
O "r" = It indicates that package has been renamed.
O "o" = It indicates that package is obsolete. You cannot install a package that is marked obsolete.

reny@solaris11_2:~$ pkg list gedit
NAME (PUBLISHER)                                  VERSION          ...

Continue reading...
 

Identifying Processors in Solaris - psrinfo / psradm

March 27, 2015
Usually a solaris box has several processors on-board. Here I show you some simple commands like how to enable / disable / spare the processors using  psradm.
When comes to troubleshoot hardware issues it comes handy.

-bash-4.1$ psrinfo
0       on-line   since 02/05/2015 13:36:38
1       on-line   since 02/05/2015 13:36:41
2       on-line   since 02/05/2015 13:36:41
3       on-line   since 02/05/2015 13:36:41
4       on-line   since 02/05/2015 13:36:41
5       on-line   since 02/05/2015 13:36:41
6   ...

Continue reading...
 

Changing the host-name in Solaris 11

March 27, 2015

If would like to change the host-name in Solaris 11, it's quite simple and much simpler nowadays. You can basically do it in only 2 steps.
 
1 - First of all you should check the current properties of the system using svccfg:
 
reny@solaris11_2:~$
svccfg -s system/identity:node listprop config
config                       application        
config/enable_mapping       boolean     true
config/ignore_dhcp_hostname boolean     false
config/nodename             astring     solaris11_2
config/loopbac...

Continue reading...
 

What can you do with a 3D Printer?

February 21, 2014


You have probably heard about 3D printers, but probably does not have one at home. These machines are becoming more popular and leading to profound changes in the market to offer a choice between mass production and customization of industry and manufacturing. 3D printing is the boundary between the physical and virtual, the digital and the real world.

However, it is misleading to think that 3D printing is something new, the technology has existed for 30 years. What happened in recent years ha...

Continue reading...
 

SanDisk launches pendrive for Android Smartphones and tablets

February 13, 2014




Having more storage space on tablets and Smartphones or to be able to use files that are on  USB sticks are some of the difficulties for users of mobile devices. To be able to download these files with ease, the manufacturer SanDisk introduced on Tuesday ( 11 ) the stick "Ultra Dual USB Drive" with USB input - to connect to a PC, and a micro - USB, which is attached to mobile phones and tablets.

According to the company, the flash drive allows you to store and backup data, and free up mor...

Continue reading...
 

How to install a fully portable desktop on a USB for on-the-go access

August 18, 2013

Porteus is a portable Linux operating system which is able to be installed on a portable USB device.
"Porteus manages to offer a full-blown distribution by installing in a compressed state (to keep its footprint small). During the boot process, it uncompresses and boots very quickly. Porteus also offers a package manager so you can easily install more applications. The package manager has a dedicated Porteus repository to select from, but you can install applications from any repository...

Continue reading...
 

Fix MS Bluetooth Notebook Mouse 5000 v1.0 connection

January 9, 2013


I am running on Windows 7 64bit on a Samsung S3511. My MS Bluetooth Notebook Mouse 5000 v1.0 always stop working after hours of use. I simply could not get my laptop to pair with the device this time. When I try to add it again, everything seems to work, but then no response from the pointer, and after few seconds the device disappear from the list of bluetooth devices. 

Here's what finally solved it for me:

1. Disable "Power Management".  Click on Bluetooth icon, select Open Settings.  G...

Continue reading...
 

Ubuntu on Smartphones

January 8, 2013

After the suspense generated with the counter available on the official website of Ubuntu until yesterday, finally announced the long-awaited news: the Ubuntu operating system for mobile phones.
Canonical sought to provide a better experience leveraging the edges of the screen. On the right edge you can switch between open applications with a simple drag. On the left you see the application launcher, which remains hidden until it is invoked by the user.



At the top a bar similar to that in o...

Continue reading...
 
blog comments powered by Disqus
blog comments powered by Disqus