Fix all imports
This commit is contained in:
parent
e494014c5d
commit
2820c0391e
|
@ -8,7 +8,7 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
common "github.com/shirou/gopsutil/common"
|
common "github.com/influxdb/tivan/plugins/system/ps/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
// sys/resource.h
|
// sys/resource.h
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
common "github.com/shirou/gopsutil/common"
|
common "github.com/influxdb/tivan/plugins/system/ps/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func CPUTimes(percpu bool) ([]CPUTimesStat, error) {
|
func CPUTimes(percpu bool) ([]CPUTimesStat, error) {
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
common "github.com/shirou/gopsutil/common"
|
common "github.com/influxdb/tivan/plugins/system/ps/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TODO: Get percpu
|
// TODO: Get percpu
|
||||||
|
|
|
@ -9,7 +9,7 @@ import (
|
||||||
"syscall"
|
"syscall"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
common "github.com/shirou/gopsutil/common"
|
common "github.com/influxdb/tivan/plugins/system/ps/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
common "github.com/shirou/gopsutil/common"
|
common "github.com/influxdb/tivan/plugins/system/ps/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -9,7 +9,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
common "github.com/shirou/gopsutil/common"
|
common "github.com/influxdb/tivan/plugins/system/ps/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -13,7 +13,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
common "github.com/shirou/gopsutil/common"
|
common "github.com/influxdb/tivan/plugins/system/ps/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func HostInfo() (*HostInfoStat, error) {
|
func HostInfo() (*HostInfoStat, error) {
|
||||||
|
|
|
@ -13,7 +13,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
common "github.com/shirou/gopsutil/common"
|
common "github.com/influxdb/tivan/plugins/system/ps/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -14,7 +14,7 @@ import (
|
||||||
"syscall"
|
"syscall"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
common "github.com/shirou/gopsutil/common"
|
common "github.com/influxdb/tivan/plugins/system/ps/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type LSB struct {
|
type LSB struct {
|
||||||
|
|
|
@ -8,8 +8,8 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
common "github.com/shirou/gopsutil/common"
|
common "github.com/influxdb/tivan/plugins/system/ps/common"
|
||||||
process "github.com/shirou/gopsutil/process"
|
process "github.com/influxdb/tivan/plugins/system/ps/process"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -5,7 +5,7 @@ package load
|
||||||
import (
|
import (
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
common "github.com/shirou/gopsutil/common"
|
common "github.com/influxdb/tivan/plugins/system/ps/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func LoadAvg() (*LoadAvgStat, error) {
|
func LoadAvg() (*LoadAvgStat, error) {
|
||||||
|
|
|
@ -5,7 +5,7 @@ package load
|
||||||
import (
|
import (
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
common "github.com/shirou/gopsutil/common"
|
common "github.com/influxdb/tivan/plugins/system/ps/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func LoadAvg() (*LoadAvgStat, error) {
|
func LoadAvg() (*LoadAvgStat, error) {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
package load
|
package load
|
||||||
|
|
||||||
import (
|
import (
|
||||||
common "github.com/shirou/gopsutil/common"
|
common "github.com/influxdb/tivan/plugins/system/ps/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func LoadAvg() (*LoadAvgStat, error) {
|
func LoadAvg() (*LoadAvgStat, error) {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
common "github.com/shirou/gopsutil/common"
|
common "github.com/influxdb/tivan/plugins/system/ps/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func getPageSize() (uint64, error) {
|
func getPageSize() (uint64, error) {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
common "github.com/shirou/gopsutil/common"
|
common "github.com/influxdb/tivan/plugins/system/ps/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func VirtualMemory() (*VirtualMemoryStat, error) {
|
func VirtualMemory() (*VirtualMemoryStat, error) {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
common "github.com/shirou/gopsutil/common"
|
common "github.com/influxdb/tivan/plugins/system/ps/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func VirtualMemory() (*VirtualMemoryStat, error) {
|
func VirtualMemory() (*VirtualMemoryStat, error) {
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"syscall"
|
"syscall"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
common "github.com/shirou/gopsutil/common"
|
common "github.com/influxdb/tivan/plugins/system/ps/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/shirou/gopsutil/common"
|
"github.com/influxdb/tivan/plugins/system/ps/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NetIOCounters(pernic bool) ([]NetIOCountersStat, error) {
|
func NetIOCounters(pernic bool) ([]NetIOCountersStat, error) {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/shirou/gopsutil/common"
|
"github.com/influxdb/tivan/plugins/system/ps/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NetIOCounters(pernic bool) ([]NetIOCountersStat, error) {
|
func NetIOCounters(pernic bool) ([]NetIOCountersStat, error) {
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
"syscall"
|
"syscall"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
common "github.com/shirou/gopsutil/common"
|
common "github.com/influxdb/tivan/plugins/system/ps/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"runtime"
|
"runtime"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
cpu "github.com/shirou/gopsutil/cpu"
|
cpu "github.com/influxdb/tivan/plugins/system/ps/cpu"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Process struct {
|
type Process struct {
|
||||||
|
|
|
@ -10,9 +10,9 @@ import (
|
||||||
"syscall"
|
"syscall"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
common "github.com/shirou/gopsutil/common"
|
common "github.com/influxdb/tivan/plugins/system/ps/common"
|
||||||
cpu "github.com/shirou/gopsutil/cpu"
|
cpu "github.com/influxdb/tivan/plugins/system/ps/cpu"
|
||||||
net "github.com/shirou/gopsutil/net"
|
net "github.com/influxdb/tivan/plugins/system/ps/net"
|
||||||
)
|
)
|
||||||
|
|
||||||
// copied from sys/sysctl.h
|
// copied from sys/sysctl.h
|
||||||
|
|
|
@ -7,9 +7,9 @@ import (
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
common "github.com/shirou/gopsutil/common"
|
common "github.com/influxdb/tivan/plugins/system/ps/common"
|
||||||
cpu "github.com/shirou/gopsutil/cpu"
|
cpu "github.com/influxdb/tivan/plugins/system/ps/cpu"
|
||||||
net "github.com/shirou/gopsutil/net"
|
net "github.com/influxdb/tivan/plugins/system/ps/net"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MemoryInfoExStat is different between OSes
|
// MemoryInfoExStat is different between OSes
|
||||||
|
|
|
@ -11,10 +11,10 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
common "github.com/shirou/gopsutil/common"
|
common "github.com/influxdb/tivan/plugins/system/ps/common"
|
||||||
cpu "github.com/shirou/gopsutil/cpu"
|
cpu "github.com/influxdb/tivan/plugins/system/ps/cpu"
|
||||||
host "github.com/shirou/gopsutil/host"
|
host "github.com/influxdb/tivan/plugins/system/ps/host"
|
||||||
net "github.com/shirou/gopsutil/net"
|
net "github.com/influxdb/tivan/plugins/system/ps/net"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shirou/gopsutil/common"
|
"github.com/influxdb/tivan/plugins/system/ps/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func testGetProcess() Process {
|
func testGetProcess() Process {
|
||||||
|
|
|
@ -11,9 +11,9 @@ import (
|
||||||
|
|
||||||
"github.com/shirou/w32"
|
"github.com/shirou/w32"
|
||||||
|
|
||||||
common "github.com/shirou/gopsutil/common"
|
common "github.com/influxdb/tivan/plugins/system/ps/common"
|
||||||
cpu "github.com/shirou/gopsutil/cpu"
|
cpu "github.com/influxdb/tivan/plugins/system/ps/cpu"
|
||||||
net "github.com/shirou/gopsutil/net"
|
net "github.com/influxdb/tivan/plugins/system/ps/net"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
Loading…
Reference in New Issue