Changeset 11385 in vbox for trunk/src/VBox/Main
- Timestamp:
- Aug 13, 2008 12:26:24 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/linux/PerformanceLinux.cpp
r11180 r11385 62 62 if (f) 63 63 { 64 if (fscanf(f, "cpu % lu %lu %lu %lu", &u32user, &u32nice, &u32kernel, &u32idle) == 4)64 if (fscanf(f, "cpu %u %u %u %u", &u32user, &u32nice, &u32kernel, &u32idle) == 4) 65 65 { 66 66 *user = (uint64_t)u32user + u32nice; … … 107 107 if (f) 108 108 { 109 int processed = fscanf(f, "MemTotal: % lu kB\n", total);110 processed += fscanf(f, "MemFree: % lu kB\n", available);111 processed += fscanf(f, "Buffers: % lu kB\n", &buffers);112 processed += fscanf(f, "Cached: % lu kB\n", &cached);109 int processed = fscanf(f, "MemTotal: %u kB\n", total); 110 processed += fscanf(f, "MemFree: %u kB\n", available); 111 processed += fscanf(f, "Buffers: %u kB\n", &buffers); 112 processed += fscanf(f, "Cached: %u kB\n", &cached); 113 113 if (processed == 4) 114 114 { … … 148 148 uint64_t u64Tmp; 149 149 unsigned uTmp; 150 ULONG ulTmp, u32user, u32kernel; 150 unsigned long ulTmp; 151 ULONG u32user, u32kernel; 151 152 char buf[80]; /* @todo: this should be tied to max allowed proc name. */ 152 153 … … 158 159 if (f) 159 160 { 160 if (fscanf(f, "%d %s %c %d %d %d %d %d %u %lu %lu %lu %lu % lu %lu "161 "%ld %ld %ld %ld %ld %ld %llu %lu % ld",161 if (fscanf(f, "%d %s %c %d %d %d %d %d %u %lu %lu %lu %lu %u %u " 162 "%ld %ld %ld %ld %ld %ld %llu %lu %u", 162 163 &pid2, buf, &c, &iTmp, &iTmp, &iTmp, &iTmp, &iTmp, &uTmp, 163 164 &ulTmp, &ulTmp, &ulTmp, &ulTmp, &u32user, &u32kernel,
Note:
See TracChangeset
for help on using the changeset viewer.