The SMF uses the contracts to monitor the processes of a service.
Based on this events SMF can take action to react on this events. Per default, SMF
stops and restart a service, when any member of the contract dumps core, gets a signal
or dies due a hardware failure. Additionally the SMF does the same, when theres no
member process left in the contract.
We can use contracts to find out what SMF services have started processes which belongs to these contracts.
# ptree -c `pgrep sendmail `
[ process contract 1]
1 / sbin / init
[ process contract 4]
7 /lib/svc/bin/svc. startd
[ process contract 103]
776 /usr/lib/ sendmail -bd -q15m -C /etc/ mail / local .
cf
777 /usr/lib/ sendmail -Ac -q15m
#ctstat -vi 90
CTID ZONEID TYPE STATE HOLDER EVENTS QTIME NTIME
90 0 process owned 7 0 - -
cookie: 0x20
informative event set: none
critical event set: hwerr empty
fatal event set: none
parameter set: inherit regent
member processes: 523
inherited contracts: none
service fmri: svc:/network/smtp:sendmail
service fmri ctid: 90
creator: svc.startd
aux: start
#ctwatch 90 – you can monitor what happens to the contract
Comments