libkyrtinfo(3)

libkyrtinfo3

获取当前系统资源占用信息

Usage

#include <libkyrtinfo.h>

extern unsigned long kdk_rti_get_mem_res_total_KiB();

extern float kdk_rti_get_mem_res_usage_percent();

extern unsigned long kdk_rti_get_mem_res_usage_KiB();

extern unsigned long kdk_rti_get_mem_res_available_KiB();

extern unsigned long kdk_rti_get_mem_res_free_KiB();

extern unsigned long kdk_rti_get_mem_virt_alloc_KiB();

extern unsigned long kdk_rti_get_mem_swap_total_KiB();

extern float kdk_rti_get_mem_swap_usage_percent();

extern unsigned long kdk_rti_get_mem_swap_usage_KiB();

extern unsigned long kdk_rti_get_mem_swap_free_KiB();

extern float kdk_rti_get_cpu_current_usage();

extern int kdk_rti_get_uptime(unsigned int *day, unsigned int *hour, unsigned int *min, unsigned int *sec);

#include <libkyprocess.h>

extern char* kdk_get_process_name(int proc_num);

extern int kdk_get_process_id(char *proc_name);

extern float kdk_get_process_cpu_usage_percent(int proc_num");"

extern float kdk_get_process_mem_usage_percent(int proc_num);

extern char* kdk_get_process_status(int proc_num);

extern int kdk_get_process_port(int proc_num);

extern char* kdk_get_process_start_time(int proc_num);

extern char* kdk_get_process_running_time(int proc_num);

extern char* kdk_get_process_cpu_time(int proc_num);

extern char* kdk_get_process_command(int proc_num);

extern char* kdk_get_process_user(int proc_num);

extern char** kdk_procname_get_process_infomation(char *proc_name);

extern char** kdk_get_process_all_information();

extern inline void kdk_proc_freeall(char **ptr);

Link with -lkyrtinfo.

Detailed Description

This library contains current system resource consumption information.

Return value

The return value is generally specific to the individual function called.

Conforming to

These functions are as per the withdrawn POSIX.1e draft specification. The following functions are Linux extensions: kdk_rti_get_mem_res_total_KiB() and kdk_get_process_name().

From libkysdk-system 3.0.1.4-1 in Arch Linux 2026-11-07. Parsed by carta from the page's man source.