doc.go 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  1. //go:build !aix
  2. // +build !aix
  3. // Copyright 2020 Power-Devops.com. All rights reserved.
  4. // Use of this source code is governed by the license
  5. // that can be found in the LICENSE file.
  6. /*
  7. Package perfstat is Go interface to IBM AIX libperfstat.
  8. To use it you need AIX with installed bos.perf.libperfstat. You can check, if is installed using the following command:
  9. $ lslpp -L bos.perf.perfstat
  10. The package is written using Go 1.14.7 and AIX 7.2 TL5. It should work with earlier TLs of AIX 7.2, but I
  11. can't guarantee that perfstat structures in the TLs have all the same fields as the structures in AIX 7.2 TL5.
  12. For documentation of perfstat on AIX and using it in programs refer to the official IBM documentation:
  13. https://www.ibm.com/support/knowledgecenter/ssw_aix_72/performancetools/idprftools_perfstat.html
  14. */
  15. package perfstat
  16. import (
  17. "fmt"
  18. "time"
  19. )
  20. // EnableLVMStat() switches on LVM (logical volumes and volume groups) performance statistics.
  21. // With this enabled you can use fields KBReads, KBWrites, and IOCnt
  22. // in LogicalVolume and VolumeGroup data types.
  23. func EnableLVMStat() {}
  24. // DisableLVMStat() switchess of LVM (logical volumes and volume groups) performance statistics.
  25. // This is the default state. In this case LogicalVolume and VolumeGroup data types are
  26. // populated with informations about LVM structures, but performance statistics fields
  27. // (KBReads, KBWrites, IOCnt) are empty.
  28. func DisableLVMStat() {}
  29. // CpuStat() returns array of CPU structures with information about
  30. // logical CPUs on the system.
  31. // IBM documentation:
  32. // - https://www.ibm.com/support/knowledgecenter/ssw_aix_72/performancetools/idprftools_perfstat_int_cpu.html
  33. // - https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/p_bostechref/perfstat_cpu.html
  34. func CpuStat() ([]CPU, error) {
  35. return nil, fmt.Errorf("not implemented")
  36. }
  37. // CpuTotalStat() returns general information about CPUs on the system.
  38. // IBM documentation:
  39. // - https://www.ibm.com/support/knowledgecenter/ssw_aix_72/performancetools/idprftools_perfstat_glob_cpu.html
  40. // - https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/p_bostechref/perfstat_cputot.html
  41. func CpuTotalStat() (*CPUTotal, error) {
  42. return nil, fmt.Errorf("not implemented")
  43. }
  44. // CpuUtilStat() calculates CPU utilization.
  45. // IBM documentation:
  46. // - https://www.ibm.com/support/knowledgecenter/ssw_aix_72/performancetools/idprftools_perfstat_cpu_util.html
  47. // - https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/p_bostechref/perfstat_cpu_util.html
  48. func CpuUtilStat(intvl time.Duration) (*CPUUtil, error) {
  49. return nil, fmt.Errorf("not implemented")
  50. }
  51. func DiskTotalStat() (*DiskTotal, error) {
  52. return nil, fmt.Errorf("not implemented")
  53. }
  54. func DiskAdapterStat() ([]DiskAdapter, error) {
  55. return nil, fmt.Errorf("not implemented")
  56. }
  57. func DiskStat() ([]Disk, error) {
  58. return nil, fmt.Errorf("not implemented")
  59. }
  60. func DiskPathStat() ([]DiskPath, error) {
  61. return nil, fmt.Errorf("not implemented")
  62. }
  63. func FCAdapterStat() ([]FCAdapter, error) {
  64. return nil, fmt.Errorf("not implemented")
  65. }
  66. func PartitionStat() (*PartitionConfig, error) {
  67. return nil, fmt.Errorf("not implemented")
  68. }
  69. func LogicalVolumeStat() ([]LogicalVolume, error) {
  70. return nil, fmt.Errorf("not implemented")
  71. }
  72. func VolumeGroupStat() ([]VolumeGroup, error) {
  73. return nil, fmt.Errorf("not implemented")
  74. }
  75. func MemoryTotalStat() (*MemoryTotal, error) {
  76. return nil, fmt.Errorf("not implemented")
  77. }
  78. func MemoryPageStat() ([]MemoryPage, error) {
  79. return nil, fmt.Errorf("not implemented")
  80. }
  81. func PagingSpaceStat() ([]PagingSpace, error) {
  82. return nil, fmt.Errorf("not implemented")
  83. }
  84. func NetIfaceTotalStat() (*NetIfaceTotal, error) {
  85. return nil, fmt.Errorf("not implemented")
  86. }
  87. func NetBufferStat() ([]NetBuffer, error) {
  88. return nil, fmt.Errorf("not implemented")
  89. }
  90. func NetIfaceStat() ([]NetIface, error) {
  91. return nil, fmt.Errorf("not implemented")
  92. }
  93. func NetAdapterStat() ([]NetAdapter, error) {
  94. return nil, fmt.Errorf("not implemented")
  95. }
  96. func ProcessStat() ([]Process, error) {
  97. return nil, fmt.Errorf("not implemented")
  98. }
  99. func ThreadStat() ([]Thread, error) {
  100. return nil, fmt.Errorf("not implemented")
  101. }
  102. func Sysconf(name int32) (int64, error) {
  103. return 0, fmt.Errorf("not implemented")
  104. }
  105. func GetCPUImplementation() string {
  106. return ""
  107. }
  108. func POWER9OrNewer() bool {
  109. return false
  110. }
  111. func POWER9() bool {
  112. return false
  113. }
  114. func POWER8OrNewer() bool {
  115. return false
  116. }
  117. func POWER8() bool {
  118. return false
  119. }
  120. func POWER7OrNewer() bool {
  121. return false
  122. }
  123. func POWER7() bool {
  124. return false
  125. }
  126. func HasTransactionalMemory() bool {
  127. return false
  128. }
  129. func Is64Bit() bool {
  130. return false
  131. }
  132. func IsSMP() bool {
  133. return false
  134. }
  135. func HasVMX() bool {
  136. return false
  137. }
  138. func HasVSX() bool {
  139. return false
  140. }
  141. func HasDFP() bool {
  142. return false
  143. }
  144. func HasNxGzip() bool {
  145. return false
  146. }
  147. func PksCapable() bool {
  148. return false
  149. }
  150. func PksEnabled() bool {
  151. return false
  152. }
  153. func CPUMode() string {
  154. return ""
  155. }
  156. func KernelBits() int {
  157. return 0
  158. }
  159. func IsLPAR() bool {
  160. return false
  161. }
  162. func CpuAddCapable() bool {
  163. return false
  164. }
  165. func CpuRemoveCapable() bool {
  166. return false
  167. }
  168. func MemoryAddCapable() bool {
  169. return false
  170. }
  171. func MemoryRemoveCapable() bool {
  172. return false
  173. }
  174. func DLparCapable() bool {
  175. return false
  176. }
  177. func IsNUMA() bool {
  178. return false
  179. }
  180. func KernelKeys() bool {
  181. return false
  182. }
  183. func RecoveryMode() bool {
  184. return false
  185. }
  186. func EnhancedAffinity() bool {
  187. return false
  188. }
  189. func VTpmEnabled() bool {
  190. return false
  191. }
  192. func IsVIOS() bool {
  193. return false
  194. }
  195. func MLSEnabled() bool {
  196. return false
  197. }
  198. func SPLparCapable() bool {
  199. return false
  200. }
  201. func SPLparEnabled() bool {
  202. return false
  203. }
  204. func DedicatedLpar() bool {
  205. return false
  206. }
  207. func SPLparCapped() bool {
  208. return false
  209. }
  210. func SPLparDonating() bool {
  211. return false
  212. }
  213. func SmtCapable() bool {
  214. return false
  215. }
  216. func SmtEnabled() bool {
  217. return false
  218. }
  219. func VrmCapable() bool {
  220. return false
  221. }
  222. func VrmEnabled() bool {
  223. return false
  224. }
  225. func AmeEnabled() bool {
  226. return false
  227. }
  228. func EcoCapable() bool {
  229. return false
  230. }
  231. func EcoEnabled() bool {
  232. return false
  233. }
  234. func BootTime() (uint64, error) {
  235. return 0, fmt.Errorf("Not implemented")
  236. }
  237. func UptimeSeconds() (uint64, error) {
  238. return 0, fmt.Errorf("Not implemented")
  239. }
  240. func FileSystemStat() ([]FileSystem, error) {
  241. return nil, fmt.Errorf("Not implemented")
  242. }