Commit Graph

34 Commits (master)

Author SHA1 Message Date
Antoine Toulme 811185d3fe [common] add HOST_PROC_MOUNTINFO to EnvMap 6 months ago
shirou bc060cc227 add SPDX License, remove old build tag, and replace import 10 months ago
Antoine Toulme 35657e3262 add more env keys 2 years ago
Antoine Toulme 0cbdf257ab change to use a typed map per code review 2 years ago
Antoine Toulme 5b9212e240 move the Env key out of internal packages 2 years ago
Daniel Theophanes 0af895258e common: rename package common to internal/common. Add ENV helper funcs.
Package common wasn't used for public functions. Place it in an
internal directory to prevent other packages from using.

Remove the distributed references to "HOST_PROC" and "HOST_SYS"
consts and combine into a common function. This also helps so that
if a env var is defined with a trailing slash all will continue to
work as expected.

Fixes #100
10 years ago
Jonathan Chauncey 0461c50666 chore(*): Fixes #94
Added the ability to fetch an alternative location for /proc via an
environment variable. If the env var is not set it will return /proc as
the default value.
10 years ago
Shirou WAKAYAMA 6e3f81ce18 net[linux]: fix lsof output 10 years ago
Shirou WAKAYAMA 5ae4dcc8ba net[linux]: fix lsof output in linux when no pid outputed. 10 years ago
Shirou WAKAYAMA 93e226a5e3 net[freebsd,linux,darwin]: merge unix like OSes. 10 years ago
Shirou WAKAYAMA 34195b4b58 net[darwin, linux]: get UDP information when inet or all specified. 10 years ago
Shirou WAKAYAMA b3cf7354f6 process[linux, darwin]: implements Connections using lsof. 10 years ago
Shirou WAKAYAMA 0062ae2bfa use LookPath 10 years ago
Shirou WAKAYAMA 8d21be591e net[linux]: implements NetConnections() using lsof. 10 years ago
Shirou WAKAYAMA c50db4f462 net[darwin]: implement NetConnections(). 10 years ago
Shirou WAKAYAMA fc513b6f9a proces[darwin]: change exec.Command to interface to enable mocking.
Add common.invoker interface to mock exec.Command. common.FakeInvoker returns
expected file if exists instead of invoke exec.Command.
Currenly, mocking is enabled only process.Pids(). I will expand to other funcs incrementally.
10 years ago
jay park 2984accfa1 return error when CPUTimes fails on callPs, modify comments on ReadLines 10 years ago
Shirou WAKAYAMA b5ffc220a6 common: Rename StringContains to StringsContains and add StringsHas. 10 years ago
WAKAYAMA shirou 64357f04e7 use StackExchange/wmi instead of invoking wmic process.
Note: This may not work on some old Windows XP.
10 years ago
WAKAYAMA Shirou 5f8b99aa65 windows: GetWmic returns [][]string where string split by "," 10 years ago
若山史郎 d1b9134c32 process: use syscall in common on darwin 10 years ago
WAKAYAMA shirou be5b5a5754 move CallSysCall to common/common_freebsd 10 years ago
WAKAYAMA Shirou bb1747fc85 disk: implements DiskIoCounterInfo on windows. Note: only read/write counts during 500 msec.
Thanks for mackerel-agent!
10 years ago
WAKAYAMA Shirou 4694ce0e4d cpu: use wmic to get CPUInfo on Windows 10 years ago
WAKAYAMA Shirou 69ad6a7822 fix new line problem on Windows 10 years ago
Shirou WAKAYAMA 59fefdbf72 add common_test. 10 years ago
Shirou WAKAYAMA 389b362cce if not NULL terminated, size is not set correctly. 10 years ago
Shirou WAKAYAMA 406cbe9b87 implements pernic of NetIOCounters. 10 years ago
Shirou WAKAYAMA 13cd195a7e change package name. 10 years ago
Shirou WAKAYAMA 3f7769ccfa implement disk_partition of Darwin using golang.org/x/sys/unix. 10 years ago
WAKAYAMA Shirou 9f2c985a28 fix windows build. 10 years ago
Shirou WAKAYAMA a1c1d7b25f fix on Linux. 10 years ago
WAKAYAMA shirou d11680c773 fix bugs on FreeBSD. 10 years ago
Shirou WAKAYAMA a4671fcc2a move subdirectories. refer to issue #24 10 years ago