2015-07-12 18:47:43 +00:00
|
|
|
#ifndef HEADER_DarwinProcessList
|
|
|
|
#define HEADER_DarwinProcessList
|
|
|
|
/*
|
|
|
|
htop - DarwinProcessList.h
|
|
|
|
(C) 2014 Hisham H. Muhammad
|
2021-09-22 09:33:00 +00:00
|
|
|
Released under the GNU GPLv2+, see the COPYING file
|
2015-07-12 18:47:43 +00:00
|
|
|
in the source distribution for its full text.
|
|
|
|
*/
|
|
|
|
|
2020-11-17 14:10:44 +00:00
|
|
|
#include <mach/mach_host.h>
|
|
|
|
#include <sys/sysctl.h>
|
2019-07-07 21:30:37 +00:00
|
|
|
|
2015-07-14 02:02:40 +00:00
|
|
|
#include "ProcessList.h"
|
2019-07-07 23:27:00 +00:00
|
|
|
#include "zfs/ZfsArcStats.h"
|
2020-11-17 14:10:44 +00:00
|
|
|
|
2015-07-12 18:47:43 +00:00
|
|
|
|
2015-07-13 06:17:14 +00:00
|
|
|
typedef struct DarwinProcessList_ {
|
|
|
|
ProcessList super;
|
|
|
|
|
2015-07-13 21:53:46 +00:00
|
|
|
host_basic_info_data_t host_info;
|
2016-01-13 19:57:29 +00:00
|
|
|
vm_statistics_data_t vm_stats;
|
2015-07-13 22:09:18 +00:00
|
|
|
processor_cpu_load_info_t prev_load;
|
|
|
|
processor_cpu_load_info_t curr_load;
|
2015-07-14 02:02:40 +00:00
|
|
|
uint64_t kernel_threads;
|
|
|
|
uint64_t user_threads;
|
2015-07-14 16:46:16 +00:00
|
|
|
uint64_t global_diff;
|
2019-07-07 21:30:37 +00:00
|
|
|
|
2019-07-07 23:27:00 +00:00
|
|
|
ZfsArcStats zfs;
|
2015-07-13 06:17:14 +00:00
|
|
|
} DarwinProcessList;
|
|
|
|
|
PCP: support for 'dynamic columns' added at runtime
Implements support for arbitrary Performance Co-Pilot
metrics with per-process instance domains to form new
htop columns. The column-to-metric mappings are setup
using configuration files which will be documented via
man pages as part of a follow-up commit.
We provide an initial set of column configurations so
as to provide new capabilities to pcp-htop: including
configs for containers, open fd counts, scheduler run
queue time, tcp/udp bytes/calls sent/recv, delay acct,
virtual machine guests, detailed virtual memory, swap.
Note there is a change to the configuration file path
resolution algorithm introduced for 'dynamic meters'.
First, look in any custom PCP_HTOP_DIR location. Then
iterate, in priority order, users home directory, then
local sysadmins files in /etc/pcp/htop, then readonly
configuration files below /usr/share/pcp/htop. This
final location becomes the preferred place for our own
shipped meter and column files.
The Settings file (htoprc) writing code is updated to
not using the numeric identifier for dynamic columns.
The same strategy used for dynamic meters is used here
where we write Dynamic(name) so the name can be setup
once more at start. Regular (static) columns writing
to htoprc - i.e. numerically indexed - is unchanged.
2021-07-11 01:11:29 +00:00
|
|
|
ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* dynamicMeters, Hashtable* dynamicColumns, Hashtable* pidMatchList, uid_t userId);
|
2015-07-12 18:47:43 +00:00
|
|
|
|
|
|
|
void ProcessList_delete(ProcessList* this);
|
|
|
|
|
2020-10-13 14:03:37 +00:00
|
|
|
void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate);
|
2015-07-12 18:47:43 +00:00
|
|
|
|
2021-06-12 20:04:37 +00:00
|
|
|
bool ProcessList_isCPUonline(const ProcessList* super, unsigned int id);
|
|
|
|
|
2015-07-12 18:47:43 +00:00
|
|
|
#endif
|