linux_misc.c (5748b897da441d1f10e1fe0c39155ea33d6d383a) linux_misc.c (44f1c916109d4d88941d257b7c4c96c26ab55477)
1/*-
2 * Copyright (c) 2002 Doug Rabson
3 * Copyright (c) 1994-1995 Søren Schmidt
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 134 unchanged lines hidden (view full) ---

143 sysinfo.uptime = ts.tv_sec;
144
145 /* Use the information from the mib to get our load averages */
146 for (i = 0; i < 3; i++)
147 sysinfo.loads[i] = averunnable.ldavg[i] *
148 LINUX_SYSINFO_LOADS_SCALE / averunnable.fscale;
149
150 sysinfo.totalram = physmem * PAGE_SIZE;
1/*-
2 * Copyright (c) 2002 Doug Rabson
3 * Copyright (c) 1994-1995 Søren Schmidt
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 134 unchanged lines hidden (view full) ---

143 sysinfo.uptime = ts.tv_sec;
144
145 /* Use the information from the mib to get our load averages */
146 for (i = 0; i < 3; i++)
147 sysinfo.loads[i] = averunnable.ldavg[i] *
148 LINUX_SYSINFO_LOADS_SCALE / averunnable.fscale;
149
150 sysinfo.totalram = physmem * PAGE_SIZE;
151 sysinfo.freeram = sysinfo.totalram - cnt.v_wire_count * PAGE_SIZE;
151 sysinfo.freeram = sysinfo.totalram - vm_cnt.v_wire_count * PAGE_SIZE;
152
153 sysinfo.sharedram = 0;
154 mtx_lock(&vm_object_list_mtx);
155 TAILQ_FOREACH(object, &vm_object_list, object_list)
156 if (object->shadow_count > 1)
157 sysinfo.sharedram += object->resident_page_count;
158 mtx_unlock(&vm_object_list_mtx);
159

--- 1768 unchanged lines hidden ---
152
153 sysinfo.sharedram = 0;
154 mtx_lock(&vm_object_list_mtx);
155 TAILQ_FOREACH(object, &vm_object_list, object_list)
156 if (object->shadow_count > 1)
157 sysinfo.sharedram += object->resident_page_count;
158 mtx_unlock(&vm_object_list_mtx);
159

--- 1768 unchanged lines hidden ---