doc.go 6.2 KB

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