The putback of

PSARC 2008/046 Process Contract Decorations
5079353 RFE: contract 'decoration' with service FMRI

has provided process contracts with terms describing service FMRI and
additional information that will identify the origin of the process
contract. This information will also be available postmortem.

You can use ctstat(1) to view the new terms as shown below:

$ ctstat -vi 1,4
CTID    ZONEID  TYPE    STATE   HOLDER  EVENTS  QTIME   NTIME
1       0       process owned   0       0       -       -
         cookie:                0
         informative event set: none
         critical event set:    none
         fatal event set:       hwerr
         parameter set:         noorphan
         member processes:      1
         inherited contracts:   none
         service fmri:          svc:/system/init:default
         service fmri ctid:     1
         creator:               sched
         aux:
4       0       process owned   1       0       -       -
         cookie:                0x1
         informative event set: none
         critical event set:    empty
         fatal event set:       core signal hwerr
         parameter set:         inherit regent
         member processes:      100004
         inherited contracts:   none
         service fmri:          svc:/system/svc/restarter:default
         service fmri ctid:     4
         creator:               init
         aux:                   smf


In this case we have the information of the process contracts for
init(1M) and svc.startd(1M)

Here is a simple example of dtrace to cont syscall by service fmri:
# dtrace -qn 'syscall:::entry { 
@[stringof(curthread->t_procp->p_ct_process->conp_svc_fmri->rs_string)] 
= count(); }'
^C

   svc:/system/filesystem/autofs:default                             2
   svc:/system/fmd:default                                           2
   svc:/network/inetd:default                                        4
   svc:/network/nfs/cbd:default                                     12
   svc:/system/intrd:default                                        13
   svc:/system/svc/restarter:default                                20
   svc:/system/sysevent:default                                     23
   svc:/system/console-login:default                                24
   svc:/system/sac:default                                          30
   svc:/network/smtp:sendmail                                       74
   svc:/system/svc/repository:default                              156
   svc:/system/name-service-cache:default                          329
   svc:/system/webconsole:console                                  535
   svc:/network/ssh:default                                       2308

There is an RFE (6667501) filed to create stable interfaces to access
some process contract terms directly.

More details can be found in the man page for process(4)
The source code is already in opensolaris.

Please file any bugs in solaris/utility/smf


-Antonello
_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to