{
#if HAVE_IOKIT_IOKITLIB_H
kern_return_t status;
-
+
if (io_master_port != MACH_PORT_NULL)
{
mach_port_deallocate (mach_task_self (),
char buffer[1024];
unsigned long long incoming, outgoing;
char *device;
-
+
char *dummy;
char *fields[16];
int numfields;
if (device[0] == '\0')
continue;
-
+
numfields = strsplit (dummy, fields, 16);
if (numfields < 11)
return;
}
#endif
-
+
for (ptr = list_head_g; ptr != NULL; ptr = ptr->next)
{
if (strcmp (ptr->name, name) == 0)
if ((pse == NULL) || (pse->id != entry->id))
{
procstat_entry_t *new;
-
+
new = (procstat_entry_t *) malloc (sizeof (procstat_entry_t));
if (new == NULL)
return;
memset (new, 0, sizeof (procstat_entry_t));
new->id = entry->id;
-
+
if (pse == NULL)
ps->instances = new;
else
pse->vmem_minflt = entry->vmem_minflt_counter - pse->vmem_minflt_counter;
}
pse->vmem_minflt_counter = entry->vmem_minflt_counter;
-
+
if (entry->vmem_majflt_counter < pse->vmem_majflt_counter)
{
pse->vmem_majflt = entry->vmem_majflt_counter
pse->cpu_user = entry->cpu_user_counter - pse->cpu_user_counter;
}
pse->cpu_user_counter = entry->cpu_user_counter;
-
+
if (entry->cpu_system_counter < pse->cpu_system_counter)
{
pse->cpu_system = entry->cpu_system_counter