process_fallback.go 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. // +build !darwin,!linux,!freebsd,!openbsd,!windows,!solaris
  2. package process
  3. import (
  4. "context"
  5. "syscall"
  6. "github.com/shirou/gopsutil/cpu"
  7. "github.com/shirou/gopsutil/internal/common"
  8. "github.com/shirou/gopsutil/net"
  9. )
  10. type MemoryMapsStat struct {
  11. Path string `json:"path"`
  12. Rss uint64 `json:"rss"`
  13. Size uint64 `json:"size"`
  14. Pss uint64 `json:"pss"`
  15. SharedClean uint64 `json:"sharedClean"`
  16. SharedDirty uint64 `json:"sharedDirty"`
  17. PrivateClean uint64 `json:"privateClean"`
  18. PrivateDirty uint64 `json:"privateDirty"`
  19. Referenced uint64 `json:"referenced"`
  20. Anonymous uint64 `json:"anonymous"`
  21. Swap uint64 `json:"swap"`
  22. }
  23. type MemoryInfoExStat struct {
  24. }
  25. func pidsWithContext(ctx context.Context) ([]int32, error) {
  26. return nil, common.ErrNotImplementedError
  27. }
  28. func ProcessesWithContext(ctx context.Context) ([]*Process, error) {
  29. return nil, common.ErrNotImplementedError
  30. }
  31. func PidExistsWithContext(ctx context.Context, pid int32) (bool, error) {
  32. return false, common.ErrNotImplementedError
  33. }
  34. func (p *Process) PpidWithContext(ctx context.Context) (int32, error) {
  35. return 0, common.ErrNotImplementedError
  36. }
  37. func (p *Process) NameWithContext(ctx context.Context) (string, error) {
  38. return "", common.ErrNotImplementedError
  39. }
  40. func (p *Process) TgidWithContext(ctx context.Context) (int32, error) {
  41. return 0, common.ErrNotImplementedError
  42. }
  43. func (p *Process) ExeWithContext(ctx context.Context) (string, error) {
  44. return "", common.ErrNotImplementedError
  45. }
  46. func (p *Process) CmdlineWithContext(ctx context.Context) (string, error) {
  47. return "", common.ErrNotImplementedError
  48. }
  49. func (p *Process) CmdlineSliceWithContext(ctx context.Context) ([]string, error) {
  50. return nil, common.ErrNotImplementedError
  51. }
  52. func (p *Process) createTimeWithContext(ctx context.Context) (int64, error) {
  53. return 0, common.ErrNotImplementedError
  54. }
  55. func (p *Process) CwdWithContext(ctx context.Context) (string, error) {
  56. return "", common.ErrNotImplementedError
  57. }
  58. func (p *Process) ParentWithContext(ctx context.Context) (*Process, error) {
  59. return nil, common.ErrNotImplementedError
  60. }
  61. func (p *Process) StatusWithContext(ctx context.Context) (string, error) {
  62. return "", common.ErrNotImplementedError
  63. }
  64. func (p *Process) ForegroundWithContext(ctx context.Context) (bool, error) {
  65. return false, common.ErrNotImplementedError
  66. }
  67. func (p *Process) UidsWithContext(ctx context.Context) ([]int32, error) {
  68. return nil, common.ErrNotImplementedError
  69. }
  70. func (p *Process) GidsWithContext(ctx context.Context) ([]int32, error) {
  71. return nil, common.ErrNotImplementedError
  72. }
  73. func (p *Process) GroupsWithContext(ctx context.Context) ([]int32, error) {
  74. return nil, common.ErrNotImplementedError
  75. }
  76. func (p *Process) TerminalWithContext(ctx context.Context) (string, error) {
  77. return "", common.ErrNotImplementedError
  78. }
  79. func (p *Process) NiceWithContext(ctx context.Context) (int32, error) {
  80. return 0, common.ErrNotImplementedError
  81. }
  82. func (p *Process) IOniceWithContext(ctx context.Context) (int32, error) {
  83. return 0, common.ErrNotImplementedError
  84. }
  85. func (p *Process) RlimitWithContext(ctx context.Context) ([]RlimitStat, error) {
  86. return nil, common.ErrNotImplementedError
  87. }
  88. func (p *Process) RlimitUsageWithContext(ctx context.Context, gatherUsed bool) ([]RlimitStat, error) {
  89. return nil, common.ErrNotImplementedError
  90. }
  91. func (p *Process) IOCountersWithContext(ctx context.Context) (*IOCountersStat, error) {
  92. return nil, common.ErrNotImplementedError
  93. }
  94. func (p *Process) NumCtxSwitchesWithContext(ctx context.Context) (*NumCtxSwitchesStat, error) {
  95. return nil, common.ErrNotImplementedError
  96. }
  97. func (p *Process) NumFDsWithContext(ctx context.Context) (int32, error) {
  98. return 0, common.ErrNotImplementedError
  99. }
  100. func (p *Process) NumThreadsWithContext(ctx context.Context) (int32, error) {
  101. return 0, common.ErrNotImplementedError
  102. }
  103. func (p *Process) ThreadsWithContext(ctx context.Context) (map[int32]*cpu.TimesStat, error) {
  104. return nil, common.ErrNotImplementedError
  105. }
  106. func (p *Process) TimesWithContext(ctx context.Context) (*cpu.TimesStat, error) {
  107. return nil, common.ErrNotImplementedError
  108. }
  109. func (p *Process) CPUAffinityWithContext(ctx context.Context) ([]int32, error) {
  110. return nil, common.ErrNotImplementedError
  111. }
  112. func (p *Process) MemoryInfoWithContext(ctx context.Context) (*MemoryInfoStat, error) {
  113. return nil, common.ErrNotImplementedError
  114. }
  115. func (p *Process) MemoryInfoExWithContext(ctx context.Context) (*MemoryInfoExStat, error) {
  116. return nil, common.ErrNotImplementedError
  117. }
  118. func (p *Process) PageFaultsWithContext(ctx context.Context) (*PageFaultsStat, error) {
  119. return nil, common.ErrNotImplementedError
  120. }
  121. func (p *Process) ChildrenWithContext(ctx context.Context) ([]*Process, error) {
  122. return nil, common.ErrNotImplementedError
  123. }
  124. func (p *Process) OpenFilesWithContext(ctx context.Context) ([]OpenFilesStat, error) {
  125. return nil, common.ErrNotImplementedError
  126. }
  127. func (p *Process) ConnectionsWithContext(ctx context.Context) ([]net.ConnectionStat, error) {
  128. return nil, common.ErrNotImplementedError
  129. }
  130. func (p *Process) ConnectionsMaxWithContext(ctx context.Context, max int) ([]net.ConnectionStat, error) {
  131. return nil, common.ErrNotImplementedError
  132. }
  133. func (p *Process) NetIOCountersWithContext(ctx context.Context, pernic bool) ([]net.IOCountersStat, error) {
  134. return nil, common.ErrNotImplementedError
  135. }
  136. func (p *Process) MemoryMapsWithContext(ctx context.Context, grouped bool) (*[]MemoryMapsStat, error) {
  137. return nil, common.ErrNotImplementedError
  138. }
  139. func (p *Process) SendSignalWithContext(ctx context.Context, sig syscall.Signal) error {
  140. return common.ErrNotImplementedError
  141. }
  142. func (p *Process) SuspendWithContext(ctx context.Context) error {
  143. return common.ErrNotImplementedError
  144. }
  145. func (p *Process) ResumeWithContext(ctx context.Context) error {
  146. return common.ErrNotImplementedError
  147. }
  148. func (p *Process) TerminateWithContext(ctx context.Context) error {
  149. return common.ErrNotImplementedError
  150. }
  151. func (p *Process) KillWithContext(ctx context.Context) error {
  152. return common.ErrNotImplementedError
  153. }
  154. func (p *Process) UsernameWithContext(ctx context.Context) (string, error) {
  155. return "", common.ErrNotImplementedError
  156. }
  157. func (p *Process) EnvironWithContext(ctx context.Context) ([]string, error) {
  158. return nil, common.ErrNotImplementedError
  159. }