* Copyright (C) 2006-2008 Florian octo Forster
* Copyright (C) 2008 Oleg King
* Copyright (C) 2009 Sebastian Harl
+ * Copyright (C) 2009 Andrés J. Díaz
* Copyright (C) 2009 Manuel Sanmartin
*
* This program is free software; you can redistribute it and/or modify it
* Florian octo Forster <octo at verplant.org>
* Oleg King <king2 at kaluga.ru>
* Sebastian Harl <sh at tokkee.org>
+ * Andrés J. Díaz <ajdiaz at connectical.com>
* Manuel Sanmartin
**/
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