htop/freebsd/FreeBSDProcessList.h

66 lines
1.4 KiB
C
Raw Normal View History

2014-11-27 18:27:34 +00:00
#ifndef HEADER_FreeBSDProcessList
#define HEADER_FreeBSDProcessList
/*
2014-11-27 19:44:55 +00:00
htop - FreeBSDProcessList.h
2014-11-27 18:27:34 +00:00
(C) 2014 Hisham H. Muhammad
Released under the GNU GPLv2, see the COPYING file
2014-11-27 18:27:34 +00:00
in the source distribution for its full text.
*/
2014-11-27 19:44:55 +00:00
#include <kvm.h>
2020-10-21 17:11:19 +00:00
#include <sys/param.h> // needs to be included before <sys/jail.h> for MAXPATHLEN
#include <sys/jail.h>
2016-01-31 16:41:55 +00:00
#include <sys/resource.h>
2020-10-21 17:11:19 +00:00
#include <sys/uio.h>
#include "FreeBSDProcess.h"
#include "Hashtable.h"
#include "Process.h"
#include "ProcessList.h"
#include "UsersTable.h"
#include "zfs/ZfsArcStats.h"
2020-10-20 11:14:32 +00:00
#define JAIL_ERRMSGLEN 1024
extern char jail_errmsg[JAIL_ERRMSGLEN];
2014-11-27 19:44:55 +00:00
typedef struct CPUData_ {
2016-01-31 16:41:55 +00:00
double userPercent;
double nicePercent;
double systemPercent;
double irqPercent;
double idlePercent;
double systemAllPercent;
} CPUData;
2014-11-27 19:44:55 +00:00
typedef struct FreeBSDProcessList_ {
ProcessList super;
kvm_t* kd;
2016-01-31 16:41:55 +00:00
unsigned long long int memWire;
unsigned long long int memActive;
unsigned long long int memInactive;
unsigned long long int memFree;
ZfsArcStats zfs;
2016-01-31 16:41:55 +00:00
CPUData* cpus;
2020-10-21 11:56:26 +00:00
Hashtable* ttys;
2020-10-31 22:28:02 +00:00
unsigned long* cp_time_o;
unsigned long* cp_time_n;
2016-01-31 16:41:55 +00:00
2020-10-31 22:28:02 +00:00
unsigned long* cp_times_o;
unsigned long* cp_times_n;
2016-01-31 16:41:55 +00:00
2014-11-27 19:44:55 +00:00
} FreeBSDProcessList;
ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidMatchList, uid_t userId);
2014-11-27 20:31:39 +00:00
void ProcessList_delete(ProcessList* this);
2015-03-17 02:01:48 +00:00
void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate);
2014-11-27 18:27:34 +00:00
#endif