1
0
mirror of https://github.com/shirou/gopsutil.git synced 2025-04-26 13:48:59 +08:00

279 Commits

Author SHA1 Message Date
shirou
37f531010d fix golangcilint errors, ignore gosec G115 2024-08-23 08:22:42 +00:00
Aidan
dbab8d86e9 Additional error case found 2024-06-07 18:20:29 +12:00
Aidan
4ea639f0f8 Incorrect test comparisons 2024-06-07 17:33:35 +12:00
Aidan
b206a02af4 Added tests for uptimer parser 2024-06-07 15:12:47 +12:00
Aidan
b1ddeddda5 Removed repeated logic for days 2024-06-07 11:45:08 +12:00
Aidan
bcde3cb240 Removed logging line 2024-06-06 14:39:57 +12:00
Aidan
8f3d0d0c57 Correctly parse new uptime case at zero minutes, has been tested against all test cases 2024-06-06 14:36:40 +12:00
Aidan
789cad37be Correctly parse new uptime case at zero minutes, has been tested against all test cases 2024-06-06 14:35:05 +12:00
Aidan
2b6d0754ed Comments 2024-06-06 12:42:03 +12:00
Aidan
42957707db Return error if hours not in expected format to prevent panic 2024-06-06 12:39:37 +12:00
Aidan
62e5850726 Fixed parsing error where 'day,' is ignored 2024-06-05 16:03:13 +12:00
shirou
aca0ba4517 [aix]: move tempereture from host to sensors package. 2024-05-28 22:48:47 +09:00
shirou
c34d29a8bf fix: rename v3 that remained in file c to v4 2024-05-28 22:42:36 +09:00
shirou.wakayama
0e9c0ade3c [host][windows]: change platform version from build version to display version 2024-05-28 22:27:17 +09:00
shirou
e9591b5b01 rename redundant test function names, such as TestCPU in cpu package 2024-05-28 22:27:17 +09:00
shirou
ab0d977709 [sensors] move Temperatures from host to sensors. 2024-05-28 22:27:17 +09:00
shirou
bc060cc227 add SPDX License, remove old build tag, and replace import 2024-05-28 22:27:17 +09:00
Dylan Myers
ff4ae36cc0 Remove extraneous development note comments
Move a function from nocgo to main file for disk package
2024-05-22 08:25:39 -04:00
Dylan Myers
9bf502f825 Fix logic errors, syntax errors, and typos 2024-05-17 23:57:00 -04:00
Dylan Myers
b133d602ce Ignore host_aix_ppc64 for now 2024-05-17 23:56:29 -04:00
Dylan Myers
8df2696709 Account for other possible formats output by AIX uptime command 2024-05-17 20:41:16 -04:00
Dylan Myers
9be5f7d0ad Remove extraneous -1 from users function for AIX 2024-05-15 22:51:58 -04:00
Dylan Myers
bd42769f87 Add a working implementation of host.Users() for AIX 2024-05-15 22:12:03 -04:00
Dylan Myers
52d61b8669 Add host support for AIX 2024-05-15 21:44:58 -04:00
shirou
cbefbb023e [host][linux]: add pading on linux_arm64 2024-03-04 22:25:21 +09:00
shirou
cfb7a5dc2e [host][linux]: change Line/User/Host to int8 on utmp
Generated code is uint8 on arm64. However, it is not same as other archtectures.
This commit changes by hand.
2024-03-02 13:22:22 +09:00
shirou
d86a995563 [host][linux]: fix utmp size on linux/arm64 2024-03-02 11:07:47 +09:00
Jonathan Matthew
27ffa28a0d add support for OpenBSD/riscv64 2024-02-11 16:20:56 +10:00
Bryce Kahle
b0d976c49b
ensure host platform are files and have contents
In a containerized deployment, it is common to mount several files from /etc. Within the container, those files will be created regardless if they exist on the host or not. In those instances, the existing code would erroneously return empty platform information.
2024-01-18 10:21:42 -08:00
shirou
b10acd4894 [host]: add EnableBootTimeCache function 2024-01-11 00:49:11 +09:00
Ville Skyttä
362fa4b9c4 Avoid repeated regexp compilations 2023-12-21 09:51:14 +02:00
Xie Weineng
0de2d14a7c add deepin and uos distro 2023-12-13 09:54:52 +08:00
shirou
4b46f2b70c [host][darwin]: fix Users 2023-10-10 23:05:52 +09:00
Justin Yang
7ffb24dbe3
Merge branch 'shirou:master' into feature/netbsd-arm64-port 2023-09-23 16:02:34 +08:00
Justin Yang
4a46201e00 cpu && host: fix compile time errors 2023-09-16 17:44:58 +08:00
Matthieu MOREL
c806740b34
ci(lint): ensure io/ioutil replacement (#1525)
* ci(lint): enure ioutil replacement

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>

* Update host_solaris.go
* Update process_linux_test.go
* Update net_linux_test.go
* Update net_linux_test.go
* Update process_test.go
* Update process_linux_test.go
* Update process_linux_test.go

---------

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-09-12 21:14:04 +09:00
Justin Yang
e82d2e4ca8 host: enable uptime for NetBSD 2023-09-09 21:25:51 +08:00
shirou
0665cafa1b chore: replace deprecated ioutil package to os and io 2023-09-08 17:05:14 +00:00
shirou
febdeab871 chore: change CIRCLECI environment variable to CI. 2023-08-30 14:07:47 +00:00
shirou
3748c19402 [host][linux]: remove double quote from lsb release info
fix: #1502
2023-08-13 12:01:01 +00:00
Antoine Toulme
b712e59295 fix more linting reports 2023-06-03 14:17:16 -07:00
Antoine Toulme
38b94668ea allow to pass context values to override environment variables 2023-06-02 01:31:05 -07:00
Matthieu MOREL
1fb1e3e3e6 ci(lint): correct gci linter
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-04-04 18:07:22 +00:00
Josh Powers
e7c6b6991d
fix: moves common.Warnings to common OS files
This allows all OS types to unwrap the Warnings from errors, and not
just linux in host or windows in disk.

fixes: #1429
2023-03-15 06:39:08 -06:00
Jacob Young
02660eaf7c
Update host/host_linux.go
Use a raw string instead of escaped quotes.

Co-authored-by: shirou <shirou.faw@gmail.com>
2023-03-10 09:41:18 -05:00
Jacob Young
43566581f0 Recognize Cumulus Linux distro
Add Cumulus Linux and Kylin to debian family
2023-02-24 13:59:01 -05:00
shirou
6a5e40a517
Merge pull request #1228 from abner-chenc/master
host: add support for linux/loong64
2023-02-12 16:48:27 +09:00
shirou
e563e6394e
Merge pull request #1356 from N1neSun/patch-1
fix some kylin linux bug
2023-02-12 16:46:43 +09:00
shirou
0494d7f0b9
Merge pull request #1403 from Agilicus/add-ppc64be
[host] linux/ppc: ppc64 definition from ppc64le
2023-02-01 07:55:42 +09:00
Guoqi Chen
b793d83f72 host: add support for linux/loong64
Updates #1338.

Signed-off-by: Guoqi Chen <chenguoqi@loongson.cn>
Co-authored-by: Jiantao Shan <shanjiantao@loongson.cn>
2023-01-14 07:09:59 +08:00