LIBKYRTINFO(3)

📦 version 3.0.1.4, in arch rolling, ubuntu resolute, ubuntu stonking

🌸 LIBKYRTINFO(3) — the libkyrtinfo manual page, bestie edition 🌸

okay so. welcome to libkyrtinfo, a Library Functions Manual situation, and honestly? she's giving "let me tell you everything about what your computer is doing right now." no gatekeeping here. 💖


✨ NAME ✨

So this whole page is about one big friend group of functions, and their collective job is 获取当前系统资源占用信息 — that's "get the current system resource usage info," and yes she's multilingual, we stan. 🫶

Here's the whole squad, roll call, everybody say hi:

  • kdk_rti_get_mem_res_total_KiB
  • kdk_rti_get_mem_res_usage_percent
  • kdk_rti_get_mem_res_usage_KiB
  • kdk_rti_get_mem_res_available_KiB
  • kdk_rti_get_mem_res_free_KiB
  • kdk_rti_get_mem_virt_alloc_KiB
  • kdk_rti_get_mem_swap_total_KiB
  • kdk_rti_get_mem_swap_usage_percent
  • kdk_rti_get_mem_swap_usage_KiB
  • kdk_rti_get_mem_swap_free_KiB
  • kdk_rti_get_cpu_current_usage
  • kdk_rti_get_uptime
  • kdk_get_process_name
  • kdk_get_process_id
  • kdk_get_process_cpu_usage_percent
  • kdk_get_process_mem_usage_percent
  • kdk_get_process_status
  • kdk_get_process_port
  • kdk_get_process_start_time
  • kdk_get_process_running_time
  • kdk_get_process_cpu_time
  • kdk_get_process_command
  • kdk_get_process_user
  • kdk_procname_get_process_infomation
  • kdk_get_process_all_information
  • kdk_proc_freeall

✨ SYNOPSIS ✨

First things first, pull in the memory + CPU + uptime girlies. #include <libkyrtinfo.h> and you're in:

#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);

Then for the process detectives, it's #include <libkyprocess.h>:

#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);

And like, do NOT forget to actually link her, bestie: Link with -lkyrtinfo. 💅

ngl that kdk_get_process_cpu_usage_percent(int proc_num");" line up there is exactly how the page has it — we do not touch the sacred text, not even the little typo goblin living inside it. 🙈

✨ Detailed Description ✨

This library contains current system resource consumption information. that's it, that's the whole vibe check — she tells you what your system is currently eating. 🍓


✨ RETURN VALUE ✨

The return value is generally specific to the individual function called. so like, each function has her own thing going on, read the individual pages, iykyk. 👑


✨ CONFORMING TO ✨

These functions are as per the withdrawn POSIX.1e draft specification. (withdrawn! we still love her though. 💀)

The following functions are Linux extensions:

  • kdk_rti_get_mem_res_total_KiB()
  • kdk_get_process_name()

✨ SEE ALSO ✨


okay that's the whole page!! this was Linux Programmer's Manual, dated Mon Sep 18 2023, and the page is literally called LIBKYRTINFO(3) — go read the individual function pages next, they ate. periodt. 💖✨🦋

📦 where this page comes from