I am trying to create a performance display for my IOT device. The device uses Linux so , i want to get the number of file handles programmatically using C program. Currently i am using libprocps API to get all other data. Now i want to get the open file descriptors/handles for whole IOT device.
ls /proc/[pid]/fd |wc -l gives the number of files. But this data i need from any API in C Program. Which variable holds the fdinfo in proc