LIBKYSYSINFO(3)

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

💖 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_architecture
  • kdk_system_get_systemName
  • kdk_system_get_version
  • kdk_system_get_activationStatus
  • 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
  • kdk_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:


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