KDK_REAL_GET_NET_SPEED(3) Library Functions Manual KDK_REAL_GET_NET_SPEED(3) NAME kdk_real_get_net_speed - SYNOPSIS #include extern float kdk_real_get_net_speed(const char *nc); Link with -lkyrealtime. Detailed Description The main function of the interface is to obtain instantaneous internet speed for upload. The argument nc is the name of the NIC, such as "eno1". RETURN VALUE On success, returns the instantaneous network speed of upload with type float. On error, return -1. EXAMPLES #include "stdio.h" #include "libkyrealtimeinfo.h" int main() { // if(argc < 3) // { // printf("./kyrealtime-test <> <>0); // return 0; // } printf("netSpeed : %f0, kdk_real_get_net_speed("enaftgm1i0")); printf("cpuTemp: %f0, kdk_real_get_cpu_temperature()); printf("diskTemp : %d0, kdk_real_get_disk_temperature("/dev/nvme0n1")); printf("diskRate : %d0, kdk_real_get_disk_rate("/dev/nvme0n1")); printf("ifnetSpeed : %f0, kdk_real_get_if_speed("enaftgm1i0")); return 0; } CONFORMING TO These functions are as per the withdrawn POSIX.1e draft specification. The following functions are Linux extensions: kdk_real_get_cpu_temperature(), kdk_real_get_disk_temperature(), kdk_real_get_disk_rate() and kdk_real_get_if_speed(). SEE ALSO kdk_real_get_cpu_temperature(3), kdk_real_get_disk_temperature(3), kdk_real_get_disk_rate(3) and kdk_real_get_if_speed(3). Linux Programmer's Manual Tue Sep 19 2023 KDK_REAL_GET_NET_SPEED(3)