Skip to content

Commit fb3f2d8

Browse files
authoredMar 25, 2024··
[1] Fix windows load avg (#1)
Use the same logic as in Linux[^1] but with `NtQuerySystemInformation` Windows API call.[^2] [^1]: https://www.brendangregg.com/blog/2017-08-08/linux-load-averages.html [^2]: see shirou#1358
1 parent e767a0f commit fb3f2d8

File tree

101 files changed

+381
-166
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+381
-166
lines changed
 

‎.golangci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ linters-settings:
5252
sections:
5353
- standard
5454
- default
55-
- prefix(github.com/shirou)
55+
- prefix(github.com/cloudsoda)
5656
gomodguard:
5757
blocked:
5858
modules:

‎README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# gopsutil: psutil for golang
22

3-
[![Test](https://github.com/shirou/gopsutil/actions/workflows/test.yml/badge.svg)](https://github.com/shirou/gopsutil/actions/workflows/test.yml) [![Coverage Status](https://coveralls.io/repos/github/shirou/gopsutil/badge.svg?branch=master)](https://coveralls.io/github/shirou/gopsutil?branch=master) [![Go Reference](https://pkg.go.dev/badge/github.com/shirou/gopsutil/v3.svg)](https://pkg.go.dev/github.com/shirou/gopsutil/v3) [![Go Documentation](https://godocs.io/github.com/shirou/gopsutil/v3?status.svg)](https://godocs.io/github.com/shirou/gopsutil/v3) [![Calendar Versioning](https://img.shields.io/badge/calver-vMAJOR.YY.MM-22bfda.svg)](https://calver.org/)
3+
[![Test](https://github.com/CloudSoda/gopsutil/actions/workflows/test.yml/badge.svg)](https://github.com/CloudSoda/gopsutil/actions/workflows/test.yml) [![Coverage Status](https://coveralls.io/repos/github/CloudSoda/gopsutil/badge.svg?branch=master)](https://coveralls.io/github/CloudSoda/gopsutil?branch=master) [![Go Reference](https://pkg.go.dev/badge/github.com/CloudSoda/gopsutil/v3.svg)](https://pkg.go.dev/github.com/CloudSoda/gopsutil/v3) [![Go Documentation](https://godocs.io/github.com/CloudSoda/gopsutil/v3?status.svg)](https://godocs.io/github.com/CloudSoda/gopsutil/v3) [![Calendar Versioning](https://img.shields.io/badge/calver-vMAJOR.YY.MM-22bfda.svg)](https://calver.org/)
44

55
This is a port of psutil (https://github.com/giampaolo/psutil). The
66
challenge is porting all psutil functions on some architectures.
@@ -52,8 +52,8 @@ package main
5252
import (
5353
"fmt"
5454

55-
"github.com/shirou/gopsutil/v3/mem"
56-
// "github.com/shirou/gopsutil/mem" // to use v2
55+
"github.com/CloudSoda/gopsutil/v3/mem"
56+
// "github.com/CloudSoda/gopsutil/mem" // to use v2
5757
)
5858

5959
func main() {
@@ -98,7 +98,7 @@ You can set an alternative location to `/proc/N/mountinfo` by setting the
9898

9999
### Adding settings using `context` (from v3.23.6)
100100

101-
As of v3.23.6, it is now possible to pass a path location using `context`: import `"github.com/shirou/gopsutil/v3/common"` and pass a context with `common.EnvMap` set to `common.EnvKey`, and the location will be used within each function.
101+
As of v3.23.6, it is now possible to pass a path location using `context`: import `"github.com/CloudSoda/gopsutil/v3/common"` and pass a context with `common.EnvMap` set to `common.EnvKey`, and the location will be used within each function.
102102

103103
```
104104
ctx := context.WithValue(context.Background(),
@@ -113,7 +113,7 @@ First priority is given to the value set in `context`, then the value from the e
113113

114114
As of v3.24.1, it is now possible to cached some values. These values default to false, not cached.
115115

116-
Be very careful that enabling the cache may cause inconsistencies. For example, if you enable caching of boottime on Linux, be aware that unintended values may be returned if [the boottime is changed by NTP after booted](https://github.com/shirou/gopsutil/issues/1070#issuecomment-842512782).
116+
Be very careful that enabling the cache may cause inconsistencies. For example, if you enable caching of boottime on Linux, be aware that unintended values may be returned if [the boottime is changed by NTP after booted](https://github.com/CloudSoda/gopsutil/issues/1070#issuecomment-842512782).
117117

118118
- `host`
119119
- EnableBootTimeCache
@@ -122,7 +122,7 @@ Be very careful that enabling the cache may cause inconsistencies. For example,
122122

123123
## Documentation
124124

125-
See https://pkg.go.dev/github.com/shirou/gopsutil/v3 or https://godocs.io/github.com/shirou/gopsutil/v3
125+
See https://pkg.go.dev/github.com/CloudSoda/gopsutil/v3 or https://godocs.io/github.com/CloudSoda/gopsutil/v3
126126

127127
## Requirements
128128

0 commit comments

Comments
 (0)
Please sign in to comment.