From df568a576f7b44ac5a2b9b7222c7f39d9932f626 Mon Sep 17 00:00:00 2001 From: Daniel Lange Date: Wed, 11 Apr 2018 01:26:28 +0200 Subject: Imported Upstream version 2.2.0 --- solaris/SolarisProcessList.h | 64 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 solaris/SolarisProcessList.h (limited to 'solaris/SolarisProcessList.h') diff --git a/solaris/SolarisProcessList.h b/solaris/SolarisProcessList.h new file mode 100644 index 0000000..a5f2fbc --- /dev/null +++ b/solaris/SolarisProcessList.h @@ -0,0 +1,64 @@ +/* Do not edit this file. It was automatically generated. */ + +#ifndef HEADER_SolarisProcessList +#define HEADER_SolarisProcessList +/* +htop - SolarisProcessList.h +(C) 2014 Hisham H. Muhammad +(C) 2017,2018 Guy M. Broome +Released under the GNU GPL, see the COPYING file +in the source distribution for its full text. +*/ + +#define MAXCMDLINE 255 + + +#include +#include +#include +#include +#include +#include +#include + +#define ZONE_ERRMSGLEN 1024 +char zone_errmsg[ZONE_ERRMSGLEN]; + +typedef struct CPUData_ { + double userPercent; + double nicePercent; + double systemPercent; + double irqPercent; + double idlePercent; + double systemAllPercent; + uint64_t luser; + uint64_t lkrnl; + uint64_t lintr; + uint64_t lidle; +} CPUData; + +typedef struct SolarisProcessList_ { + ProcessList super; + kstat_ctl_t* kd; + CPUData* cpus; +} SolarisProcessList; + + +char* SolarisProcessList_readZoneName(kstat_ctl_t* kd, SolarisProcess* sproc); + +ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, uid_t userId); + +void ProcessList_delete(ProcessList* pl); + +/* NOTE: the following is a callback function of type proc_walk_f + * and MUST conform to the appropriate definition in order + * to work. See libproc(3LIB) on a Solaris or Illumos + * system for more info. + */ + +int SolarisProcessList_walkproc(psinfo_t *_psinfo, lwpsinfo_t *_lwpsinfo, void *listptr); + +void ProcessList_goThroughEntries(ProcessList* this); + + +#endif -- cgit v1.2.3