process_fallback.go 6.1 KB

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