Changeset 25415 in vbox
- Timestamp:
- Dec 15, 2009 5:04:40 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/solaris/PerformanceSolaris.cpp
r14948 r25415 53 53 kstat_ctl_t *mKC; 54 54 kstat_t *mSysPages; 55 kstat_t *mZFSCache; 55 56 }; 56 57 … … 63 64 64 65 65 CollectorSolaris::CollectorSolaris() : mKC(0), mSysPages(0) 66 CollectorSolaris::CollectorSolaris() 67 : mKC(0), 68 mSysPages(0), 69 mZFSCache(0) 66 70 { 67 71 if ((mKC = kstat_open()) == 0) … … 75 79 Log(("kstat_lookup(system_pages) -> %d\n", errno)); 76 80 return; 81 } 82 83 if ((mZFSCache = kstat_lookup(mKC, "zfs", 0, "arcstats")) == 0) 84 { 85 Log(("kstat_lookup(system_pages) -> %d\n", errno)); 77 86 } 78 87 } … … 180 189 } 181 190 *available = kn->value.ul * (PAGE_SIZE/1024); 191 192 // Optional don't fail if kstat is missing; as ZFS kstats are not be available for SunOS < 5.10 U8 193 if (kstat_read(mKC, mZFSCache, 0) != -1) 194 { 195 if (mZFSCache) 196 { 197 if ((kn = (kstat_named_t *)kstat_data_lookup(mZFSCache, "size"))) 198 *available += (kn->value.ul / 1024); 199 else 200 Log(("kstat_data_lookup(size) -> %d\n", errno)); 201 } 202 else 203 Log(("mZFSCache missing.\n")); 204 } 205 182 206 if ((kn = (kstat_named_t *)kstat_data_lookup(mSysPages, "physmem")) == 0) 183 207 {
Note:
See TracChangeset
for help on using the changeset viewer.