[BACK]Return to mbufs.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / systat

Diff for /src/usr.bin/systat/mbufs.c between version 1.33 and 1.34

version 1.33, 2014/06/13 07:31:18 version 1.34, 2014/07/02 00:12:34
Line 40 
Line 40 
   
 int mclpool_count = 0;  int mclpool_count = 0;
 int mbpool_index = -1;  int mbpool_index = -1;
 struct pool mbpool;  struct kinfo_pool mbpool;
 u_int mcllivelocks, mcllivelocks_cur, mcllivelocks_diff;  u_int mcllivelocks, mcllivelocks_cur, mcllivelocks_diff;
   
 /* interfaces */  /* interfaces */
Line 106 
Line 106 
 {  {
         field_view *v;          field_view *v;
         int i, mib[4], npools;          int i, mib[4], npools;
         struct pool pool;          struct kinfo_pool pool;
         char pname[32];          char pname[32];
         size_t size;          size_t size;
   
Line 147 
Line 147 
                 }                  }
   
                 mib[2] = KERN_POOL_POOL;                  mib[2] = KERN_POOL_POOL;
                 size = sizeof(struct pool);                  size = sizeof(pool);
   
                 if (sysctl(mib, 4, &pool, &size, NULL, 0) < 0) {                  if (sysctl(mib, 4, &pool, &size, NULL, 0) < 0) {
                         err(1, "sysctl(KERN_POOL_POOL, %d)", i);                          err(1, "sysctl(KERN_POOL_POOL, %d)", i);
Line 187 
Line 187 
 int  int
 read_mb(void)  read_mb(void)
 {  {
         struct pool pool;          struct kinfo_pool pool;
         struct ifaddrs *ifap, *ifa;          struct ifaddrs *ifap, *ifa;
         struct if_info *ifi;          struct if_info *ifi;
         int mib[4];          int mib[4];
Line 259 
Line 259 
         mib[1] = KERN_POOL;          mib[1] = KERN_POOL;
         mib[2] = KERN_POOL_POOL;          mib[2] = KERN_POOL_POOL;
         mib[3] = mbpool_index;          mib[3] = mbpool_index;
         size = sizeof(struct pool);          size = sizeof(mbpool);
   
         if (sysctl(mib, 4, &mbpool, &size, NULL, 0) < 0) {          if (sysctl(mib, 4, &mbpool, &size, NULL, 0) < 0) {
                 error("sysctl(KERN_POOL_POOL, %d)", mib[3]);                  error("sysctl(KERN_POOL_POOL, %d)", mib[3]);
Line 270 
Line 270 
                 struct mclpool *mp = &interfaces[0].data.ifi_mclpool[i];                  struct mclpool *mp = &interfaces[0].data.ifi_mclpool[i];
   
                 mib[3] = mclpools[i].pool_offset;                  mib[3] = mclpools[i].pool_offset;
                 size = sizeof(struct pool);                  size = sizeof(pool);
   
                 if (sysctl(mib, 4, &pool, &size, NULL, 0) < 0) {                  if (sysctl(mib, 4, &pool, &size, NULL, 0) < 0) {
                         error("sysctl(KERN_POOL_POOL, %d)", mib[3]);                          error("sysctl(KERN_POOL_POOL, %d)", mib[3]);

Legend:
Removed from v.1.33  
changed lines
  Added in v.1.34