« November 2009
SunMonTueWedThuFriSat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
     
       
Today

Blog::Navigation

Blog::Editing

Bookmarks::Blogroll

Blog::Referers

Today's Page Hits: 174

Site notes

This page validates as XHTML 1.0, and will look much better in a browser that supports web standards, but it is accessible to any browser or Internet device. It was created using techniques detailed at glish.com/css/.

Powered by Roller Weblogger.
« SMF troubleshooting... | Main | GTLC conference »
Sunday Jul 31, 2005

SMF commands demo


Information Gathering Commands
==============================
svcs(1) and inetadm(1M)

svcs -a Show the state of all the services on the system
svcs -l <FMRI> Show detailed information about a service instance
svcs -d <FMRI> Show the dependencies for a given service instance
svcs -D <FMRI> Show the dependents for a given service instance
svcs -p <FMRI> Show the process ID for a given service instance
svcs -x [FMRI] Explain why a service instance has failed
svcs -v [FMRI] Show verbose information for a given service instance
inetadm -l <FMRI> Show detailed information about an inetd service

FMRI - Fault Management Resource Identifier

Administration Commands
=======================
svcadm(1M) and inetadm(1M)

svcadm enable <FMRI> Attempt to enable a given service
svcadm disable [-t] <FMRI> Disable a given service (temporarily, until next
reboot)
svcadm restart <FMRI> Restart a given service
svcadm refresh <FMRI> Re-read the configuration information in the
repository for the given service
svcadm mark <state> <FMRI> Manually put a service into a maintenance or
degraded state
svcadm clear <FMRI> Once a fault on a service has been repaired,
clear the maintenance/degraded state and inform
the restarter
svcadm milestone <mstone> | all Enable/disable the services for the milestone
you wish to move to. If the all keyword is used
then temporarily enable all services.
inetadm -e <FMRI> Attempt to enable a given inetd based service
inetadm -d <FMRI> Disable a given inetd based service



Configuration Commands
======================
svccfg(1M), svcprop(1) and inetadm(1M)

The svccfg command is used for manipulating data in the repository (properties,
snapshots, etc) and uses sub-commands to perform the various actions. Some
common sub-commands are:

select <FMRI> Select a service or instance to work on
list Show the children of a selected service
listprop List the properties for a given service or
service instance
setprop <property> = <value> Assign a new value to a given property
delete <FMRI> Delete a service from the repository. Avoid
deleting instances unless you really need to as
this can cause problems when reimporting a
manifest
validate <manifest.xml> Validate a manifest before importing into the
repository. See also xmllint(1)
import <manifest.xml> Import a service manifest into the repository
unselect Navigate to the parent selection, eg: from the
instance back to the service
listsnap List the snapshots for a given service instance
selectsnap Select a snapshot at the instance level
revert [<snapshot>] Revert the service instance to a selected
snapshot

The svcprop command is used to display information about a service from the
repository. There are various options to this command, for example:

svcprop -p <property> <FMRI> Show the values for a given property, eg: $ svcprop
-p start smtp:sendmail
svcprop -s <snapshot> <FMRI> Show the details from a given snapshot

The inetadm command when used with the -m option modifies a property for a given
inetd based service instance. An example of this is:

# inetadm -m svc:/network/ftp:default exec="/usr/sbin/in.ftpd -a -l"

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
Copyright (C) 2003, G S Hiregoudar