09-03-2007
You may want to look at either svcadm or inetadm commands in solaris 10.
Quote:
Service Management Facility
The Service Management Facility was introduced in Solaris 9 as an alternative way to manage services. In Solaris 10, SMF has been made the default way to manage most services. The SMF framework has significant advantages over the legacy SVR4 mechanisms, primarily in terms of service monitoring and integration with the Fault Management Facility.
Basic Commands
The basic commands for managing services under SMF (Service Management Facility) control are svcs, svccfg and svcadm. The man pages for these commands are a good source of detailed information.
inetadm can be used to monitor services under inetd control.
Many commands require referencing the service identifier, also known as an FMRI.
svcs
* svcs -a: Lists all services currently installed, including their state.
* svcs -d FMRI: Lists dependencies for FMRI.
* svcs -D FMRI: Lists dependents for FMRI.
* svcs -l FMRI: Provides a long listing of information about FMRI; includes dependency information
* svcs -p FMRI: Shows relationships between services and processes.
* svcs -t: This change is temporary (does not persist past a boot).
* svcs -x: Explains why a service is not available.
* svcs -xv: Verbose debugging information.
svcadm
* svcadm clear FMRI: Clear faults for FMRI.
* svcadm disable FMRI: Disable FMRI.
* svcadm enable FMRI: Enable FMRI.
* svcadm refresh FMRI: Force FMRI to read config file.
* svcadm restart FMRI: Restart FMRI.
To make configuration changes to a non-inetd service, edit the configuration file, then enter the svcadm restart command.
svccfg
* svccfg: Enter interactive mode.
* svccfg -s FMRI setenv ENV_VARIABLE value: Set an environment variable for FMRI. Follow by svcadm refresh and restart commands.
inetadm
* inetadm -l FMRI: Displays properties for FMRI.
* inetadm -m FMRI property_name=value: Set a property for FMRI.
In particular, the "exec" value for an inetd-controlled service is the command line executed for that service by SMF. It may be desirable, for example, to change this value to add logging or other command-line flags.
To convert an inetd.conf file to SMF format, run the command:
inetconv -i /etc/inet/inetd.conf
from Princeton's
Solaris Service Management Facility
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I am putting a shell script in cron of root for solaris 7 server . This shell script runs rsh
commands within the script. The result is the shell script does not run in cron. The cron syntax is perfect.
When I run stand alone manually it works fine.I undesrstand I need to initialize everything... (6 Replies)
Discussion started by: Hitesh Shah
6 Replies
2. UNIX for Dummies Questions & Answers
Hi everyone, I'n new on this... And I don't have experience.
I need to know how to enable rsh between solaris and tru64.
I don't know what i need to modify or install. I really don't have idea.
If somebody has documentation about this, or has a procedure to do this.
I really will... (1 Reply)
Discussion started by: cm247a
1 Replies
3. Solaris
Hi Guys,
Please suggest how to stop rsh on Solaris 10
Thanks
Manu (1 Reply)
Discussion started by: b_manu78
1 Replies
4. UNIX for Dummies Questions & Answers
All,
I have two AIX 5.3 systems that needs to run rsh commands on a Solaris 8 system, and one is failing. One, xx402 is a dedicated machine, and the other, xx452 is a virtual one on (via VIO).
The xx402 has no problem with the rsh commands but I keep getting "Permission Denied" when the... (5 Replies)
Discussion started by: kjbaumann
5 Replies
5. Solaris
Can any one tell me how to stop DHCP service on Solaris 10 so that it should not start nextime when the system is rebooted. (2 Replies)
Discussion started by: shabu
2 Replies
6. Solaris
Hi All,
I need to stop sendmail from running on boot-up. How can I do this on Solaris 8 and 9 sparc?
Please help and that you in advance. (2 Replies)
Discussion started by: itik
2 Replies
7. Solaris
Unable to execute commands using rsh in Solaris 9 and 10.
When I execute this command " rsh -n 172.16.67.91 ls -l " I am getting this error message.
::ffff:172.16.67.91: Connection refused
Please guide me how to enable rsh.
Thanks & Regards
Durgaprasad (1 Reply)
Discussion started by: durgaprasadr13
1 Replies
8. UNIX for Dummies Questions & Answers
Can anyone point me in the right direction..
I have a test system which requires vxWorks to be loaded via TCPIP
I am using a Sun ultra10 box with Sol 9.0 installed as the server
I have configured the server and am able to load the boot image without any problems. I assume it is using the... (0 Replies)
Discussion started by: shortsrkt
0 Replies
9. Solaris
Hello to everybody from Argentina.
I need to stop samba because i need to fsck a filesystem
How can i do this?
I presume that the version is higher than 3.0.
/usr/sfw/sbin/smbd -D This is the out of ps -ef | grep smbd.
Thank you very much for your time i am a litle lost.
The... (4 Replies)
Discussion started by: enkei17
4 Replies
10. Solaris
Hi
we run rsh (password-less) among solaris 9/10 boxes very frequently and would like to know if there exist any logs which will capture either login session or the commands run (using rsh) or with any other info.
TIA
Reddy (0 Replies)
Discussion started by: reddyr
0 Replies
inetadm(1M) System Administration Commands inetadm(1M)
NAME
inetadm - observe or configure inetd-controlled services
SYNOPSIS
inetadm
inetadm -?
inetadm -p
inetadm -l {FMRI | pattern}
inetadm -e {FMRI | pattern}
inetadm -d {FMRI | pattern}
inetadm -m {FMRI | pattern} ... {name=value} ...
inetadm -M {name=value} ...
DESCRIPTION
The inetadm utility provides the following capabilities for inetd-managed SMF services:
o Provides a list of all such services installed.
o Lists the services' properties and values.
o Allows enabling and disabling of services.
o Allows modification of the services'property values, as well as the default values provided by inetd.
See smf(5) for a description of an SMF service.
With no arguments, inetadm lists all services under inetd(1M) control, including such attributes as their current run state and whether or
not they are enabled.
OPTIONS
For options taking one or more FMRI operands (see smf(5) for a description of an FMRI), if the operand specifies a service (instead of a
service instance), and that service has only a single instance, inetadm operates on that instance.
If a service name is supplied and it contains more than one instances or a pattern is supplied and and it matches more than one instance, a
warning message is displayed and that operand is ignored.
For those options taking name=value parameters, a description of each of the possible names and the allowed values is found in the
inetd(1M) man page.
The following options are supported:
-?
Display a usage message.
-p
Lists all default inet service property values provided by inetd in the form of name=value pairs. If the value is of boolean type, it
is listed as TRUE or FALSE.
-l {FMRI | pattern}...
List all properties for the specified service instances as name=value pairs. In addition, if the property value is inherited from the
default value provided by inetd, the name=value pair is identified by the token (default). Property inheritance occurs when properties
do not have a specified service instance default.
-e {FMRI | pattern}...
Enable the specified service instances.
-d {FMRI | pattern}...
Disable the specified service instances.
-m {FMRI | pattern}...{name=value}...
Change the values of the specified properties of the identified service instances. Properties are specified as whitespace-separated
name=value pairs. To remove an instance-specific value and accept the default value for a property, simply specify the property without
a value, for example, name= .
-M {name=value}...
Change the values of the specified inetd default properties. Properties are specified as whitespace-separated name=value pairs.
EXAMPLES
Example 1: Displaying Properties for a Service
The following command displays the properties for the spray service.
# inetadm -l network/rpc/spray:default
SCOPE NAME=VALUE
name="sprayd"
endpoint_type="tli"
proto="datagram_v"
isrpc=TRUE
rpc_low_version=1
rpc_high_version=1
wait=TRUE
exec="/usr/lib/netsvc/spray/rpc.sprayd"
user="root"
default bind_addr=""
default bind_fail_max=-1
default bind_fail_interval=-1
default max_con_rate=-1
default max_copies=-1
default con_rate_offline=-1
default failrate_cnt=40
default failrate_interval=60
default inherit_env=TRUE
default tcp_trace=FALSE
default tcp_wrappers=FALSE
Example 2: Displaying Default Properties
The following command displays default properties.
# inetadm -p
NAME=VALUE
bind_addr=""
bind_fail_max=-1
bind_fail_interval=-1
max_con_rate=-1
max_copies=-1
con_rate_offline=-1
failrate_cnt=40
failrate_interval=60
inherit_env=TRUE
tcp_trace=FALSE
tcp_wrappers=FALSE
Example 3: Changing Property Values for a Service
The following command changes rpc_high_version to 3 and tcp_trace to TRUE for the spray service.
# inetadm -m network/rpc/spray:default
rpc_high_version=3 tcp_trace=TRUE
# inetadm -l network/rpc/spray:default
SCOPE NAME=VALUE
name="sprayd"
endpoint_type="tli"
proto="datagram_v"
isrpc=TRUE
rpc_low_version=1
rpc_high_version=3
wait=TRUE
exec="/usr/lib/netsvc/spray/rpc.sprayd"
user="root"
default bind_addr=""
default bind_fail_max=-1
default bind_fail_interval=-1
default max_con_rate=-1
default max_copies=-1
default con_rate_offline=-1
default failrate_cnt=40
default failrate_interval=60
default inherit_env=TRUE
tcp_trace=TRUE
default tcp_wrappers=FALSE
EXIT STATUS
The following exit values are returned:
0
Operation completed successfully.
1
A fatal error occurred. An accompanying error message will provide further information.
2
Invalid arguments were supplied, such as an ambiguous service FMRI or pattern.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
SEE ALSO
inetd(1M), svccfg(1M), attributes(5), smf(5)
SunOS 5.10 17 Dec 2004 inetadm(1M)