Struct linux_taskstats::Client

source ·
pub struct Client { /* private fields */ }
Expand description

Interface to access kernel taskstats API through the netlink socket.

Implementations§

Open netlink socket against kernel and create a new instance of Client

Errors
  • when netlink socket initialization failed
  • when kernel doesn’t offer family id for taskstats

Obtain taskstats for given task ID (e.g. single thread of a multithreaded process)

Arguments
  • tid - Kernel task ID (“pid”, “tid” and “task” are used interchangeably and refer to the standard Linux task defined by struct task_struct)
Return
  • TaskStats storing the target task’s stats
Errors
  • when netlink socket failed
  • when kernel responded error
  • when the returned data couldn’t be interpreted

Obtain taskstats for given thread group ID (e.g. cumulated statistics of a multithreaded process)

Arguments
  • tgid - Kernel thread group ID (“tgid”, “process” and “thread group” are used interchangeably and refer to the traditional Unix process)
Return
  • TaskStats storing the target thread group’s aggregated stats
Errors
  • when netlink socket failed
  • when kernel responded error
  • when the returned data couldn’t be interpreted

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.