summaryrefslogtreecommitdiffstats
path: root/solaris/SolarisProcessList.h
diff options
context:
space:
mode:
authorgmbroome <thrirhrafnir@gmail.com>2018-03-02 16:20:46 -0500
committerHisham Muhammad <hisham@gobolinux.org>2018-03-02 18:20:46 -0300
commit697f5bb9c14a89b2e04519c956fc7e455c9b1cc0 (patch)
tree12cb2f0f92308da316e623d7b1911308454ea02a /solaris/SolarisProcessList.h
parentd4ea7cd65ccf8551cabb0706167b2c15aad7866d (diff)
Import Solaris support (#741)
This commit adds support for Solaris, squashed from PR #741: Summary of additions: * Initial setup of Solaris platform directory * Add Solaris platform into autoconf template * Uptime and load averages * Add dependency on libkstat * Basic process listing * Zone name display * CPU detection * Per-process memory and CPU usage parsed correctly * Uses sysconf to discover number of CPUs, instead of more complex libkstat code * Simple memory display working * Reduce repetitive calls to the PAGE_SIZE macro when reading memory info * Add Project, Contract, Task, and Pool into process properties * Use system major()/minor() implementations and remove extraneous definition of mkdev() * Get the STARTTIME column working properly, using the Linux implementation as a guide
Diffstat (limited to 'solaris/SolarisProcessList.h')
-rw-r--r--solaris/SolarisProcessList.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/solaris/SolarisProcessList.h b/solaris/SolarisProcessList.h
new file mode 100644
index 00000000..5690ee87
--- /dev/null
+++ b/solaris/SolarisProcessList.h
@@ -0,0 +1,53 @@
+/* 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 Guy M. Broome
+Released under the GNU GPL, see the COPYING file
+in the source distribution for its full text.
+*/
+
+#define MAXCMDLINE 255
+
+
+#include <kstat.h>
+#include <sys/param.h>
+#include <sys/zone.h>
+#include <sys/uio.h>
+#include <sys/resource.h>
+#include <sys/sysconf.h>
+#include <sys/sysinfo.h>
+#include <sys/swap.h>
+
+#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;
+
+ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, uid_t userId);
+
+void ProcessList_delete(ProcessList* this);
+
+void ProcessList_goThroughEntries(ProcessList* this);
+
+#endif

© 2014-2024 Faster IT GmbH | imprint | privacy policy