mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-16 22:06:06 +03:00
Portability: make list of default screens per-platform
This commit is contained in:
@ -36,16 +36,13 @@ in the source distribution for its full text.
|
||||
#include "BatteryMeter.h"
|
||||
#include "LinuxProcess.h"
|
||||
#include "SignalsPanel.h"
|
||||
#include "Settings.h"
|
||||
}*/
|
||||
|
||||
#ifndef CLAMP
|
||||
#define CLAMP(x,low,high) (((x)>(high))?(high):(((x)<(low))?(low):(x)))
|
||||
#endif
|
||||
|
||||
ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_SIZE, M_RESIDENT, M_SHARE, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
|
||||
|
||||
//static ProcessField defaultIoFields[] = { PID, IO_PRIORITY, USER, IO_READ_RATE, IO_WRITE_RATE, IO_RATE, COMM, 0 };
|
||||
|
||||
int Platform_numberOfFields = LAST_PROCESSFIELD;
|
||||
|
||||
const SignalItem Platform_signals[] = {
|
||||
@ -85,6 +82,31 @@ const SignalItem Platform_signals[] = {
|
||||
{ .name = "31 SIGSYS", .number = 31 },
|
||||
};
|
||||
|
||||
ScreenDefaults Platform_defaultScreens[] = {
|
||||
{
|
||||
.name = "Default",
|
||||
.columns = "PID USER PRIORITY NICE M_SIZE M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME Command",
|
||||
.sortKey = "PERCENT_CPU",
|
||||
},
|
||||
{
|
||||
.name = "I/O",
|
||||
.columns = "PID USER IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE PERCENT_SWAP_DELAY PERCENT_IO_DELAY Command",
|
||||
.sortKey = "IO_RATE",
|
||||
},
|
||||
{
|
||||
.name = "Perf Counters",
|
||||
.columns = "PID USER PERCENT_CPU PROCESSOR MCYCLE MINSTR IPC PERCENT_MISS PERCENT_BMISS Command",
|
||||
.sortKey = "MCYCLE",
|
||||
},
|
||||
{
|
||||
.name = "L1 Data Cache",
|
||||
.columns = "PID USER PERCENT_CPU L1DREADS L1DRMISSES L1DWRITES L1DWMISSES Command",
|
||||
.sortKey = "LD1READS",
|
||||
},
|
||||
};
|
||||
|
||||
const unsigned int Platform_numberOfDefaultScreens = sizeof(Platform_defaultScreens)/sizeof(ScreenDefaults);
|
||||
|
||||
const unsigned int Platform_numberOfSignals = sizeof(Platform_signals)/sizeof(SignalItem);
|
||||
|
||||
static Htop_Reaction Platform_actionSetIOPriority(State* st) {
|
||||
|
@ -14,17 +14,20 @@ in the source distribution for its full text.
|
||||
#include "BatteryMeter.h"
|
||||
#include "LinuxProcess.h"
|
||||
#include "SignalsPanel.h"
|
||||
#include "Settings.h"
|
||||
|
||||
#ifndef CLAMP
|
||||
#define CLAMP(x,low,high) (((x)>(high))?(high):(((x)<(low))?(low):(x)))
|
||||
#endif
|
||||
|
||||
extern ProcessField Platform_defaultFields[];
|
||||
|
||||
extern int Platform_numberOfFields;
|
||||
|
||||
extern const SignalItem Platform_signals[];
|
||||
|
||||
extern ScreenDefaults Platform_defaultScreens[];
|
||||
|
||||
extern const unsigned int Platform_numberOfDefaultScreens;
|
||||
|
||||
extern const unsigned int Platform_numberOfSignals;
|
||||
|
||||
void Platform_setBindings(Htop_Action* keys);
|
||||
|
Reference in New Issue
Block a user