<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type='manifest' name='sysstatd'>

<service
	name='diagnostic/sysstatd'
	type='service'
	version='1'>

	<create_default_instance enabled='false' />

	<single_instance />

	<!-- Read/Write access required to /var/run for lockfiles -->
	<dependency
		name='filesystem'
		grouping='require_all'
		restart_on='none'
		type='service'>
		<service_fmri
			value='svc:/system/filesystem/local'
		/>
	</dependency>

	<dependency
		name='loopback'
		grouping='require_all'
		restart_on='none'
		type='service'>
		<service_fmri
			value='svc:/system/filesystem/local'
		/>
	</dependency>

	<dependency
		name='net-physical'
		grouping='require_all'
		restart_on='none'
		type='service'>
		<service_fmri
			value='svc:/network/physical'
		/>
	</dependency>

	<dependency
		name='cryptosvc'
		grouping='require_all'
		restart_on='none'
		type='service'>
		<service_fmri
			value='svc:/system/cryptosvc'
		/>
	</dependency>

	<exec_method
		type='method'
		name='start'
		exec='/usr/sbin/sysstatd %{config/daemon_args}'
		timeout_seconds='60' />

	<exec_method
		type='method'
		name='stop'
		exec=':kill'
		timeout_seconds='60' />

	<property_group name='general' type='framework'>
		<!-- A user with this authorization can:

			svcadm restart sysstatd
			svcadm disable -t sysstatd
			svcadm mark <state> sysstatd
			svcadm clear sysstatd

		see auths(1) and user_attr(4)-->

		<propval
			name='action_authorization'
			type='astring'
			value='solaris.smf.manage.sysstatd'
		/>
		<!-- A user with this authorization can:
		
			svcadm disable sysstatd
			svcadm enable sysstatd

		see auths(1) and user_attr(4)-->

		<propval
			name='value_authorization'
			type='astring'
			value='solaris.smf.value.sysstatd'
		/>
	</property_group>

	<!-- The properties defined below can be changed by a user
	with 'solaris.smf.value.sysstatd' authorization using the 
	svccfg(1M) command.

	e.g.

	svccfg -s sysstatd setprop config/daemon_args = -v

	Now refresh the service:

	svcadm refresh diagnostic/sysstatd

	Note: svcadm disable/enable does not use the new property
	until after the service has been refreshed.

	***Do not edit this manifest to change these properties! -->

	<property_group name='config' type='application'>
		<propval
			name='daemon_args'
			type='astring'
			value=''
		/>
		<propval
			name='value_authorization'
			type='astring'
			value='solaris.smf.value.sysstatd'
		/>
	</property_group>

	<!-- default service model of 'contract' -->
	<property_group name='startd' type='framework'>
		<propval
			name='duration'
			type='astring'
			value='contract'
		/>
	</property_group>

	<stability value='Unstable' />

	<template>
		<common_name>
			<loctext xml:lang='C'>
			sysstatd daemon, multicasts system state on 224.0.0.75:7536/udp every second so a sysstat client on admin workstation can track the server farm
			</loctext>
		</common_name>
		<documentation>
			<manpage title='sysstat' section='1m'
				manpath='/usr/share/man' />
			<doc_link
				name='sysstat website'
				uri='http://www.maier-komor.de/sysstat.html'
			/>
		</documentation>
	</template>

</service>
</service_bundle>