| 
 | |||||||
| 2. Types, Operators, and Expressions 8. Type and Constant Definitions 34. Statically Defined Tracing for User Applications | ArgumentsThe arguments to sysinfo probes are as follows: 
 The value of arg0 is 1 for most sysinfo probes. However, the readch and writech probes set arg0 to the number of bytes read or written, respectively. This features permits you to determine the size of reads by executable name, as shown in the following example: # dtrace -n readch'{@[execname] = quantize(arg0)}'
dtrace: description 'readch' matched 4 probes
^C
  xclock                                            
           value  ------------- Distribution ------------- count    
              16 |                                         0        
              32 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1        
              64 |                                         0        
  acroread                                          
           value  ------------- Distribution ------------- count    
              16 |                                         0        
              32 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 3        
              64 |                                         0        
  FvwmAuto                                          
           value  ------------- Distribution ------------- count    
               2 |                                         0        
               4 |@@@@@@@@@@@@@                            13       
               8 |@@@@@@@@@@@@@@@@@@@@@                    21       
              16 |@@@@@                                    5        
              32 |                                         0        
  xterm                                             
           value  ------------- Distribution ------------- count    
              16 |                                         0        
              32 |@@@@@@@@@@@@@@@@@@@@@@@@                 19       
              64 |@@@@@@@@@                                7        
             128 |@@@@@@                                   5        
             256 |                                         0        
  fvwm2                                             
           value  ------------- Distribution ------------- count    
              -1 |                                         0        
               0 |@@@@@@@@@                                186      
               1 |                                         0        
               2 |                                         0        
               4 |@@                                       51       
               8 |                                         17       
              16 |                                         0        
              32 |@@@@@@@@@@@@@@@@@@@@@@@@@@               503      
              64 |                                         9        
             128 |                                         0        
  Xsun                                              
           value  ------------- Distribution ------------- count    
              -1 |                                         0        
               0 |@@@@@@@@@@@                              269      
               1 |                                         0        
               2 |                                         0        
               4 |                                         2        
               8 |@                                        31       
              16 |@@@@@                                    128      
              32 |@@@@@@@                                  171      
              64 |@                                        33       
             128 |@@@                                      85       
             256 |@                                        24       
             512 |                                         8        
            1024 |                                         21       
            2048 |@                                        26       
            4096 |                                         21       
            8192 |@@@@                                     94       
           16384 |                                         0The sysinfo provider sets arg2 to be a pointer to a cpu_t, a structure internal to the kernel implementation. The sysinfo probes fire on the CPU on which the statistic is being incremented. Use the cpu_id member of the cpu_t structure to determine the CPU of interest. | ||||||
| 
 |