LIBKYSYSINFO(3)
💖 LIBKYSYSINFO(3) 💖 — the library functions manual, bestie 👑
okay so real talk: this is the manual page for libkysysinfo, and it's giving "let me tell you literally everything about your system" 👑 It's the library functions manual, and the whole squad of functions in here exists to do one thing: 获取操作系统基础信息 — that's "grab the basic info about the operating system", fr fr 🦋
✨ NAME ✨
The way this lineup ate 💅 no skips, no cuts, here's every single one:
kdk_system_get_architecturekdk_system_get_systemNamekdk_system_get_versionkdk_system_get_activationStatuskdk_system_get_serialNumberkdk_system_get_kernelVersionkdk_system_get_eUserkdk_system_get_eUser_login_timekdk_system_get_projectNamekdk_system_get_projectSubNamekdk_system_get_productFeatureskdk_system_get_hostVirtTypekdk_system_get_hostCloudPlatformkdk_system_is_zyjkdk_system_get_version_detailekdk_system_get_resolving_powerkdk_system_get_systemCategorykdk_system_get_startup_timekdk_system_get_shutdown_timekdk_get_host_vendorkdk_get_host_productkdk_get_host_serialkdk_system_get_hostNamekdk_system_get_wordkdk_system_get_buildTimekdk_resolving_freeallkdk_hw_get_pci_infokdk_hw_free_pci_infokdk_system_get_appScene
and their collective job description? 获取操作系统基础信息. periodt. 💖
🫶 SYNOPSIS 🫶
#include <libkysysinfo.h>
extern char* kdk_system_get_architecture();
extern char* kdk_system_get_systemName();
extern char* kdk_system_get_version(bool verbose);
extern int kdk_system_get_activationStatus(int *status_error_num, int *date_error_num);
extern char* kdk_system_get_serialNumber();
extern char* kdk_system_get_kernelVersion();
extern char* kdk_system_get_eUser();
extern char* kdk_system_get_eUser_login_time();
extern char* kdk_system_get_projectName();
extern char* kdk_system_get_projectSubName();
extern unsigned int kdk_system_get_productFeatures();
extern char* kdk_system_get_hostVirtType();
extern char* kdk_system_get_hostCloudPlatform();
extern bool kdk_system_is_zyj(void);
extern version_t kdk_system_get_version_detaile();
extern char** kdk_system_get_resolving_power();
extern char* kdk_system_get_systemCategory();
extern char** kdk_system_get_startup_time();
extern char** kdk_system_get_shutdown_time();
extern char *kdk_get_host_vendor();
extern char *kdk_get_host_product();
extern char *kdk_get_host_serial();
extern char *kdk_system_get_hostName();
extern int kdk_system_get_word();
extern char *kdk_system_get_buildTime();
extern inline void kdk_resolving_freeall(char **ptr);
extern struct KPci *kdk_hw_get_pci_info();
extern void kdk_hw_free_pci_info(struct KPci *info);
extern char *kdk_system_get_appScene();
and obviously, Link with -lkysysinfo — do it or you get nothing, and that's not the vibe 💀
🌈 DETAILED DESCRIPTION 🌈
This library contains instantaneous information about the current system. Like, right now, this second. Snapshot energy 📸✨
🎀 DATA STRUCTURES 🎀
Structure version_t is holding the info related to a system version number, plus the patch version number info too 🫶
typedef struct {
char *os_version; //系统版本
char *update_version; //补丁版本
} version_t;
heads up bestie 🙈 there are other members not documented here, which are only meant for libkysysinfo internal use. Not your business, not my business, we don't touch them. 💅
Structure KPci is the one carrying info related to a pci bus information:
struct KPci {
char slot_path[16];
char class_name[128];
char product_name[128];
unsigned char rev;
char ss_name[256];
char driver_use[1024];
char **modules;
int module_count;
struct KPci *next;
};
same warning, same energy: there are other members not documented here, which are only meant for libkysysinfo internal use 🙈 leave them alone, they're doing their little internal thing.
💀 RETURN VALUE 💀
ngl the return value is generally specific to the individual function called — so like, every function has its own little answer and this page is not out here guessing for you 😭 go read the individual one, iykyk.
👑 CONFORMING TO 👑
These functions are as per the withdrawn POSIX.1e draft specification. Withdrawn!! Gone!! Historical artifact core 💀 still valid though, don't panic.
The following functions are Linux extensions:
kdk_system_get_architecture()kdk_system_get_systemName()kdk_system_get_version()kdk_system_get_serialNumber()kdk_system_get_kernelVersion()kdk_system_get_eUser()kdk_system_get_eUser_login_time()kdk_system_get_projectName()kdk_system_get_projectSubName()kdk_system_get_productFeatures()kdk_system_get_hostVirtType()kdk_system_get_hostCloudPlatform()kdk_system_is_zyj()kdk_system_get_version_detaile()kdk_system_get_resolving_power()kdk_system_get_systemCategory()kdk_system_get_startup_time()kdk_system_get_shutdown_time()kdk_get_host_vendor()kdk_get_host_product()kdk_get_host_serial()kdk_system_get_hostName()kdk_system_get_word()kdk_system_get_buildTime()kdk_resolving_freeall()kdk_hw_get_pci_info()kdk_hw_free_pci_info()- and
kdk_system_get_appScene()
🌸 SEE ALSO 🌸
go read the girlies' solo pages, they all snapped:
kdk_system_get_architecture(3)kdk_system_get_systemName(3)kdk_system_get_version(3)kdk_system_get_activationStatus(3)kdk_system_get_serialNumber(3)kdk_system_get_kernelVersion(3)kdk_system_get_eUser(3)kdk_system_get_eUser_login_time(3)kdk_system_get_projectName(3)kdk_system_get_projectSubName(3)kdk_system_get_productFeatures(3)kdk_system_get_hostVirtType(3)kdk_system_get_hostCloudPlatform(3)kdk_system_is_zyj(3)kdk_system_get_version_detaile(3)kdk_system_get_resolving_power(3)kdk_system_get_systemCategory(3)kdk_system_get_startup_time(3)kdk_system_get_shutdown_time(3)kdk_get_host_vendor(3)kdk_get_host_product(3)kdk_get_host_serial(3)kdk_system_get_hostName(3)kdk_system_get_word(3)kdk_system_get_buildTime(3)kdk_resolving_freeall(3)kdk_hw_get_pci_info(3)kdk_hw_free_pci_info(3)- and
kdk_system_get_appScene(3)
and that's the whole page, bestie 🫶 this one came straight out of the Linux Programmer's Manual, dated Tue Sep 19 2023. iconic. no notes. 💅💖✨
📦 where this page comes from
- arch rolling: libkysdk-system 3.0.1.4-1 · LGPL-3.0-or-later AND LGPL-2.1-only OR LGPL-3.0-only AND LGPL-2.1-only WITH Qt-LGPL-exception-1.1 OR LGPL-3.0-only WITH Qt-LGPL-exception-1.1 AND MIT
- ubuntu resolute: libkysdk-system-dev 3.0.1.2-0ubuntu1 · LGPL-3.0-only
- ubuntu stonking: libkysdk-system-dev 3.0.1.3-0ubuntu1 · LGPL-3.0-or-later
- 💖 girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms