Top: removes option kernelTask (never implemented)

This commit is contained in:
Carter Li
2026-08-25 16:30:04 +08:00
parent f15a1e96ce
commit 63d16ca854
3 changed files with 2 additions and 10 deletions
-5
View File
@@ -4466,11 +4466,6 @@
"description": "Print all process on a single line",
"default": false
},
"kernelTask": {
"type": "boolean",
"description": "Whether to include kernel tasks (kworker, System, kernel_task) in the process list",
"default": false
},
"percent": {
"$ref": "#/$defs/percent"
},
-1
View File
@@ -17,7 +17,6 @@ typedef struct FFTopOptions {
uint32_t waitTime;
FFPercentageModuleConfig percent;
bool compact;
bool kernelTask; // Whether to include kernel tasks (kworker, System, kernel_task) in the process list
} FFTopOptions;
static_assert(sizeof(FFTopOptions) <= FF_OPTION_MAX_SIZE, "FFTopOptions size exceeds maximum allowed size");
+2 -4
View File
@@ -138,7 +138,6 @@ void ffGenerateTopJsonConfig(FFTopOptions* options, yyjson_mut_doc* doc, yyjson_
yyjson_mut_obj_add_uint(doc, module, "processes", options->nProcesses);
yyjson_mut_obj_add_uint(doc, module, "waitTime", options->waitTime);
yyjson_mut_obj_add_bool(doc, module, "compact", options->compact);
yyjson_mut_obj_add_bool(doc, module, "kernelTask", options->kernelTask);
ffPercentGenerateJsonConfig(doc, module, options->percent);
}
@@ -173,7 +172,6 @@ void ffInitTopOptions(FFTopOptions* options) {
options->nProcesses = 5;
options->waitTime = 500;
options->compact = false;
options->kernelTask = false;
options->percent = (FFPercentageModuleConfig){ 50, 80, 0 };
}
@@ -218,8 +216,8 @@ FFModuleBaseInfo ffTopModuleInfo = {
{ "Process ID", "pid" },
{ "CPU usage", "cpu" },
{ "Memory usage (RSS) in bytes", "mem" },
{ "Disk read bytes per second", "disk-read" },
{ "Disk write bytes per second", "disk-write" },
{ "Disk read bytes per second (0 if unsupported)", "disk-read" },
{ "Disk write bytes per second (0 if unsupported)", "disk-write" },
{ "CPU usage percentage", "cpu-percentage" },
{ "Memory usage (RSS) formatted", "mem-formatted" },
{ "Disk read formatted", "disk-read-formatted" },