• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to troubleshoot Solaris 10 SMF (Service Management Facility) related issues

By admin

Service management facility was first introduced in Solaris 10 for managing system and application services. This replaces the legacy init scripts and other startup scripts. The post discusses few basic troubleshooting techniques to resolve the SMF (Service Management Facility) related issues.

Logfiles, Manifests and Methods

1. SMF logfiles can be found in the following locations:

/var/svc/log
/etc/svc/volatile

2. The SMF manifests and methods may be found here:

/var/svc/manifest/*
/lib/svc/method/*

3. To see the log file location for a given service use:

# svcs -l| grep logfile

Daemons, Configuration and Recovery

The primary daemons for SMF are svc.startd and svc.configd. At boot time the kernel will start init, which in turn starts svc.startd and that starts svc.configd. This latter daemon (svc.configd) will read information from the repository in /etc/svc/repository.db which is then used by svc.startd to start the services. If there is a problem booting the system you should try:

ok> boot -m milestone=none

Then try to reach milestone “single-user” by running:

# svcadm milestone svc:/milestone/single-user:default

Observe the services as they start, look at any messages on screen and consult the error logs for more information.

If the repository is corrupt you may need to restore from a previous saved copy, or reseed it.

# /lib/svc/bin/restore_repository

The script will guide you through the process.

Service dependencies

If a service fails to start, check the state of the service instance. If a service is in maintenance mode use:

# svcs -xv

This displays services which are in maintenance mode. You can check the reason for them to be in maintenance mode and after resolving the issue you can clear the service out of maintenance mode:

# svcadm clear

Service may depend on other service(s). Unless these services are not online, the dependent service will not start. To check dependent services (Service I depend on)

# svcs -d /system/filesystem/local
STATE          STIME    FMRI
online         20:08:17 svc:/system/filesystem/minimal:default
online         20:08:19 svc:/milestone/single-user:default

To check which services depends on a particular service (Services that depend on me) :

# svcs -D /system/filesystem/local
online         20:08:19 svc:/network/shares/group:default
online         20:08:19 svc:/system/cron:default
online         20:08:19 svc:/application/opengl/ogl-select:default
online         20:08:20 svc:/network/nfs/status:default
......

Filed Under: Solaris

Some more articles you might also be interested in …

  1. Solaris 11 : How to Control Allocated Bandwidth of Network Interface on Per App/User Basis
  2. Solaris : How to scan new storage LUNs (scsi/iscsi/fc/sas)
  3. Script to label multiple disks in Solaris
  4. Solaris ZFS : How to import 2 pools that have the same names
  5. Solaris ZFS : How to Create / Rename / Rollback / Destroy a ZFS Snapshot
  6. Solaris : How to configure a user account to never expire (disable password aging)
  7. How to delegate SMF management to a non-root user in Solaris
  8. How to Use the Oracle Solaris Fast Crash Dump Feature
  9. Solaris Interview Questions – Inodes and the Filesystem Troubleshooting
  10. Solaris : How to determine number of free/used inodes in a file system

You May Also Like

Primary Sidebar

Recent Posts

  • How to Disable IPv6 on Ubuntu 18.04 Bionic Beaver Linux
  • How to Capture More Logs in /var/log/dmesg for CentOS/RHEL
  • Unable to Start RDMA Services on CentOS/RHEL 7
  • How to rename a KVM VM with virsh
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary