Crate linux_taskstats

source ·

Modules§

Structs§

  • Statistics related to I/O at block device level
  • Interface to access kernel taskstats API through the netlink socket.
  • Statistics related to context switches
  • Staticstics related to CPU time
  • Statistics related to scheduling delay (delay accounting)
  • Staticstics related to I/O at syscall surface
  • Statistics related to memory, vm
  • The taskstats representation for a task. This struct remaps commonly used struct taskstats fields for primarily:
  • This is custom copy of the generated struct taskstats from linux version 3.10.0 and in this crate this type is used to read binary data transferred from linux kernel. The reason of doing this despite the bindgen generates rust bindings including struct taskstats is due to potential corruption of on-memory struct layout likely caused by old clang version. ref: https://github.com/rust-lang/rust-bindgen/issues/867 Specifically, when bindgen generates struct taskstats with older clang version, the resulting struct defined in generated rust source code contains size padding as the last member of the struct causing offset of members after ac_uid to shift 4-byte or more and the result data becomes unreliable. The bindgen generated definition works well in environment that uses newer clang versions, but I decided to use copied definition of this struct for the time being by following considerations:

Enums§

  • Errors possibly returned by Client

Constants§

Type Aliases§