Sending Netlink Taskstats message using libnl-3
问题 I want to read out linux kernel statistics of a single thread using netlink socket and taskstats. I could get taskstats to work using a python wrapper (https://github.com/facebook/gnlpy) but I want to do a C implementation. After setting up the socket, the message parameters and sending, the receiving nl_recvmsgs_default(sock) always returns an error code -7 ("Invalid input data or parameter") or -12 ("Object not found") depending on how I create the message to send. I checked all method