mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-09 06:26:39 +00:00
Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ec6b786608 | ||
|
|
781ab7ca20 | ||
|
|
6bb522b6c3 | ||
|
|
9d515255a6 | ||
|
|
012e143601 | ||
|
|
880ad4d07c | ||
|
|
b6d5367093 | ||
|
|
4895e707ef | ||
|
|
0616dd6690 | ||
|
|
53048a42fd | ||
|
|
a41b9de37c | ||
|
|
745f0a6f61 | ||
|
|
8ca60af43a | ||
|
|
a66f0b5475 | ||
|
|
25b8dba6df | ||
|
|
f5365c96f6 | ||
|
|
a05febe069 |
@@ -57,7 +57,7 @@ func NewCPUCollector() (Collector, error) {
|
||||
// to the provided prometheus Metric channel.
|
||||
func (c *CPUCollector) Collect(ch chan<- prometheus.Metric) error {
|
||||
if desc, err := c.collect(ch); err != nil {
|
||||
log.Println("[ERROR] failed collecting os metrics:", desc, err)
|
||||
log.Println("[ERROR] failed collecting cpu metrics:", desc, err)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
||||
261
collector/iis.go
261
collector/iis.go
@@ -1,5 +1,7 @@
|
||||
// returns data points from Win32_PerfRawData_W3SVC_WebService
|
||||
// returns data points from the following classes:
|
||||
// - Win32_PerfRawData_W3SVC_WebService
|
||||
// https://msdn.microsoft.com/en-us/library/aa394345 - Win32_OperatingSystem class
|
||||
// - Win32_PerfRawData_APPPOOLCountersProvider_APPPOOLWAS
|
||||
|
||||
package collector
|
||||
|
||||
@@ -20,9 +22,12 @@ func init() {
|
||||
var (
|
||||
siteWhitelist = flag.String("collector.iis.site-whitelist", ".+", "Regexp of sites to whitelist. Site name must both match whitelist and not match blacklist to be included.")
|
||||
siteBlacklist = flag.String("collector.iis.site-blacklist", "", "Regexp of sites to blacklist. Site name must both match whitelist and not match blacklist to be included.")
|
||||
appWhitelist = flag.String("collector.iis.app-whitelist", ".+", "Regexp of apps to whitelist. App name must both match whitelist and not match blacklist to be included.")
|
||||
appBlacklist = flag.String("collector.iis.app-blacklist", "", "Regexp of apps to blacklist. App name must both match whitelist and not match blacklist to be included.")
|
||||
)
|
||||
|
||||
// A IISCollector is a Prometheus collector for WMI Win32_PerfRawData_W3SVC_WebService metrics
|
||||
// A IISCollector is a Prometheus collector for WMI Win32_PerfRawData_W3SVC_WebService
|
||||
// and Win32_PerfRawData_APPPOOLCountersProvider_APPPOOLWAS metrics
|
||||
type IISCollector struct {
|
||||
CurrentAnonymousUsers *prometheus.Desc
|
||||
CurrentBlockedAsyncIORequests *prometheus.Desc
|
||||
@@ -49,6 +54,23 @@ type IISCollector struct {
|
||||
|
||||
siteWhitelistPattern *regexp.Regexp
|
||||
siteBlacklistPattern *regexp.Regexp
|
||||
|
||||
CurrentApplicationPoolState *prometheus.Desc
|
||||
CurrentApplicationPoolUptime *prometheus.Desc
|
||||
CurrentWorkerProcesses *prometheus.Desc
|
||||
MaximumWorkerProcesses *prometheus.Desc
|
||||
RecentWorkerProcessFailures *prometheus.Desc
|
||||
TimeSinceLastWorkerProcessFailure *prometheus.Desc
|
||||
TotalApplicationPoolRecycles *prometheus.Desc
|
||||
TotalApplicationPoolUptime *prometheus.Desc
|
||||
TotalWorkerProcessesCreated *prometheus.Desc
|
||||
TotalWorkerProcessFailures *prometheus.Desc
|
||||
TotalWorkerProcessPingFailures *prometheus.Desc
|
||||
TotalWorkerProcessShutdownFailures *prometheus.Desc
|
||||
TotalWorkerProcessStartupFailures *prometheus.Desc
|
||||
|
||||
appWhitelistPattern *regexp.Regexp
|
||||
appBlacklistPattern *regexp.Regexp
|
||||
}
|
||||
|
||||
// NewIISCollector ...
|
||||
@@ -56,6 +78,7 @@ func NewIISCollector() (Collector, error) {
|
||||
const subsystem = "iis"
|
||||
|
||||
return &IISCollector{
|
||||
// Websites
|
||||
// Gauges
|
||||
CurrentAnonymousUsers: prometheus.NewDesc(
|
||||
prometheus.BuildFQName(Namespace, subsystem, "current_anonymous_users"),
|
||||
@@ -188,6 +211,92 @@ func NewIISCollector() (Collector, error) {
|
||||
|
||||
siteWhitelistPattern: regexp.MustCompile(fmt.Sprintf("^(?:%s)$", *siteWhitelist)),
|
||||
siteBlacklistPattern: regexp.MustCompile(fmt.Sprintf("^(?:%s)$", *siteBlacklist)),
|
||||
|
||||
// App Pools
|
||||
// Guages
|
||||
CurrentApplicationPoolState: prometheus.NewDesc(
|
||||
prometheus.BuildFQName(Namespace, subsystem, "current_application_pool_state"),
|
||||
"The current status of the application pool (1 - Uninitialized, 2 - Initialized, 3 - Running, 4 - Disabling, 5 - Disabled, 6 - Shutdown Pending, 7 - Delete Pending) (CurrentApplicationPoolState)",
|
||||
[]string{"app","state"},
|
||||
nil,
|
||||
),
|
||||
CurrentApplicationPoolUptime: prometheus.NewDesc(
|
||||
prometheus.BuildFQName(Namespace, subsystem, "current_application_pool_start_time"),
|
||||
"The unix timestamp for the application pool start time (CurrentApplicationPoolUptime)",
|
||||
[]string{"app"},
|
||||
nil,
|
||||
),
|
||||
CurrentWorkerProcesses: prometheus.NewDesc(
|
||||
prometheus.BuildFQName(Namespace, subsystem, "current_worker_processes"),
|
||||
"The current number of worker processes that are running in the application pool (CurrentWorkerProcesses)",
|
||||
[]string{"app"},
|
||||
nil,
|
||||
),
|
||||
MaximumWorkerProcesses: prometheus.NewDesc(
|
||||
prometheus.BuildFQName(Namespace, subsystem, "maximum_worker_processes"),
|
||||
"The maximum number of worker processes that have been created for the application pool since Windows Process Activation Service (WAS) started (MaximumWorkerProcesses)",
|
||||
[]string{"app"},
|
||||
nil,
|
||||
),
|
||||
RecentWorkerProcessFailures: prometheus.NewDesc(
|
||||
prometheus.BuildFQName(Namespace, subsystem, "recent_worker_process_failures"),
|
||||
"The number of times that worker processes for the application pool failed during the rapid-fail protection interval (RecentWorkerProcessFailures)",
|
||||
[]string{"app"},
|
||||
nil,
|
||||
),
|
||||
|
||||
// Counters
|
||||
TimeSinceLastWorkerProcessFailure: prometheus.NewDesc(
|
||||
prometheus.BuildFQName(Namespace, subsystem, "time_since_last_worker_process_failure"),
|
||||
"The length of time, in seconds, since the last worker process failure occurred for the application pool (TimeSinceLastWorkerProcessFailure)",
|
||||
[]string{"app"},
|
||||
nil,
|
||||
),
|
||||
TotalApplicationPoolRecycles: prometheus.NewDesc(
|
||||
prometheus.BuildFQName(Namespace, subsystem, "total_application_pool_recycles"),
|
||||
"The number of times that the application pool has been recycled since Windows Process Activation Service (WAS) started (TotalApplicationPoolRecycles)",
|
||||
[]string{"app"},
|
||||
nil,
|
||||
),
|
||||
TotalApplicationPoolUptime: prometheus.NewDesc(
|
||||
prometheus.BuildFQName(Namespace, subsystem, "total_application_pool_start_time"),
|
||||
"The unix timestamp for the application pool of when the Windows Process Activation Service (WAS) started (TotalApplicationPoolUptime)",
|
||||
[]string{"app"},
|
||||
nil,
|
||||
),
|
||||
TotalWorkerProcessesCreated: prometheus.NewDesc(
|
||||
prometheus.BuildFQName(Namespace, subsystem, "total_worker_processes_created"),
|
||||
"The number of worker processes created for the application pool since Windows Process Activation Service (WAS) started (TotalWorkerProcessesCreated)",
|
||||
[]string{"app"},
|
||||
nil,
|
||||
),
|
||||
TotalWorkerProcessFailures: prometheus.NewDesc(
|
||||
prometheus.BuildFQName(Namespace, subsystem, "total_worker_process_failures"),
|
||||
"The number of times that worker processes have crashed since the application pool was started (TotalWorkerProcessFailures)",
|
||||
[]string{"app"},
|
||||
nil,
|
||||
),
|
||||
TotalWorkerProcessPingFailures: prometheus.NewDesc(
|
||||
prometheus.BuildFQName(Namespace, subsystem, "total_worker_process_ping_failures"),
|
||||
"The number of times that Windows Process Activation Service (WAS) did not receive a response to ping messages sent to a worker process (TotalWorkerProcessPingFailures)",
|
||||
[]string{"app"},
|
||||
nil,
|
||||
),
|
||||
TotalWorkerProcessShutdownFailures: prometheus.NewDesc(
|
||||
prometheus.BuildFQName(Namespace, subsystem, "total_worker_process_shutdown_failures"),
|
||||
"The number of times that Windows Process Activation Service (WAS) failed to shut down a worker process (TotalWorkerProcessShutdownFailures)",
|
||||
[]string{"app"},
|
||||
nil,
|
||||
),
|
||||
TotalWorkerProcessStartupFailures: prometheus.NewDesc(
|
||||
prometheus.BuildFQName(Namespace, subsystem, "total_worker_process_startup_failures"),
|
||||
"The number of times that Windows Process Activation Service (WAS) failed to start a worker process (TotalWorkerProcessStartupFailures)",
|
||||
[]string{"app"},
|
||||
nil,
|
||||
),
|
||||
|
||||
appWhitelistPattern: regexp.MustCompile(fmt.Sprintf("^(?:%s)$", *siteWhitelist)),
|
||||
appBlacklistPattern: regexp.MustCompile(fmt.Sprintf("^(?:%s)$", *siteBlacklist)),
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -245,6 +354,36 @@ type Win32_PerfRawData_W3SVC_WebService struct {
|
||||
TotalUnlockRequests uint32
|
||||
}
|
||||
|
||||
type Win32_PerfRawData_APPPOOLCountersProvider_APPPOOLWAS struct {
|
||||
Name string
|
||||
Frequency_Object uint64
|
||||
Timestamp_Object uint64
|
||||
|
||||
CurrentApplicationPoolState uint32
|
||||
CurrentApplicationPoolUptime uint64
|
||||
CurrentWorkerProcesses uint32
|
||||
MaximumWorkerProcesses uint32
|
||||
RecentWorkerProcessFailures uint32
|
||||
TimeSinceLastWorkerProcessFailure uint64
|
||||
TotalApplicationPoolRecycles uint32
|
||||
TotalApplicationPoolUptime uint64
|
||||
TotalWorkerProcessesCreated uint32
|
||||
TotalWorkerProcessFailures uint32
|
||||
TotalWorkerProcessPingFailures uint32
|
||||
TotalWorkerProcessShutdownFailures uint32
|
||||
TotalWorkerProcessStartupFailures uint32
|
||||
}
|
||||
|
||||
var ApplicationStates = map[uint32]string{
|
||||
1: "Uninitialized",
|
||||
2: "Initialized",
|
||||
3: "Running",
|
||||
4: "Disabling",
|
||||
5: "Disabled",
|
||||
6: "Shutdown Pending",
|
||||
7: "Delete Pending",
|
||||
}
|
||||
|
||||
func (c *IISCollector) collect(ch chan<- prometheus.Metric) (*prometheus.Desc, error) {
|
||||
var dst []Win32_PerfRawData_W3SVC_WebService
|
||||
q := wmi.CreateQuery(&dst, "")
|
||||
@@ -498,6 +637,124 @@ func (c *IISCollector) collect(ch chan<- prometheus.Metric) (*prometheus.Desc, e
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
var dst2 []Win32_PerfRawData_APPPOOLCountersProvider_APPPOOLWAS
|
||||
q2 := wmi.CreateQuery(&dst2, "")
|
||||
if err := wmi.Query(q2, &dst2); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
for _, app := range dst2 {
|
||||
if app.Name == "_Total" ||
|
||||
c.appBlacklistPattern.MatchString(app.Name) ||
|
||||
!c.appWhitelistPattern.MatchString(app.Name) {
|
||||
continue
|
||||
}
|
||||
|
||||
// Guages
|
||||
for key, label := range ApplicationStates {
|
||||
isCurrentState := 0.0
|
||||
if key == app.CurrentApplicationPoolState {
|
||||
isCurrentState = 1.0
|
||||
}
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.CurrentApplicationPoolState,
|
||||
prometheus.GaugeValue,
|
||||
isCurrentState,
|
||||
app.Name,
|
||||
label,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.CurrentApplicationPoolUptime,
|
||||
prometheus.GaugeValue,
|
||||
// convert from Windows timestamp (1 jan 1601) to unix timestamp (1 jan 1970)
|
||||
float64(app.CurrentApplicationPoolUptime - 116444736000000000) / float64(app.Frequency_Object),
|
||||
app.Name,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.CurrentWorkerProcesses,
|
||||
prometheus.GaugeValue,
|
||||
float64(app.CurrentWorkerProcesses),
|
||||
app.Name,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.MaximumWorkerProcesses,
|
||||
prometheus.GaugeValue,
|
||||
float64(app.MaximumWorkerProcesses),
|
||||
app.Name,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.RecentWorkerProcessFailures,
|
||||
prometheus.GaugeValue,
|
||||
float64(app.RecentWorkerProcessFailures),
|
||||
app.Name,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.TimeSinceLastWorkerProcessFailure,
|
||||
prometheus.GaugeValue,
|
||||
float64(app.TimeSinceLastWorkerProcessFailure),
|
||||
app.Name,
|
||||
)
|
||||
|
||||
// Counters
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.TotalApplicationPoolRecycles,
|
||||
prometheus.CounterValue,
|
||||
float64(app.TotalApplicationPoolRecycles),
|
||||
app.Name,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.TotalApplicationPoolUptime,
|
||||
prometheus.CounterValue,
|
||||
// convert from Windows timestamp (1 jan 1601) to unix timestamp (1 jan 1970)
|
||||
float64(app.TotalApplicationPoolUptime - 116444736000000000) / float64(app.Frequency_Object),
|
||||
app.Name,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.TotalWorkerProcessesCreated,
|
||||
prometheus.CounterValue,
|
||||
float64(app.TotalWorkerProcessesCreated),
|
||||
app.Name,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.TotalWorkerProcessFailures,
|
||||
prometheus.CounterValue,
|
||||
float64(app.TotalWorkerProcessFailures),
|
||||
app.Name,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.TotalWorkerProcessPingFailures,
|
||||
prometheus.CounterValue,
|
||||
float64(app.TotalWorkerProcessPingFailures),
|
||||
app.Name,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.TotalWorkerProcessShutdownFailures,
|
||||
prometheus.CounterValue,
|
||||
float64(app.TotalWorkerProcessShutdownFailures),
|
||||
app.Name,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.TotalWorkerProcessStartupFailures,
|
||||
prometheus.CounterValue,
|
||||
float64(app.TotalWorkerProcessStartupFailures),
|
||||
app.Name,
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
@@ -138,18 +138,18 @@ func mangleNetworkName(name string) string {
|
||||
}
|
||||
|
||||
type Win32_PerfRawData_Tcpip_NetworkInterface struct {
|
||||
BytesReceivedPerSec uint32
|
||||
BytesSentPerSec uint32
|
||||
BytesReceivedPerSec uint64
|
||||
BytesSentPerSec uint64
|
||||
BytesTotalPerSec uint64
|
||||
Name string
|
||||
PacketsOutboundDiscarded uint32
|
||||
PacketsOutboundErrors uint32
|
||||
PacketsPerSec uint32
|
||||
PacketsReceivedDiscarded uint32
|
||||
PacketsReceivedErrors uint32
|
||||
PacketsReceivedPerSec uint32
|
||||
PacketsReceivedUnknown uint32
|
||||
PacketsSentPerSec uint32
|
||||
PacketsOutboundDiscarded uint64
|
||||
PacketsOutboundErrors uint64
|
||||
PacketsPerSec uint64
|
||||
PacketsReceivedDiscarded uint64
|
||||
PacketsReceivedErrors uint64
|
||||
PacketsReceivedPerSec uint64
|
||||
PacketsReceivedUnknown uint64
|
||||
PacketsSentPerSec uint64
|
||||
}
|
||||
|
||||
func (c *NetworkCollector) collect(ch chan<- prometheus.Metric) (*prometheus.Desc, error) {
|
||||
|
||||
@@ -5,7 +5,8 @@ package collector
|
||||
|
||||
import (
|
||||
"log"
|
||||
|
||||
"time"
|
||||
|
||||
"github.com/StackExchange/wmi"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
)
|
||||
@@ -26,6 +27,8 @@ type OSCollector struct {
|
||||
PagingLimitBytes *prometheus.Desc
|
||||
VirtualMemoryBytes *prometheus.Desc
|
||||
VisibleMemoryBytes *prometheus.Desc
|
||||
Time *prometheus.Desc
|
||||
Timezone *prometheus.Desc
|
||||
}
|
||||
|
||||
// NewOSCollector ...
|
||||
@@ -51,6 +54,18 @@ func NewOSCollector() (Collector, error) {
|
||||
nil,
|
||||
nil,
|
||||
),
|
||||
Time: prometheus.NewDesc(
|
||||
prometheus.BuildFQName(Namespace, subsystem, "time"),
|
||||
"OperatingSystem.LocalDateTime",
|
||||
nil,
|
||||
nil,
|
||||
),
|
||||
Timezone: prometheus.NewDesc(
|
||||
prometheus.BuildFQName(Namespace, subsystem, "timezone"),
|
||||
"OperatingSystem.LocalDateTime",
|
||||
[]string{"timezone"},
|
||||
nil,
|
||||
),
|
||||
Processes: prometheus.NewDesc(
|
||||
prometheus.BuildFQName(Namespace, subsystem, "processes"),
|
||||
"OperatingSystem.NumberOfProcesses",
|
||||
@@ -117,6 +132,7 @@ type Win32_OperatingSystem struct {
|
||||
SizeStoredInPagingFiles uint64
|
||||
TotalVirtualMemorySize uint64
|
||||
TotalVisibleMemorySize uint64
|
||||
LocalDateTime time.Time
|
||||
}
|
||||
|
||||
func (c *OSCollector) collect(ch chan<- prometheus.Metric) (*prometheus.Desc, error) {
|
||||
@@ -131,6 +147,23 @@ func (c *OSCollector) collect(ch chan<- prometheus.Metric) (*prometheus.Desc, er
|
||||
float64(dst[0].FreePhysicalMemory*1024), // KiB -> bytes
|
||||
)
|
||||
|
||||
time := dst[0].LocalDateTime
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.Time,
|
||||
prometheus.GaugeValue,
|
||||
float64(time.Unix()),
|
||||
)
|
||||
|
||||
timezoneName, _ := time.Zone()
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.Timezone,
|
||||
prometheus.GaugeValue,
|
||||
1.0,
|
||||
timezoneName,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.PagingFreeBytes,
|
||||
prometheus.GaugeValue,
|
||||
|
||||
@@ -55,6 +55,26 @@ type Win32_Service struct {
|
||||
StartMode string
|
||||
}
|
||||
|
||||
var (
|
||||
allStates = []string{
|
||||
"stopped",
|
||||
"start pending",
|
||||
"stop pending",
|
||||
"running",
|
||||
"continue pending",
|
||||
"pause pending",
|
||||
"paused",
|
||||
"unknown",
|
||||
}
|
||||
allStartModes = []string{
|
||||
"boot",
|
||||
"system",
|
||||
"auto",
|
||||
"manual",
|
||||
"disabled",
|
||||
}
|
||||
)
|
||||
|
||||
func (c *serviceCollector) collect(ch chan<- prometheus.Metric) (*prometheus.Desc, error) {
|
||||
var dst []Win32_Service
|
||||
q := wmi.CreateQuery(&dst, "")
|
||||
@@ -63,21 +83,33 @@ func (c *serviceCollector) collect(ch chan<- prometheus.Metric) (*prometheus.Des
|
||||
}
|
||||
|
||||
for _, service := range dst {
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.State,
|
||||
prometheus.GaugeValue,
|
||||
1.0,
|
||||
strings.ToLower(service.Name),
|
||||
strings.ToLower(service.State),
|
||||
)
|
||||
for _, state := range allStates {
|
||||
isCurrentState := 0.0
|
||||
if state == strings.ToLower(service.State) {
|
||||
isCurrentState = 1.0
|
||||
}
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.State,
|
||||
prometheus.GaugeValue,
|
||||
isCurrentState,
|
||||
strings.ToLower(service.Name),
|
||||
state,
|
||||
)
|
||||
}
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.StartMode,
|
||||
prometheus.GaugeValue,
|
||||
1.0,
|
||||
strings.ToLower(service.Name),
|
||||
strings.ToLower(service.StartMode),
|
||||
)
|
||||
for _, startMode := range allStartModes {
|
||||
isCurrentStartMode := 0.0
|
||||
if startMode == strings.ToLower(service.StartMode) {
|
||||
isCurrentStartMode = 1.0
|
||||
}
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.StartMode,
|
||||
prometheus.GaugeValue,
|
||||
isCurrentStartMode,
|
||||
strings.ToLower(service.Name),
|
||||
startMode,
|
||||
)
|
||||
}
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ func NewSystemCollector() (Collector, error) {
|
||||
// to the provided prometheus Metric channel.
|
||||
func (c *SystemCollector) Collect(ch chan<- prometheus.Metric) error {
|
||||
if desc, err := c.collect(ch); err != nil {
|
||||
log.Println("[ERROR] failed collecting os metrics:", desc, err)
|
||||
log.Println("[ERROR] failed collecting system metrics:", desc, err)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
||||
34
exporter.go
34
exporter.go
@@ -15,6 +15,7 @@ import (
|
||||
|
||||
"github.com/martinlindhe/wmi_exporter/collector"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
"github.com/prometheus/common/log"
|
||||
"github.com/prometheus/common/version"
|
||||
)
|
||||
@@ -25,8 +26,9 @@ type WmiCollector struct {
|
||||
}
|
||||
|
||||
const (
|
||||
defaultCollectors = "cpu,cs,logical_disk,net,os,service,system"
|
||||
serviceName = "wmi_exporter"
|
||||
defaultCollectors = "cpu,cs,logical_disk,net,os,service,system"
|
||||
defaultCollectorsPlaceholder = "[defaults]"
|
||||
serviceName = "wmi_exporter"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -90,9 +92,27 @@ func execute(name string, c collector.Collector, ch chan<- prometheus.Metric) {
|
||||
scrapeDurations.WithLabelValues(name, result).Observe(duration.Seconds())
|
||||
}
|
||||
|
||||
func expandEnabledCollectors(enabled string) []string {
|
||||
expanded := strings.Replace(enabled, defaultCollectorsPlaceholder, defaultCollectors, -1)
|
||||
separated := strings.Split(expanded, ",")
|
||||
unique := map[string]bool{}
|
||||
for _, s := range separated {
|
||||
if s != "" {
|
||||
unique[s] = true
|
||||
}
|
||||
}
|
||||
result := make([]string, 0, len(unique))
|
||||
for s, _ := range unique {
|
||||
result = append(result, s)
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
func loadCollectors(list string) (map[string]collector.Collector, error) {
|
||||
collectors := map[string]collector.Collector{}
|
||||
for _, name := range strings.Split(list, ",") {
|
||||
enabled := expandEnabledCollectors(list)
|
||||
|
||||
for _, name := range enabled {
|
||||
fn, ok := collector.Factories[name]
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("collector '%s' not available", name)
|
||||
@@ -115,7 +135,7 @@ func main() {
|
||||
showVersion = flag.Bool("version", false, "Print version information.")
|
||||
listenAddress = flag.String("telemetry.addr", ":9182", "host:port for WMI exporter.")
|
||||
metricsPath = flag.String("telemetry.path", "/metrics", "URL path for surfacing collected metrics.")
|
||||
enabledCollectors = flag.String("collectors.enabled", filterAvailableCollectors(defaultCollectors), "Comma-separated list of collectors to use.")
|
||||
enabledCollectors = flag.String("collectors.enabled", filterAvailableCollectors(defaultCollectors), "Comma-separated list of collectors to use. Use '[default]' as a placeholder for all the collectors enabled by default")
|
||||
printCollectors = flag.Bool("collectors.print", false, "If true, print available collectors and exit.")
|
||||
)
|
||||
flag.Parse()
|
||||
@@ -158,7 +178,7 @@ func main() {
|
||||
nodeCollector := WmiCollector{collectors: collectors}
|
||||
prometheus.MustRegister(nodeCollector)
|
||||
|
||||
http.Handle(*metricsPath, prometheus.Handler())
|
||||
http.Handle(*metricsPath, promhttp.Handler())
|
||||
http.HandleFunc("/health", healthCheck)
|
||||
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
http.Redirect(w, r, *metricsPath, http.StatusMovedPermanently)
|
||||
@@ -169,9 +189,7 @@ func main() {
|
||||
|
||||
go func() {
|
||||
log.Infoln("Starting server on", *listenAddress)
|
||||
if err := http.ListenAndServe(*listenAddress, nil); err != nil {
|
||||
log.Fatalf("cannot start WMI exporter: %s", err)
|
||||
}
|
||||
log.Fatalf("cannot start WMI exporter: %s", http.ListenAndServe(*listenAddress, nil))
|
||||
}()
|
||||
|
||||
for {
|
||||
|
||||
49
exporter_test.go
Normal file
49
exporter_test.go
Normal file
@@ -0,0 +1,49 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"sort"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
type expansionTestCase struct {
|
||||
input string
|
||||
expectedOutput []string
|
||||
}
|
||||
|
||||
func TestExpandEnabled(t *testing.T) {
|
||||
expansionTests := []expansionTestCase{
|
||||
{"", []string{}},
|
||||
// Default case
|
||||
{"cs,os", []string{"cs", "os"}},
|
||||
// Placeholder expansion
|
||||
{defaultCollectorsPlaceholder, strings.Split(defaultCollectors, ",")},
|
||||
// De-duplication
|
||||
{"cs,cs", []string{"cs"}},
|
||||
// De-duplicate placeholder
|
||||
{defaultCollectorsPlaceholder + "," + defaultCollectorsPlaceholder, strings.Split(defaultCollectors, ",")},
|
||||
// Composite case
|
||||
{"foo," + defaultCollectorsPlaceholder + ",bar", append(strings.Split(defaultCollectors, ","), "foo", "bar")},
|
||||
}
|
||||
|
||||
for _, testCase := range expansionTests {
|
||||
output := expandEnabledCollectors(testCase.input)
|
||||
sort.Strings(output)
|
||||
|
||||
success := true
|
||||
if len(output) != len(testCase.expectedOutput) {
|
||||
success = false
|
||||
} else {
|
||||
sort.Strings(testCase.expectedOutput)
|
||||
for idx := range output {
|
||||
if output[idx] != testCase.expectedOutput[idx] {
|
||||
success = false
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
if !success {
|
||||
t.Error("For", testCase.input, "expected", testCase.expectedOutput, "got", output)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -45,7 +45,7 @@ mkdir -Force Work,Output | Out-Null
|
||||
Write-Verbose "Downloading files"
|
||||
# Somewhat obscure url, points to WiX 3.10 binary release
|
||||
Write-Verbose "Downloading WiX..."
|
||||
Get-FileIfNotExists "http://download-codeplex.sec.s-msft.com/Download/Release?ProjectName=wix&DownloadId=1504735&FileTime=130906491728530000&Build=21031" "$sourceDir\wix-binaries.zip"
|
||||
Get-FileIfNotExists "http://download-codeplex.sec.s-msft.com/Download/Release?ProjectName=wix&DownloadId=1587180&FileTime=131118854877130000&Build=21050" "$sourceDir\wix-binaries.zip"
|
||||
mkdir -Force WiX | Out-Null
|
||||
Expand-Archive -Path "${sourceDir}\wix-binaries.zip" -DestinationPath WiX -Force
|
||||
|
||||
@@ -58,4 +58,4 @@ Invoke-Expression "WiX\candle.exe -nologo -arch $wixArch $wixOpts -out Work\wmi_
|
||||
Invoke-Expression "WiX\light.exe -nologo -spdb $wixOpts -out `"Output\wmi_exporter-${Version}-${Arch}.msi`" Work\wmi_exporter.wixobj"
|
||||
|
||||
Write-Verbose "Done!"
|
||||
Pop-Location
|
||||
Pop-Location
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<ComponentGroup Id="Files" Directory="APPLICATIONROOTDIRECTORY">
|
||||
<Component>
|
||||
<File Id="wmi_exporter.exe" Name="wmi_exporter.exe" Source="Work\wmi_exporter.exe" KeyPath="yes">
|
||||
<fw:FirewallException Id="MetricsEndpoint" Name="WMI Exporter (HTTP [LISTEN_PORT])" Description="WMI Exporter HTTP endpoint" Port="[LISTEN_PORT]" Protocol="tcp" Scope="any" />
|
||||
<fw:FirewallException Id="MetricsEndpoint" Name="WMI Exporter (HTTP [LISTEN_PORT])" Description="WMI Exporter HTTP endpoint" Port="[LISTEN_PORT]" Protocol="tcp" Scope="any" IgnoreFailure="yes" />
|
||||
</File>
|
||||
<ServiceInstall Id="InstallExporterService" Name="wmi_exporter" ErrorControl="normal" Start="auto" Type="ownProcess" Arguments="-log.format logger:eventlog?name=wmi_exporter [CollectorsFlag] [ListenFlag] [MetricsPathFlag]" />
|
||||
<ServiceControl Id="ServiceStateControl" Name="wmi_exporter" Remove="uninstall" Start="install" Stop="both" />
|
||||
|
||||
11
vendor/github.com/golang/protobuf/proto/encode.go
generated
vendored
11
vendor/github.com/golang/protobuf/proto/encode.go
generated
vendored
@@ -1075,10 +1075,17 @@ func (o *Buffer) enc_map(p *Properties, base structPointer) error {
|
||||
|
||||
func (o *Buffer) enc_exts(p *Properties, base structPointer) error {
|
||||
exts := structPointer_Extensions(base, p.field)
|
||||
if err := encodeExtensions(exts); err != nil {
|
||||
|
||||
v, mu := exts.extensionsRead()
|
||||
if v == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
mu.Lock()
|
||||
defer mu.Unlock()
|
||||
if err := encodeExtensionsMap(v); err != nil {
|
||||
return err
|
||||
}
|
||||
v, _ := exts.extensionsRead()
|
||||
|
||||
return o.enc_map_body(v)
|
||||
}
|
||||
|
||||
1
vendor/github.com/golang/protobuf/proto/extensions.go
generated
vendored
1
vendor/github.com/golang/protobuf/proto/extensions.go
generated
vendored
@@ -154,6 +154,7 @@ type ExtensionDesc struct {
|
||||
Field int32 // field number
|
||||
Name string // fully-qualified name of extension, for text formatting
|
||||
Tag string // protobuf tag style
|
||||
Filename string // name of the file in which the extension is defined
|
||||
}
|
||||
|
||||
func (ed *ExtensionDesc) repeated() bool {
|
||||
|
||||
6
vendor/github.com/golang/protobuf/proto/text_parser.go
generated
vendored
6
vendor/github.com/golang/protobuf/proto/text_parser.go
generated
vendored
@@ -592,7 +592,11 @@ func (p *textParser) readStruct(sv reflect.Value, terminator string) error {
|
||||
props = oop.Prop
|
||||
nv := reflect.New(oop.Type.Elem())
|
||||
dst = nv.Elem().Field(0)
|
||||
sv.Field(oop.Field).Set(nv)
|
||||
field := sv.Field(oop.Field)
|
||||
if !field.IsNil() {
|
||||
return p.errorf("field '%s' would overwrite already parsed oneof '%s'", name, sv.Type().Field(oop.Field).Name)
|
||||
}
|
||||
field.Set(nv)
|
||||
}
|
||||
if !dst.IsValid() {
|
||||
return p.errorf("unknown field name %q in %v", name, st)
|
||||
|
||||
2
vendor/github.com/prometheus/client_golang/prometheus/desc.go
generated
vendored
2
vendor/github.com/prometheus/client_golang/prometheus/desc.go
generated
vendored
@@ -78,7 +78,7 @@ type Desc struct {
|
||||
// Help string. Each Desc with the same fqName must have the same
|
||||
// dimHash.
|
||||
dimHash uint64
|
||||
// err is an error that occurred during construction. It is reported on
|
||||
// err is an error that occured during construction. It is reported on
|
||||
// registration time.
|
||||
err error
|
||||
}
|
||||
|
||||
201
vendor/github.com/prometheus/client_golang/prometheus/promhttp/http.go
generated
vendored
Normal file
201
vendor/github.com/prometheus/client_golang/prometheus/promhttp/http.go
generated
vendored
Normal file
@@ -0,0 +1,201 @@
|
||||
// Copyright 2016 The Prometheus Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Copyright (c) 2013, The Prometheus Authors
|
||||
// All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style license that can be found
|
||||
// in the LICENSE file.
|
||||
|
||||
// Package promhttp contains functions to create http.Handler instances to
|
||||
// expose Prometheus metrics via HTTP. In later versions of this package, it
|
||||
// will also contain tooling to instrument instances of http.Handler and
|
||||
// http.RoundTripper.
|
||||
//
|
||||
// promhttp.Handler acts on the prometheus.DefaultGatherer. With HandlerFor,
|
||||
// you can create a handler for a custom registry or anything that implements
|
||||
// the Gatherer interface. It also allows to create handlers that act
|
||||
// differently on errors or allow to log errors.
|
||||
package promhttp
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"compress/gzip"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/prometheus/common/expfmt"
|
||||
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
)
|
||||
|
||||
const (
|
||||
contentTypeHeader = "Content-Type"
|
||||
contentLengthHeader = "Content-Length"
|
||||
contentEncodingHeader = "Content-Encoding"
|
||||
acceptEncodingHeader = "Accept-Encoding"
|
||||
)
|
||||
|
||||
var bufPool sync.Pool
|
||||
|
||||
func getBuf() *bytes.Buffer {
|
||||
buf := bufPool.Get()
|
||||
if buf == nil {
|
||||
return &bytes.Buffer{}
|
||||
}
|
||||
return buf.(*bytes.Buffer)
|
||||
}
|
||||
|
||||
func giveBuf(buf *bytes.Buffer) {
|
||||
buf.Reset()
|
||||
bufPool.Put(buf)
|
||||
}
|
||||
|
||||
// Handler returns an HTTP handler for the prometheus.DefaultGatherer. The
|
||||
// Handler uses the default HandlerOpts, i.e. report the first error as an HTTP
|
||||
// error, no error logging, and compression if requested by the client.
|
||||
//
|
||||
// If you want to create a Handler for the DefaultGatherer with different
|
||||
// HandlerOpts, create it with HandlerFor with prometheus.DefaultGatherer and
|
||||
// your desired HandlerOpts.
|
||||
func Handler() http.Handler {
|
||||
return HandlerFor(prometheus.DefaultGatherer, HandlerOpts{})
|
||||
}
|
||||
|
||||
// HandlerFor returns an http.Handler for the provided Gatherer. The behavior
|
||||
// of the Handler is defined by the provided HandlerOpts.
|
||||
func HandlerFor(reg prometheus.Gatherer, opts HandlerOpts) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
|
||||
mfs, err := reg.Gather()
|
||||
if err != nil {
|
||||
if opts.ErrorLog != nil {
|
||||
opts.ErrorLog.Println("error gathering metrics:", err)
|
||||
}
|
||||
switch opts.ErrorHandling {
|
||||
case PanicOnError:
|
||||
panic(err)
|
||||
case ContinueOnError:
|
||||
if len(mfs) == 0 {
|
||||
http.Error(w, "No metrics gathered, last error:\n\n"+err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
case HTTPErrorOnError:
|
||||
http.Error(w, "An error has occurred during metrics gathering:\n\n"+err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
contentType := expfmt.Negotiate(req.Header)
|
||||
buf := getBuf()
|
||||
defer giveBuf(buf)
|
||||
writer, encoding := decorateWriter(req, buf, opts.DisableCompression)
|
||||
enc := expfmt.NewEncoder(writer, contentType)
|
||||
var lastErr error
|
||||
for _, mf := range mfs {
|
||||
if err := enc.Encode(mf); err != nil {
|
||||
lastErr = err
|
||||
if opts.ErrorLog != nil {
|
||||
opts.ErrorLog.Println("error encoding metric family:", err)
|
||||
}
|
||||
switch opts.ErrorHandling {
|
||||
case PanicOnError:
|
||||
panic(err)
|
||||
case ContinueOnError:
|
||||
// Handled later.
|
||||
case HTTPErrorOnError:
|
||||
http.Error(w, "An error has occurred during metrics encoding:\n\n"+err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
if closer, ok := writer.(io.Closer); ok {
|
||||
closer.Close()
|
||||
}
|
||||
if lastErr != nil && buf.Len() == 0 {
|
||||
http.Error(w, "No metrics encoded, last error:\n\n"+err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
header := w.Header()
|
||||
header.Set(contentTypeHeader, string(contentType))
|
||||
header.Set(contentLengthHeader, fmt.Sprint(buf.Len()))
|
||||
if encoding != "" {
|
||||
header.Set(contentEncodingHeader, encoding)
|
||||
}
|
||||
w.Write(buf.Bytes())
|
||||
// TODO(beorn7): Consider streaming serving of metrics.
|
||||
})
|
||||
}
|
||||
|
||||
// HandlerErrorHandling defines how a Handler serving metrics will handle
|
||||
// errors.
|
||||
type HandlerErrorHandling int
|
||||
|
||||
// These constants cause handlers serving metrics to behave as described if
|
||||
// errors are encountered.
|
||||
const (
|
||||
// Serve an HTTP status code 500 upon the first error
|
||||
// encountered. Report the error message in the body.
|
||||
HTTPErrorOnError HandlerErrorHandling = iota
|
||||
// Ignore errors and try to serve as many metrics as possible. However,
|
||||
// if no metrics can be served, serve an HTTP status code 500 and the
|
||||
// last error message in the body. Only use this in deliberate "best
|
||||
// effort" metrics collection scenarios. It is recommended to at least
|
||||
// log errors (by providing an ErrorLog in HandlerOpts) to not mask
|
||||
// errors completely.
|
||||
ContinueOnError
|
||||
// Panic upon the first error encountered (useful for "crash only" apps).
|
||||
PanicOnError
|
||||
)
|
||||
|
||||
// Logger is the minimal interface HandlerOpts needs for logging. Note that
|
||||
// log.Logger from the standard library implements this interface, and it is
|
||||
// easy to implement by custom loggers, if they don't do so already anyway.
|
||||
type Logger interface {
|
||||
Println(v ...interface{})
|
||||
}
|
||||
|
||||
// HandlerOpts specifies options how to serve metrics via an http.Handler. The
|
||||
// zero value of HandlerOpts is a reasonable default.
|
||||
type HandlerOpts struct {
|
||||
// ErrorLog specifies an optional logger for errors collecting and
|
||||
// serving metrics. If nil, errors are not logged at all.
|
||||
ErrorLog Logger
|
||||
// ErrorHandling defines how errors are handled. Note that errors are
|
||||
// logged regardless of the configured ErrorHandling provided ErrorLog
|
||||
// is not nil.
|
||||
ErrorHandling HandlerErrorHandling
|
||||
// If DisableCompression is true, the handler will never compress the
|
||||
// response, even if requested by the client.
|
||||
DisableCompression bool
|
||||
}
|
||||
|
||||
// decorateWriter wraps a writer to handle gzip compression if requested. It
|
||||
// returns the decorated writer and the appropriate "Content-Encoding" header
|
||||
// (which is empty if no compression is enabled).
|
||||
func decorateWriter(request *http.Request, writer io.Writer, compressionDisabled bool) (io.Writer, string) {
|
||||
if compressionDisabled {
|
||||
return writer, ""
|
||||
}
|
||||
header := request.Header.Get(acceptEncodingHeader)
|
||||
parts := strings.Split(header, ",")
|
||||
for _, part := range parts {
|
||||
part := strings.TrimSpace(part)
|
||||
if part == "gzip" || strings.HasPrefix(part, "gzip;") {
|
||||
return gzip.NewWriter(writer), "gzip"
|
||||
}
|
||||
}
|
||||
return writer, ""
|
||||
}
|
||||
4
vendor/github.com/prometheus/client_golang/prometheus/registry.go
generated
vendored
4
vendor/github.com/prometheus/client_golang/prometheus/registry.go
generated
vendored
@@ -447,7 +447,7 @@ func (r *Registry) Gather() ([]*dto.MetricFamily, error) {
|
||||
|
||||
// Drain metricChan in case of premature return.
|
||||
defer func() {
|
||||
for range metricChan {
|
||||
for _ = range metricChan {
|
||||
}
|
||||
}()
|
||||
|
||||
@@ -683,7 +683,7 @@ func (s metricSorter) Less(i, j int) bool {
|
||||
return s[i].GetTimestampMs() < s[j].GetTimestampMs()
|
||||
}
|
||||
|
||||
// normalizeMetricFamilies returns a MetricFamily slice with empty
|
||||
// normalizeMetricFamilies returns a MetricFamily slice whith empty
|
||||
// MetricFamilies pruned and the remaining MetricFamilies sorted by name within
|
||||
// the slice, with the contained Metrics sorted within each MetricFamily.
|
||||
func normalizeMetricFamilies(metricFamiliesByName map[string]*dto.MetricFamily) []*dto.MetricFamily {
|
||||
|
||||
3
vendor/github.com/prometheus/common/expfmt/expfmt.go
generated
vendored
3
vendor/github.com/prometheus/common/expfmt/expfmt.go
generated
vendored
@@ -29,6 +29,9 @@ const (
|
||||
FmtProtoDelim Format = ProtoFmt + ` encoding=delimited`
|
||||
FmtProtoText Format = ProtoFmt + ` encoding=text`
|
||||
FmtProtoCompact Format = ProtoFmt + ` encoding=compact-text`
|
||||
|
||||
// fmtJSON2 is hidden as it is deprecated.
|
||||
fmtJSON2 Format = `application/json; version=0.0.2`
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
16
vendor/github.com/prometheus/common/model/value.go
generated
vendored
16
vendor/github.com/prometheus/common/model/value.go
generated
vendored
@@ -22,22 +22,6 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
var (
|
||||
// ZeroSamplePair is the pseudo zero-value of SamplePair used to signal a
|
||||
// non-existing sample pair. It is a SamplePair with timestamp Earliest and
|
||||
// value 0.0. Note that the natural zero value of SamplePair has a timestamp
|
||||
// of 0, which is possible to appear in a real SamplePair and thus not
|
||||
// suitable to signal a non-existing SamplePair.
|
||||
ZeroSamplePair = SamplePair{Timestamp: Earliest}
|
||||
|
||||
// ZeroSample is the pseudo zero-value of Sample used to signal a
|
||||
// non-existing sample. It is a Sample with timestamp Earliest, value 0.0,
|
||||
// and metric nil. Note that the natural zero value of Sample has a timestamp
|
||||
// of 0, which is possible to appear in a real Sample and thus not suitable
|
||||
// to signal a non-existing Sample.
|
||||
ZeroSample = Sample{Timestamp: Earliest}
|
||||
)
|
||||
|
||||
// A SampleValue is a representation of a value for a given sample at a given
|
||||
// time.
|
||||
type SampleValue float64
|
||||
|
||||
20
vendor/golang.org/x/sys/unix/gccgo_linux_sparc64.go
generated
vendored
20
vendor/golang.org/x/sys/unix/gccgo_linux_sparc64.go
generated
vendored
@@ -1,20 +0,0 @@
|
||||
// Copyright 2016 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build gccgo,linux,sparc64
|
||||
|
||||
package unix
|
||||
|
||||
import "syscall"
|
||||
|
||||
//extern sysconf
|
||||
func realSysconf(name int) int64
|
||||
|
||||
func sysconf(name int) (n int64, err syscall.Errno) {
|
||||
r := realSysconf(name)
|
||||
if r < 0 {
|
||||
return 0, syscall.GetErrno()
|
||||
}
|
||||
return r, 0
|
||||
}
|
||||
7
vendor/golang.org/x/sys/unix/mkall.sh
generated
vendored
Normal file → Executable file
7
vendor/golang.org/x/sys/unix/mkall.sh
generated
vendored
Normal file → Executable file
@@ -223,13 +223,6 @@ linux_s390x)
|
||||
# package generates its version of the types file.
|
||||
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
|
||||
;;
|
||||
linux_sparc64)
|
||||
GOOSARCH_in=syscall_linux_sparc64.go
|
||||
unistd_h=/usr/include/sparc64-linux-gnu/asm/unistd.h
|
||||
mkerrors="$mkerrors -m64"
|
||||
mksysnum="./mksysnum_linux.pl $unistd_h"
|
||||
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
|
||||
;;
|
||||
netbsd_386)
|
||||
mkerrors="$mkerrors -m32"
|
||||
mksyscall="./mksyscall.pl -l32 -netbsd"
|
||||
|
||||
7
vendor/golang.org/x/sys/unix/mkerrors.sh
generated
vendored
Normal file → Executable file
7
vendor/golang.org/x/sys/unix/mkerrors.sh
generated
vendored
Normal file → Executable file
@@ -127,7 +127,6 @@ includes_Linux='
|
||||
#include <linux/sched.h>
|
||||
#include <linux/wait.h>
|
||||
#include <linux/icmpv6.h>
|
||||
#include <linux/serial.h>
|
||||
#include <net/route.h>
|
||||
#include <asm/termbits.h>
|
||||
|
||||
@@ -142,12 +141,6 @@ includes_Linux='
|
||||
#ifndef PTRACE_SETREGS
|
||||
#define PTRACE_SETREGS 0xd
|
||||
#endif
|
||||
|
||||
#ifdef SOL_BLUETOOTH
|
||||
// SPARC includes this in /usr/include/sparc64-linux-gnu/bits/socket.h
|
||||
// but it is already in bluetooth_linux.go
|
||||
#undef SOL_BLUETOOTH
|
||||
#endif
|
||||
'
|
||||
|
||||
includes_NetBSD='
|
||||
|
||||
0
vendor/golang.org/x/sys/unix/mksyscall.pl
generated
vendored
Normal file → Executable file
0
vendor/golang.org/x/sys/unix/mksyscall.pl
generated
vendored
Normal file → Executable file
0
vendor/golang.org/x/sys/unix/mksyscall_solaris.pl
generated
vendored
Normal file → Executable file
0
vendor/golang.org/x/sys/unix/mksyscall_solaris.pl
generated
vendored
Normal file → Executable file
0
vendor/golang.org/x/sys/unix/mksysctl_openbsd.pl
generated
vendored
Normal file → Executable file
0
vendor/golang.org/x/sys/unix/mksysctl_openbsd.pl
generated
vendored
Normal file → Executable file
0
vendor/golang.org/x/sys/unix/mksysnum_darwin.pl
generated
vendored
Normal file → Executable file
0
vendor/golang.org/x/sys/unix/mksysnum_darwin.pl
generated
vendored
Normal file → Executable file
0
vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl
generated
vendored
Normal file → Executable file
0
vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl
generated
vendored
Normal file → Executable file
0
vendor/golang.org/x/sys/unix/mksysnum_freebsd.pl
generated
vendored
Normal file → Executable file
0
vendor/golang.org/x/sys/unix/mksysnum_freebsd.pl
generated
vendored
Normal file → Executable file
0
vendor/golang.org/x/sys/unix/mksysnum_linux.pl
generated
vendored
Normal file → Executable file
0
vendor/golang.org/x/sys/unix/mksysnum_linux.pl
generated
vendored
Normal file → Executable file
0
vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl
generated
vendored
Normal file → Executable file
0
vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl
generated
vendored
Normal file → Executable file
0
vendor/golang.org/x/sys/unix/mksysnum_openbsd.pl
generated
vendored
Normal file → Executable file
0
vendor/golang.org/x/sys/unix/mksysnum_openbsd.pl
generated
vendored
Normal file → Executable file
21
vendor/golang.org/x/sys/unix/syscall_linux.go
generated
vendored
21
vendor/golang.org/x/sys/unix/syscall_linux.go
generated
vendored
@@ -69,10 +69,10 @@ func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error
|
||||
return ppoll(&fds[0], len(fds), timeout, sigmask)
|
||||
}
|
||||
|
||||
//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
|
||||
//sys readlinkat(dirfd int, path string, buf []byte) (n int, err error)
|
||||
|
||||
func Readlink(path string, buf []byte) (n int, err error) {
|
||||
return Readlinkat(AT_FDCWD, path, buf)
|
||||
return readlinkat(AT_FDCWD, path, buf)
|
||||
}
|
||||
|
||||
func Rename(oldpath string, newpath string) (err error) {
|
||||
@@ -80,20 +80,24 @@ func Rename(oldpath string, newpath string) (err error) {
|
||||
}
|
||||
|
||||
func Rmdir(path string) error {
|
||||
return Unlinkat(AT_FDCWD, path, AT_REMOVEDIR)
|
||||
return unlinkat(AT_FDCWD, path, AT_REMOVEDIR)
|
||||
}
|
||||
|
||||
//sys Symlinkat(oldpath string, newdirfd int, newpath string) (err error)
|
||||
//sys symlinkat(oldpath string, newdirfd int, newpath string) (err error)
|
||||
|
||||
func Symlink(oldpath string, newpath string) (err error) {
|
||||
return Symlinkat(oldpath, AT_FDCWD, newpath)
|
||||
return symlinkat(oldpath, AT_FDCWD, newpath)
|
||||
}
|
||||
|
||||
func Unlink(path string) error {
|
||||
return Unlinkat(AT_FDCWD, path, 0)
|
||||
return unlinkat(AT_FDCWD, path, 0)
|
||||
}
|
||||
|
||||
//sys Unlinkat(dirfd int, path string, flags int) (err error)
|
||||
//sys unlinkat(dirfd int, path string, flags int) (err error)
|
||||
|
||||
func Unlinkat(dirfd int, path string, flags int) error {
|
||||
return unlinkat(dirfd, path, flags)
|
||||
}
|
||||
|
||||
//sys utimes(path string, times *[2]Timeval) (err error)
|
||||
|
||||
@@ -139,7 +143,8 @@ func UtimesNano(path string, ts []Timespec) error {
|
||||
// in 2.6.22, Released, 8 July 2007) then fall back to utimes
|
||||
var tv [2]Timeval
|
||||
for i := 0; i < 2; i++ {
|
||||
tv[i] = NsecToTimeval(TimespecToNsec(ts[i]))
|
||||
tv[i].Sec = ts[i].Sec
|
||||
tv[i].Usec = ts[i].Nsec / 1000
|
||||
}
|
||||
return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
|
||||
}
|
||||
|
||||
2
vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
generated
vendored
2
vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
generated
vendored
@@ -6,6 +6,8 @@
|
||||
|
||||
package unix
|
||||
|
||||
const _SYS_dup = SYS_DUP3
|
||||
|
||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
|
||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error)
|
||||
|
||||
7
vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
generated
vendored
7
vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
generated
vendored
@@ -7,6 +7,13 @@
|
||||
|
||||
package unix
|
||||
|
||||
// Linux introduced getdents64 syscall for N64 ABI only in 3.10
|
||||
// (May 21 2013, rev dec33abaafc89bcbd78f85fad0513170415a26d5),
|
||||
// to support older kernels, we have to use getdents for mips64.
|
||||
// Also note that struct dirent is different for these two.
|
||||
// Lookup linux_dirent{,64} in kernel source code for details.
|
||||
const _SYS_getdents = SYS_GETDENTS
|
||||
|
||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||
//sys Fstatfs(fd int, buf *Statfs_t) (err error)
|
||||
|
||||
169
vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
generated
vendored
169
vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
generated
vendored
@@ -1,169 +0,0 @@
|
||||
// Copyright 2009 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build sparc64,linux
|
||||
|
||||
package unix
|
||||
|
||||
import (
|
||||
"sync/atomic"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||
//sys Dup2(oldfd int, newfd int) (err error)
|
||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error)
|
||||
//sys Fstatfs(fd int, buf *Statfs_t) (err error)
|
||||
//sys Ftruncate(fd int, length int64) (err error)
|
||||
//sysnb Getegid() (egid int)
|
||||
//sysnb Geteuid() (euid int)
|
||||
//sysnb Getgid() (gid int)
|
||||
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
|
||||
//sysnb Getuid() (uid int)
|
||||
//sysnb InotifyInit() (fd int, err error)
|
||||
//sys Lchown(path string, uid int, gid int) (err error)
|
||||
//sys Listen(s int, n int) (err error)
|
||||
//sys Lstat(path string, stat *Stat_t) (err error)
|
||||
//sys Pause() (err error)
|
||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
||||
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
||||
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
//sys Setfsgid(gid int) (err error)
|
||||
//sys Setfsuid(uid int) (err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
|
||||
//sysnb Setreuid(ruid int, euid int) (err error)
|
||||
//sys Shutdown(fd int, how int) (err error)
|
||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
||||
//sys Stat(path string, stat *Stat_t) (err error)
|
||||
//sys Statfs(path string, buf *Statfs_t) (err error)
|
||||
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
|
||||
//sys Truncate(path string, length int64) (err error)
|
||||
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
|
||||
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
||||
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
//sysnb getgroups(n int, list *_Gid_t) (nn int, err error)
|
||||
//sysnb setgroups(n int, list *_Gid_t) (err error)
|
||||
//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
|
||||
//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
|
||||
//sysnb socket(domain int, typ int, proto int) (fd int, err error)
|
||||
//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
|
||||
//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
|
||||
//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
|
||||
//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
|
||||
//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
|
||||
//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
|
||||
//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
|
||||
|
||||
func sysconf(name int) (n int64, err syscall.Errno)
|
||||
|
||||
// pageSize caches the value of Getpagesize, since it can't change
|
||||
// once the system is booted.
|
||||
var pageSize int64 // accessed atomically
|
||||
|
||||
func Getpagesize() int {
|
||||
n := atomic.LoadInt64(&pageSize)
|
||||
if n == 0 {
|
||||
n, _ = sysconf(_SC_PAGESIZE)
|
||||
atomic.StoreInt64(&pageSize, n)
|
||||
}
|
||||
return int(n)
|
||||
}
|
||||
|
||||
func Ioperm(from int, num int, on int) (err error) {
|
||||
return ENOSYS
|
||||
}
|
||||
|
||||
func Iopl(level int) (err error) {
|
||||
return ENOSYS
|
||||
}
|
||||
|
||||
//sysnb Gettimeofday(tv *Timeval) (err error)
|
||||
|
||||
func Time(t *Time_t) (tt Time_t, err error) {
|
||||
var tv Timeval
|
||||
err = Gettimeofday(&tv)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
if t != nil {
|
||||
*t = Time_t(tv.Sec)
|
||||
}
|
||||
return Time_t(tv.Sec), nil
|
||||
}
|
||||
|
||||
//sys Utime(path string, buf *Utimbuf) (err error)
|
||||
|
||||
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
|
||||
|
||||
func NsecToTimespec(nsec int64) (ts Timespec) {
|
||||
ts.Sec = nsec / 1e9
|
||||
ts.Nsec = nsec % 1e9
|
||||
return
|
||||
}
|
||||
|
||||
func NsecToTimeval(nsec int64) (tv Timeval) {
|
||||
nsec += 999 // round up to microsecond
|
||||
tv.Sec = nsec / 1e9
|
||||
tv.Usec = int32(nsec % 1e9 / 1e3)
|
||||
return
|
||||
}
|
||||
|
||||
func (r *PtraceRegs) PC() uint64 { return r.Tpc }
|
||||
|
||||
func (r *PtraceRegs) SetPC(pc uint64) { r.Tpc = pc }
|
||||
|
||||
func (iov *Iovec) SetLen(length int) {
|
||||
iov.Len = uint64(length)
|
||||
}
|
||||
|
||||
func (msghdr *Msghdr) SetControllen(length int) {
|
||||
msghdr.Controllen = uint64(length)
|
||||
}
|
||||
|
||||
func (cmsg *Cmsghdr) SetLen(length int) {
|
||||
cmsg.Len = uint64(length)
|
||||
}
|
||||
|
||||
//sysnb pipe(p *[2]_C_int) (err error)
|
||||
|
||||
func Pipe(p []int) (err error) {
|
||||
if len(p) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
var pp [2]_C_int
|
||||
err = pipe(&pp)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
return
|
||||
}
|
||||
|
||||
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
||||
|
||||
func Pipe2(p []int, flags int) (err error) {
|
||||
if len(p) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
var pp [2]_C_int
|
||||
err = pipe2(&pp, flags)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
return
|
||||
}
|
||||
|
||||
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
|
||||
|
||||
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||
if len(fds) == 0 {
|
||||
return poll(nil, 0, timeout)
|
||||
}
|
||||
return poll(&fds[0], len(fds), timeout)
|
||||
}
|
||||
46
vendor/golang.org/x/sys/unix/syscall_solaris.go
generated
vendored
46
vendor/golang.org/x/sys/unix/syscall_solaris.go
generated
vendored
@@ -72,20 +72,18 @@ func ParseDirent(buf []byte, max int, names []string) (consumed int, count int,
|
||||
return origlen - len(buf), count, names
|
||||
}
|
||||
|
||||
//sysnb pipe(p *[2]_C_int) (n int, err error)
|
||||
func pipe() (r uintptr, w uintptr, err uintptr)
|
||||
|
||||
func Pipe(p []int) (err error) {
|
||||
if len(p) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
var pp [2]_C_int
|
||||
n, err := pipe(&pp)
|
||||
if n != 0 {
|
||||
return err
|
||||
r0, w0, e1 := pipe()
|
||||
if e1 != 0 {
|
||||
err = syscall.Errno(e1)
|
||||
}
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
return nil
|
||||
p[0], p[1] = int(r0), int(w0)
|
||||
return
|
||||
}
|
||||
|
||||
func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||
@@ -271,34 +269,24 @@ func (w WaitStatus) StopSignal() syscall.Signal {
|
||||
|
||||
func (w WaitStatus) TrapCause() int { return -1 }
|
||||
|
||||
//sys wait4(pid int32, statusp *_C_int, options int, rusage *Rusage) (wpid int32, err error)
|
||||
func wait4(pid uintptr, wstatus *WaitStatus, options uintptr, rusage *Rusage) (wpid uintptr, err uintptr)
|
||||
|
||||
func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (int, error) {
|
||||
var status _C_int
|
||||
rpid, err := wait4(int32(pid), &status, options, rusage)
|
||||
wpid := int(rpid)
|
||||
if wpid == -1 {
|
||||
return wpid, err
|
||||
func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) {
|
||||
r0, e1 := wait4(uintptr(pid), wstatus, uintptr(options), rusage)
|
||||
if e1 != 0 {
|
||||
err = syscall.Errno(e1)
|
||||
}
|
||||
if wstatus != nil {
|
||||
*wstatus = WaitStatus(status)
|
||||
}
|
||||
return wpid, nil
|
||||
return int(r0), err
|
||||
}
|
||||
|
||||
//sys gethostname(buf []byte) (n int, err error)
|
||||
func gethostname() (name string, err uintptr)
|
||||
|
||||
func Gethostname() (name string, err error) {
|
||||
var buf [MaxHostNameLen]byte
|
||||
n, err := gethostname(buf[:])
|
||||
if n != 0 {
|
||||
return "", err
|
||||
name, e1 := gethostname()
|
||||
if e1 != 0 {
|
||||
err = syscall.Errno(e1)
|
||||
}
|
||||
n = clen(buf[:])
|
||||
if n < 1 {
|
||||
return "", EFAULT
|
||||
}
|
||||
return string(buf[:n]), nil
|
||||
return name, err
|
||||
}
|
||||
|
||||
//sys utimes(path string, times *[2]Timeval) (err error)
|
||||
|
||||
9
vendor/golang.org/x/sys/unix/types_linux.go
generated
vendored
9
vendor/golang.org/x/sys/unix/types_linux.go
generated
vendored
@@ -105,9 +105,6 @@ typedef struct pt_regs PtraceRegs;
|
||||
typedef struct user PtraceRegs;
|
||||
#elif defined(__s390x__)
|
||||
typedef struct _user_regs_struct PtraceRegs;
|
||||
#elif defined(__sparc__)
|
||||
#include <asm/ptrace.h>
|
||||
typedef struct pt_regs PtraceRegs;
|
||||
#else
|
||||
typedef struct user_regs_struct PtraceRegs;
|
||||
#endif
|
||||
@@ -129,7 +126,7 @@ struct my_epoll_event {
|
||||
// padding is not specified in linux/eventpoll.h but added to conform to the
|
||||
// alignment requirements of EABI
|
||||
int32_t padFd;
|
||||
#elif defined(__powerpc64__) || defined(__s390x__) || defined(__sparc__)
|
||||
#elif defined(__powerpc64__) || defined(__s390x__)
|
||||
int32_t _padFd;
|
||||
#endif
|
||||
int32_t fd;
|
||||
@@ -448,10 +445,6 @@ const (
|
||||
|
||||
type Sigset_t C.sigset_t
|
||||
|
||||
// sysconf information
|
||||
|
||||
const _SC_PAGESIZE = C._SC_PAGESIZE
|
||||
|
||||
// Terminal handling
|
||||
|
||||
type Termios C.termios_t
|
||||
|
||||
2
vendor/golang.org/x/sys/unix/types_solaris.go
generated
vendored
2
vendor/golang.org/x/sys/unix/types_solaris.go
generated
vendored
@@ -22,7 +22,6 @@ package unix
|
||||
#define __USE_LEGACY_PROTOTYPES__ // iovec
|
||||
#include <dirent.h>
|
||||
#include <fcntl.h>
|
||||
#include <netdb.h>
|
||||
#include <limits.h>
|
||||
#include <signal.h>
|
||||
#include <termios.h>
|
||||
@@ -82,7 +81,6 @@ const (
|
||||
sizeofLong = C.sizeof_long
|
||||
sizeofLongLong = C.sizeof_longlong
|
||||
PathMax = C.PATH_MAX
|
||||
MaxHostNameLen = C.MAXHOSTNAMELEN
|
||||
)
|
||||
|
||||
// Basic types
|
||||
|
||||
2077
vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
generated
vendored
2077
vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
generated
vendored
File diff suppressed because it is too large
Load Diff
6
vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
generated
vendored
6
vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
generated
vendored
@@ -64,7 +64,7 @@ func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int,
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
@@ -87,7 +87,7 @@ func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
@@ -109,7 +109,7 @@ func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Unlinkat(dirfd int, path string, flags int) (err error) {
|
||||
func unlinkat(dirfd int, path string, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
|
||||
6
vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
generated
vendored
6
vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
generated
vendored
@@ -64,7 +64,7 @@ func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int,
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
@@ -87,7 +87,7 @@ func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
@@ -109,7 +109,7 @@ func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Unlinkat(dirfd int, path string, flags int) (err error) {
|
||||
func unlinkat(dirfd int, path string, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
|
||||
6
vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
generated
vendored
6
vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
generated
vendored
@@ -64,7 +64,7 @@ func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int,
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
@@ -87,7 +87,7 @@ func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
@@ -109,7 +109,7 @@ func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Unlinkat(dirfd int, path string, flags int) (err error) {
|
||||
func unlinkat(dirfd int, path string, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
|
||||
6
vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
generated
vendored
6
vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
generated
vendored
@@ -64,7 +64,7 @@ func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int,
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
@@ -87,7 +87,7 @@ func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
@@ -109,7 +109,7 @@ func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Unlinkat(dirfd int, path string, flags int) (err error) {
|
||||
func unlinkat(dirfd int, path string, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
|
||||
6
vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
generated
vendored
6
vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
generated
vendored
@@ -64,7 +64,7 @@ func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int,
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
@@ -87,7 +87,7 @@ func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
@@ -109,7 +109,7 @@ func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Unlinkat(dirfd int, path string, flags int) (err error) {
|
||||
func unlinkat(dirfd int, path string, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
|
||||
6
vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
generated
vendored
6
vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
generated
vendored
@@ -64,7 +64,7 @@ func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int,
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
@@ -87,7 +87,7 @@ func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
@@ -109,7 +109,7 @@ func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Unlinkat(dirfd int, path string, flags int) (err error) {
|
||||
func unlinkat(dirfd int, path string, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
|
||||
6
vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
generated
vendored
6
vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
generated
vendored
@@ -64,7 +64,7 @@ func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int,
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
@@ -87,7 +87,7 @@ func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
@@ -109,7 +109,7 @@ func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Unlinkat(dirfd int, path string, flags int) (err error) {
|
||||
func unlinkat(dirfd int, path string, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
|
||||
6
vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
generated
vendored
6
vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
generated
vendored
@@ -64,7 +64,7 @@ func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int,
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
@@ -87,7 +87,7 @@ func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
@@ -109,7 +109,7 @@ func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Unlinkat(dirfd int, path string, flags int) (err error) {
|
||||
func unlinkat(dirfd int, path string, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
|
||||
1834
vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
generated
vendored
1834
vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
generated
vendored
File diff suppressed because it is too large
Load Diff
40
vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
generated
vendored
40
vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
generated
vendored
@@ -10,13 +10,10 @@ import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
//go:cgo_import_dynamic libc_pipe pipe "libc.so"
|
||||
//go:cgo_import_dynamic libc_getsockname getsockname "libsocket.so"
|
||||
//go:cgo_import_dynamic libc_getcwd getcwd "libc.so"
|
||||
//go:cgo_import_dynamic libc_getgroups getgroups "libc.so"
|
||||
//go:cgo_import_dynamic libc_setgroups setgroups "libc.so"
|
||||
//go:cgo_import_dynamic libc_wait4 wait4 "libc.so"
|
||||
//go:cgo_import_dynamic libc_gethostname gethostname "libc.so"
|
||||
//go:cgo_import_dynamic libc_utimes utimes "libc.so"
|
||||
//go:cgo_import_dynamic libc_utimensat utimensat "libc.so"
|
||||
//go:cgo_import_dynamic libc_fcntl fcntl "libc.so"
|
||||
@@ -128,13 +125,10 @@ import (
|
||||
//go:cgo_import_dynamic libc_recvfrom recvfrom "libsocket.so"
|
||||
//go:cgo_import_dynamic libc_sysconf sysconf "libc.so"
|
||||
|
||||
//go:linkname procpipe libc_pipe
|
||||
//go:linkname procgetsockname libc_getsockname
|
||||
//go:linkname procGetcwd libc_getcwd
|
||||
//go:linkname procgetgroups libc_getgroups
|
||||
//go:linkname procsetgroups libc_setgroups
|
||||
//go:linkname procwait4 libc_wait4
|
||||
//go:linkname procgethostname libc_gethostname
|
||||
//go:linkname procutimes libc_utimes
|
||||
//go:linkname procutimensat libc_utimensat
|
||||
//go:linkname procfcntl libc_fcntl
|
||||
@@ -247,13 +241,10 @@ import (
|
||||
//go:linkname procsysconf libc_sysconf
|
||||
|
||||
var (
|
||||
procpipe,
|
||||
procgetsockname,
|
||||
procGetcwd,
|
||||
procgetgroups,
|
||||
procsetgroups,
|
||||
procwait4,
|
||||
procgethostname,
|
||||
procutimes,
|
||||
procutimensat,
|
||||
procfcntl,
|
||||
@@ -366,15 +357,6 @@ var (
|
||||
procsysconf syscallFunc
|
||||
)
|
||||
|
||||
func pipe(p *[2]_C_int) (n int, err error) {
|
||||
r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procpipe)), 1, uintptr(unsafe.Pointer(p)), 0, 0, 0, 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
|
||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgetsockname)), 3, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
@@ -413,28 +395,6 @@ func setgroups(ngid int, gid *_Gid_t) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func wait4(pid int32, statusp *_C_int, options int, rusage *Rusage) (wpid int32, err error) {
|
||||
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procwait4)), 4, uintptr(pid), uintptr(unsafe.Pointer(statusp)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
|
||||
wpid = int32(r0)
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func gethostname(buf []byte) (n int, err error) {
|
||||
var _p0 *byte
|
||||
if len(buf) > 0 {
|
||||
_p0 = &buf[0]
|
||||
}
|
||||
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgethostname)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), 0, 0, 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func utimes(path string, times *[2]Timeval) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
||||
348
vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
generated
vendored
348
vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
generated
vendored
@@ -1,348 +0,0 @@
|
||||
// mksysnum_linux.pl /usr/include/sparc64-linux-gnu/asm/unistd.h
|
||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||
|
||||
// +build sparc64,linux
|
||||
|
||||
package unix
|
||||
|
||||
const (
|
||||
SYS_RESTART_SYSCALL = 0
|
||||
SYS_EXIT = 1
|
||||
SYS_FORK = 2
|
||||
SYS_READ = 3
|
||||
SYS_WRITE = 4
|
||||
SYS_OPEN = 5
|
||||
SYS_CLOSE = 6
|
||||
SYS_WAIT4 = 7
|
||||
SYS_CREAT = 8
|
||||
SYS_LINK = 9
|
||||
SYS_UNLINK = 10
|
||||
SYS_EXECV = 11
|
||||
SYS_CHDIR = 12
|
||||
SYS_CHOWN = 13
|
||||
SYS_MKNOD = 14
|
||||
SYS_CHMOD = 15
|
||||
SYS_LCHOWN = 16
|
||||
SYS_BRK = 17
|
||||
SYS_PERFCTR = 18
|
||||
SYS_LSEEK = 19
|
||||
SYS_GETPID = 20
|
||||
SYS_CAPGET = 21
|
||||
SYS_CAPSET = 22
|
||||
SYS_SETUID = 23
|
||||
SYS_GETUID = 24
|
||||
SYS_VMSPLICE = 25
|
||||
SYS_PTRACE = 26
|
||||
SYS_ALARM = 27
|
||||
SYS_SIGALTSTACK = 28
|
||||
SYS_PAUSE = 29
|
||||
SYS_UTIME = 30
|
||||
SYS_ACCESS = 33
|
||||
SYS_NICE = 34
|
||||
SYS_SYNC = 36
|
||||
SYS_KILL = 37
|
||||
SYS_STAT = 38
|
||||
SYS_SENDFILE = 39
|
||||
SYS_LSTAT = 40
|
||||
SYS_DUP = 41
|
||||
SYS_PIPE = 42
|
||||
SYS_TIMES = 43
|
||||
SYS_UMOUNT2 = 45
|
||||
SYS_SETGID = 46
|
||||
SYS_GETGID = 47
|
||||
SYS_SIGNAL = 48
|
||||
SYS_GETEUID = 49
|
||||
SYS_GETEGID = 50
|
||||
SYS_ACCT = 51
|
||||
SYS_MEMORY_ORDERING = 52
|
||||
SYS_IOCTL = 54
|
||||
SYS_REBOOT = 55
|
||||
SYS_SYMLINK = 57
|
||||
SYS_READLINK = 58
|
||||
SYS_EXECVE = 59
|
||||
SYS_UMASK = 60
|
||||
SYS_CHROOT = 61
|
||||
SYS_FSTAT = 62
|
||||
SYS_FSTAT64 = 63
|
||||
SYS_GETPAGESIZE = 64
|
||||
SYS_MSYNC = 65
|
||||
SYS_VFORK = 66
|
||||
SYS_PREAD64 = 67
|
||||
SYS_PWRITE64 = 68
|
||||
SYS_MMAP = 71
|
||||
SYS_MUNMAP = 73
|
||||
SYS_MPROTECT = 74
|
||||
SYS_MADVISE = 75
|
||||
SYS_VHANGUP = 76
|
||||
SYS_MINCORE = 78
|
||||
SYS_GETGROUPS = 79
|
||||
SYS_SETGROUPS = 80
|
||||
SYS_GETPGRP = 81
|
||||
SYS_SETITIMER = 83
|
||||
SYS_SWAPON = 85
|
||||
SYS_GETITIMER = 86
|
||||
SYS_SETHOSTNAME = 88
|
||||
SYS_DUP2 = 90
|
||||
SYS_FCNTL = 92
|
||||
SYS_SELECT = 93
|
||||
SYS_FSYNC = 95
|
||||
SYS_SETPRIORITY = 96
|
||||
SYS_SOCKET = 97
|
||||
SYS_CONNECT = 98
|
||||
SYS_ACCEPT = 99
|
||||
SYS_GETPRIORITY = 100
|
||||
SYS_RT_SIGRETURN = 101
|
||||
SYS_RT_SIGACTION = 102
|
||||
SYS_RT_SIGPROCMASK = 103
|
||||
SYS_RT_SIGPENDING = 104
|
||||
SYS_RT_SIGTIMEDWAIT = 105
|
||||
SYS_RT_SIGQUEUEINFO = 106
|
||||
SYS_RT_SIGSUSPEND = 107
|
||||
SYS_SETRESUID = 108
|
||||
SYS_GETRESUID = 109
|
||||
SYS_SETRESGID = 110
|
||||
SYS_GETRESGID = 111
|
||||
SYS_RECVMSG = 113
|
||||
SYS_SENDMSG = 114
|
||||
SYS_GETTIMEOFDAY = 116
|
||||
SYS_GETRUSAGE = 117
|
||||
SYS_GETSOCKOPT = 118
|
||||
SYS_GETCWD = 119
|
||||
SYS_READV = 120
|
||||
SYS_WRITEV = 121
|
||||
SYS_SETTIMEOFDAY = 122
|
||||
SYS_FCHOWN = 123
|
||||
SYS_FCHMOD = 124
|
||||
SYS_RECVFROM = 125
|
||||
SYS_SETREUID = 126
|
||||
SYS_SETREGID = 127
|
||||
SYS_RENAME = 128
|
||||
SYS_TRUNCATE = 129
|
||||
SYS_FTRUNCATE = 130
|
||||
SYS_FLOCK = 131
|
||||
SYS_LSTAT64 = 132
|
||||
SYS_SENDTO = 133
|
||||
SYS_SHUTDOWN = 134
|
||||
SYS_SOCKETPAIR = 135
|
||||
SYS_MKDIR = 136
|
||||
SYS_RMDIR = 137
|
||||
SYS_UTIMES = 138
|
||||
SYS_STAT64 = 139
|
||||
SYS_SENDFILE64 = 140
|
||||
SYS_GETPEERNAME = 141
|
||||
SYS_FUTEX = 142
|
||||
SYS_GETTID = 143
|
||||
SYS_GETRLIMIT = 144
|
||||
SYS_SETRLIMIT = 145
|
||||
SYS_PIVOT_ROOT = 146
|
||||
SYS_PRCTL = 147
|
||||
SYS_PCICONFIG_READ = 148
|
||||
SYS_PCICONFIG_WRITE = 149
|
||||
SYS_GETSOCKNAME = 150
|
||||
SYS_INOTIFY_INIT = 151
|
||||
SYS_INOTIFY_ADD_WATCH = 152
|
||||
SYS_POLL = 153
|
||||
SYS_GETDENTS64 = 154
|
||||
SYS_INOTIFY_RM_WATCH = 156
|
||||
SYS_STATFS = 157
|
||||
SYS_FSTATFS = 158
|
||||
SYS_UMOUNT = 159
|
||||
SYS_SCHED_SET_AFFINITY = 160
|
||||
SYS_SCHED_GET_AFFINITY = 161
|
||||
SYS_GETDOMAINNAME = 162
|
||||
SYS_SETDOMAINNAME = 163
|
||||
SYS_UTRAP_INSTALL = 164
|
||||
SYS_QUOTACTL = 165
|
||||
SYS_SET_TID_ADDRESS = 166
|
||||
SYS_MOUNT = 167
|
||||
SYS_USTAT = 168
|
||||
SYS_SETXATTR = 169
|
||||
SYS_LSETXATTR = 170
|
||||
SYS_FSETXATTR = 171
|
||||
SYS_GETXATTR = 172
|
||||
SYS_LGETXATTR = 173
|
||||
SYS_GETDENTS = 174
|
||||
SYS_SETSID = 175
|
||||
SYS_FCHDIR = 176
|
||||
SYS_FGETXATTR = 177
|
||||
SYS_LISTXATTR = 178
|
||||
SYS_LLISTXATTR = 179
|
||||
SYS_FLISTXATTR = 180
|
||||
SYS_REMOVEXATTR = 181
|
||||
SYS_LREMOVEXATTR = 182
|
||||
SYS_SIGPENDING = 183
|
||||
SYS_QUERY_MODULE = 184
|
||||
SYS_SETPGID = 185
|
||||
SYS_FREMOVEXATTR = 186
|
||||
SYS_TKILL = 187
|
||||
SYS_EXIT_GROUP = 188
|
||||
SYS_UNAME = 189
|
||||
SYS_INIT_MODULE = 190
|
||||
SYS_PERSONALITY = 191
|
||||
SYS_REMAP_FILE_PAGES = 192
|
||||
SYS_EPOLL_CREATE = 193
|
||||
SYS_EPOLL_CTL = 194
|
||||
SYS_EPOLL_WAIT = 195
|
||||
SYS_IOPRIO_SET = 196
|
||||
SYS_GETPPID = 197
|
||||
SYS_SIGACTION = 198
|
||||
SYS_SGETMASK = 199
|
||||
SYS_SSETMASK = 200
|
||||
SYS_SIGSUSPEND = 201
|
||||
SYS_OLDLSTAT = 202
|
||||
SYS_USELIB = 203
|
||||
SYS_READDIR = 204
|
||||
SYS_READAHEAD = 205
|
||||
SYS_SOCKETCALL = 206
|
||||
SYS_SYSLOG = 207
|
||||
SYS_LOOKUP_DCOOKIE = 208
|
||||
SYS_FADVISE64 = 209
|
||||
SYS_FADVISE64_64 = 210
|
||||
SYS_TGKILL = 211
|
||||
SYS_WAITPID = 212
|
||||
SYS_SWAPOFF = 213
|
||||
SYS_SYSINFO = 214
|
||||
SYS_IPC = 215
|
||||
SYS_SIGRETURN = 216
|
||||
SYS_CLONE = 217
|
||||
SYS_IOPRIO_GET = 218
|
||||
SYS_ADJTIMEX = 219
|
||||
SYS_SIGPROCMASK = 220
|
||||
SYS_CREATE_MODULE = 221
|
||||
SYS_DELETE_MODULE = 222
|
||||
SYS_GET_KERNEL_SYMS = 223
|
||||
SYS_GETPGID = 224
|
||||
SYS_BDFLUSH = 225
|
||||
SYS_SYSFS = 226
|
||||
SYS_AFS_SYSCALL = 227
|
||||
SYS_SETFSUID = 228
|
||||
SYS_SETFSGID = 229
|
||||
SYS__NEWSELECT = 230
|
||||
SYS_SPLICE = 232
|
||||
SYS_STIME = 233
|
||||
SYS_STATFS64 = 234
|
||||
SYS_FSTATFS64 = 235
|
||||
SYS__LLSEEK = 236
|
||||
SYS_MLOCK = 237
|
||||
SYS_MUNLOCK = 238
|
||||
SYS_MLOCKALL = 239
|
||||
SYS_MUNLOCKALL = 240
|
||||
SYS_SCHED_SETPARAM = 241
|
||||
SYS_SCHED_GETPARAM = 242
|
||||
SYS_SCHED_SETSCHEDULER = 243
|
||||
SYS_SCHED_GETSCHEDULER = 244
|
||||
SYS_SCHED_YIELD = 245
|
||||
SYS_SCHED_GET_PRIORITY_MAX = 246
|
||||
SYS_SCHED_GET_PRIORITY_MIN = 247
|
||||
SYS_SCHED_RR_GET_INTERVAL = 248
|
||||
SYS_NANOSLEEP = 249
|
||||
SYS_MREMAP = 250
|
||||
SYS__SYSCTL = 251
|
||||
SYS_GETSID = 252
|
||||
SYS_FDATASYNC = 253
|
||||
SYS_NFSSERVCTL = 254
|
||||
SYS_SYNC_FILE_RANGE = 255
|
||||
SYS_CLOCK_SETTIME = 256
|
||||
SYS_CLOCK_GETTIME = 257
|
||||
SYS_CLOCK_GETRES = 258
|
||||
SYS_CLOCK_NANOSLEEP = 259
|
||||
SYS_SCHED_GETAFFINITY = 260
|
||||
SYS_SCHED_SETAFFINITY = 261
|
||||
SYS_TIMER_SETTIME = 262
|
||||
SYS_TIMER_GETTIME = 263
|
||||
SYS_TIMER_GETOVERRUN = 264
|
||||
SYS_TIMER_DELETE = 265
|
||||
SYS_TIMER_CREATE = 266
|
||||
SYS_IO_SETUP = 268
|
||||
SYS_IO_DESTROY = 269
|
||||
SYS_IO_SUBMIT = 270
|
||||
SYS_IO_CANCEL = 271
|
||||
SYS_IO_GETEVENTS = 272
|
||||
SYS_MQ_OPEN = 273
|
||||
SYS_MQ_UNLINK = 274
|
||||
SYS_MQ_TIMEDSEND = 275
|
||||
SYS_MQ_TIMEDRECEIVE = 276
|
||||
SYS_MQ_NOTIFY = 277
|
||||
SYS_MQ_GETSETATTR = 278
|
||||
SYS_WAITID = 279
|
||||
SYS_TEE = 280
|
||||
SYS_ADD_KEY = 281
|
||||
SYS_REQUEST_KEY = 282
|
||||
SYS_KEYCTL = 283
|
||||
SYS_OPENAT = 284
|
||||
SYS_MKDIRAT = 285
|
||||
SYS_MKNODAT = 286
|
||||
SYS_FCHOWNAT = 287
|
||||
SYS_FUTIMESAT = 288
|
||||
SYS_FSTATAT64 = 289
|
||||
SYS_UNLINKAT = 290
|
||||
SYS_RENAMEAT = 291
|
||||
SYS_LINKAT = 292
|
||||
SYS_SYMLINKAT = 293
|
||||
SYS_READLINKAT = 294
|
||||
SYS_FCHMODAT = 295
|
||||
SYS_FACCESSAT = 296
|
||||
SYS_PSELECT6 = 297
|
||||
SYS_PPOLL = 298
|
||||
SYS_UNSHARE = 299
|
||||
SYS_SET_ROBUST_LIST = 300
|
||||
SYS_GET_ROBUST_LIST = 301
|
||||
SYS_MIGRATE_PAGES = 302
|
||||
SYS_MBIND = 303
|
||||
SYS_GET_MEMPOLICY = 304
|
||||
SYS_SET_MEMPOLICY = 305
|
||||
SYS_KEXEC_LOAD = 306
|
||||
SYS_MOVE_PAGES = 307
|
||||
SYS_GETCPU = 308
|
||||
SYS_EPOLL_PWAIT = 309
|
||||
SYS_UTIMENSAT = 310
|
||||
SYS_SIGNALFD = 311
|
||||
SYS_TIMERFD_CREATE = 312
|
||||
SYS_EVENTFD = 313
|
||||
SYS_FALLOCATE = 314
|
||||
SYS_TIMERFD_SETTIME = 315
|
||||
SYS_TIMERFD_GETTIME = 316
|
||||
SYS_SIGNALFD4 = 317
|
||||
SYS_EVENTFD2 = 318
|
||||
SYS_EPOLL_CREATE1 = 319
|
||||
SYS_DUP3 = 320
|
||||
SYS_PIPE2 = 321
|
||||
SYS_INOTIFY_INIT1 = 322
|
||||
SYS_ACCEPT4 = 323
|
||||
SYS_PREADV = 324
|
||||
SYS_PWRITEV = 325
|
||||
SYS_RT_TGSIGQUEUEINFO = 326
|
||||
SYS_PERF_EVENT_OPEN = 327
|
||||
SYS_RECVMMSG = 328
|
||||
SYS_FANOTIFY_INIT = 329
|
||||
SYS_FANOTIFY_MARK = 330
|
||||
SYS_PRLIMIT64 = 331
|
||||
SYS_NAME_TO_HANDLE_AT = 332
|
||||
SYS_OPEN_BY_HANDLE_AT = 333
|
||||
SYS_CLOCK_ADJTIME = 334
|
||||
SYS_SYNCFS = 335
|
||||
SYS_SENDMMSG = 336
|
||||
SYS_SETNS = 337
|
||||
SYS_PROCESS_VM_READV = 338
|
||||
SYS_PROCESS_VM_WRITEV = 339
|
||||
SYS_KERN_FEATURES = 340
|
||||
SYS_KCMP = 341
|
||||
SYS_FINIT_MODULE = 342
|
||||
SYS_SCHED_SETATTR = 343
|
||||
SYS_SCHED_GETATTR = 344
|
||||
SYS_RENAMEAT2 = 345
|
||||
SYS_SECCOMP = 346
|
||||
SYS_GETRANDOM = 347
|
||||
SYS_MEMFD_CREATE = 348
|
||||
SYS_BPF = 349
|
||||
SYS_EXECVEAT = 350
|
||||
SYS_MEMBARRIER = 351
|
||||
SYS_USERFAULTFD = 352
|
||||
SYS_BIND = 353
|
||||
SYS_LISTEN = 354
|
||||
SYS_SETSOCKOPT = 355
|
||||
SYS_MLOCK2 = 356
|
||||
SYS_COPY_FILE_RANGE = 357
|
||||
SYS_PREADV2 = 358
|
||||
SYS_PWRITEV2 = 359
|
||||
)
|
||||
640
vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
generated
vendored
640
vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
generated
vendored
@@ -1,640 +0,0 @@
|
||||
// +build sparc64,linux
|
||||
// Created by cgo -godefs - DO NOT EDIT
|
||||
// cgo -godefs types_linux.go | go run mkpost.go
|
||||
|
||||
package unix
|
||||
|
||||
const (
|
||||
sizeofPtr = 0x8
|
||||
sizeofShort = 0x2
|
||||
sizeofInt = 0x4
|
||||
sizeofLong = 0x8
|
||||
sizeofLongLong = 0x8
|
||||
PathMax = 0x1000
|
||||
)
|
||||
|
||||
type (
|
||||
_C_short int16
|
||||
_C_int int32
|
||||
_C_long int64
|
||||
_C_long_long int64
|
||||
)
|
||||
|
||||
type Timespec struct {
|
||||
Sec int64
|
||||
Nsec int64
|
||||
}
|
||||
|
||||
type Timeval struct {
|
||||
Sec int64
|
||||
Usec int32
|
||||
Pad_cgo_0 [4]byte
|
||||
}
|
||||
|
||||
type Timex struct {
|
||||
Modes uint32
|
||||
Pad_cgo_0 [4]byte
|
||||
Offset int64
|
||||
Freq int64
|
||||
Maxerror int64
|
||||
Esterror int64
|
||||
Status int32
|
||||
Pad_cgo_1 [4]byte
|
||||
Constant int64
|
||||
Precision int64
|
||||
Tolerance int64
|
||||
Time Timeval
|
||||
Tick int64
|
||||
Ppsfreq int64
|
||||
Jitter int64
|
||||
Shift int32
|
||||
Pad_cgo_2 [4]byte
|
||||
Stabil int64
|
||||
Jitcnt int64
|
||||
Calcnt int64
|
||||
Errcnt int64
|
||||
Stbcnt int64
|
||||
Tai int32
|
||||
Pad_cgo_3 [44]byte
|
||||
}
|
||||
|
||||
type Time_t int64
|
||||
|
||||
type Tms struct {
|
||||
Utime int64
|
||||
Stime int64
|
||||
Cutime int64
|
||||
Cstime int64
|
||||
}
|
||||
|
||||
type Utimbuf struct {
|
||||
Actime int64
|
||||
Modtime int64
|
||||
}
|
||||
|
||||
type Rusage struct {
|
||||
Utime Timeval
|
||||
Stime Timeval
|
||||
Maxrss int64
|
||||
Ixrss int64
|
||||
Idrss int64
|
||||
Isrss int64
|
||||
Minflt int64
|
||||
Majflt int64
|
||||
Nswap int64
|
||||
Inblock int64
|
||||
Oublock int64
|
||||
Msgsnd int64
|
||||
Msgrcv int64
|
||||
Nsignals int64
|
||||
Nvcsw int64
|
||||
Nivcsw int64
|
||||
}
|
||||
|
||||
type Rlimit struct {
|
||||
Cur uint64
|
||||
Max uint64
|
||||
}
|
||||
|
||||
type _Gid_t uint32
|
||||
|
||||
type Stat_t struct {
|
||||
Dev uint64
|
||||
X__pad1 uint16
|
||||
Pad_cgo_0 [6]byte
|
||||
Ino uint64
|
||||
Mode uint32
|
||||
Nlink uint32
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
Rdev uint64
|
||||
X__pad2 uint16
|
||||
Pad_cgo_1 [6]byte
|
||||
Size int64
|
||||
Blksize int64
|
||||
Blocks int64
|
||||
Atim Timespec
|
||||
Mtim Timespec
|
||||
Ctim Timespec
|
||||
X__glibc_reserved4 uint64
|
||||
X__glibc_reserved5 uint64
|
||||
}
|
||||
|
||||
type Statfs_t struct {
|
||||
Type int64
|
||||
Bsize int64
|
||||
Blocks uint64
|
||||
Bfree uint64
|
||||
Bavail uint64
|
||||
Files uint64
|
||||
Ffree uint64
|
||||
Fsid Fsid
|
||||
Namelen int64
|
||||
Frsize int64
|
||||
Flags int64
|
||||
Spare [4]int64
|
||||
}
|
||||
|
||||
type Dirent struct {
|
||||
Ino uint64
|
||||
Off int64
|
||||
Reclen uint16
|
||||
Type uint8
|
||||
Name [256]int8
|
||||
Pad_cgo_0 [5]byte
|
||||
}
|
||||
|
||||
type Fsid struct {
|
||||
X__val [2]int32
|
||||
}
|
||||
|
||||
type Flock_t struct {
|
||||
Type int16
|
||||
Whence int16
|
||||
Pad_cgo_0 [4]byte
|
||||
Start int64
|
||||
Len int64
|
||||
Pid int32
|
||||
X__glibc_reserved int16
|
||||
Pad_cgo_1 [2]byte
|
||||
}
|
||||
|
||||
const (
|
||||
FADV_NORMAL = 0x0
|
||||
FADV_RANDOM = 0x1
|
||||
FADV_SEQUENTIAL = 0x2
|
||||
FADV_WILLNEED = 0x3
|
||||
FADV_DONTNEED = 0x4
|
||||
FADV_NOREUSE = 0x5
|
||||
)
|
||||
|
||||
type RawSockaddrInet4 struct {
|
||||
Family uint16
|
||||
Port uint16
|
||||
Addr [4]byte /* in_addr */
|
||||
Zero [8]uint8
|
||||
}
|
||||
|
||||
type RawSockaddrInet6 struct {
|
||||
Family uint16
|
||||
Port uint16
|
||||
Flowinfo uint32
|
||||
Addr [16]byte /* in6_addr */
|
||||
Scope_id uint32
|
||||
}
|
||||
|
||||
type RawSockaddrUnix struct {
|
||||
Family uint16
|
||||
Path [108]int8
|
||||
}
|
||||
|
||||
type RawSockaddrLinklayer struct {
|
||||
Family uint16
|
||||
Protocol uint16
|
||||
Ifindex int32
|
||||
Hatype uint16
|
||||
Pkttype uint8
|
||||
Halen uint8
|
||||
Addr [8]uint8
|
||||
}
|
||||
|
||||
type RawSockaddrNetlink struct {
|
||||
Family uint16
|
||||
Pad uint16
|
||||
Pid uint32
|
||||
Groups uint32
|
||||
}
|
||||
|
||||
type RawSockaddrHCI struct {
|
||||
Family uint16
|
||||
Dev uint16
|
||||
Channel uint16
|
||||
}
|
||||
|
||||
type RawSockaddr struct {
|
||||
Family uint16
|
||||
Data [14]int8
|
||||
}
|
||||
|
||||
type RawSockaddrAny struct {
|
||||
Addr RawSockaddr
|
||||
Pad [96]int8
|
||||
}
|
||||
|
||||
type _Socklen uint32
|
||||
|
||||
type Linger struct {
|
||||
Onoff int32
|
||||
Linger int32
|
||||
}
|
||||
|
||||
type Iovec struct {
|
||||
Base *byte
|
||||
Len uint64
|
||||
}
|
||||
|
||||
type IPMreq struct {
|
||||
Multiaddr [4]byte /* in_addr */
|
||||
Interface [4]byte /* in_addr */
|
||||
}
|
||||
|
||||
type IPMreqn struct {
|
||||
Multiaddr [4]byte /* in_addr */
|
||||
Address [4]byte /* in_addr */
|
||||
Ifindex int32
|
||||
}
|
||||
|
||||
type IPv6Mreq struct {
|
||||
Multiaddr [16]byte /* in6_addr */
|
||||
Interface uint32
|
||||
}
|
||||
|
||||
type Msghdr struct {
|
||||
Name *byte
|
||||
Namelen uint32
|
||||
Pad_cgo_0 [4]byte
|
||||
Iov *Iovec
|
||||
Iovlen uint64
|
||||
Control *byte
|
||||
Controllen uint64
|
||||
Flags int32
|
||||
Pad_cgo_1 [4]byte
|
||||
}
|
||||
|
||||
type Cmsghdr struct {
|
||||
Len uint64
|
||||
Level int32
|
||||
Type int32
|
||||
}
|
||||
|
||||
type Inet4Pktinfo struct {
|
||||
Ifindex int32
|
||||
Spec_dst [4]byte /* in_addr */
|
||||
Addr [4]byte /* in_addr */
|
||||
}
|
||||
|
||||
type Inet6Pktinfo struct {
|
||||
Addr [16]byte /* in6_addr */
|
||||
Ifindex uint32
|
||||
}
|
||||
|
||||
type IPv6MTUInfo struct {
|
||||
Addr RawSockaddrInet6
|
||||
Mtu uint32
|
||||
}
|
||||
|
||||
type ICMPv6Filter struct {
|
||||
Data [8]uint32
|
||||
}
|
||||
|
||||
type Ucred struct {
|
||||
Pid int32
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
}
|
||||
|
||||
type TCPInfo struct {
|
||||
State uint8
|
||||
Ca_state uint8
|
||||
Retransmits uint8
|
||||
Probes uint8
|
||||
Backoff uint8
|
||||
Options uint8
|
||||
Pad_cgo_0 [2]byte
|
||||
Rto uint32
|
||||
Ato uint32
|
||||
Snd_mss uint32
|
||||
Rcv_mss uint32
|
||||
Unacked uint32
|
||||
Sacked uint32
|
||||
Lost uint32
|
||||
Retrans uint32
|
||||
Fackets uint32
|
||||
Last_data_sent uint32
|
||||
Last_ack_sent uint32
|
||||
Last_data_recv uint32
|
||||
Last_ack_recv uint32
|
||||
Pmtu uint32
|
||||
Rcv_ssthresh uint32
|
||||
Rtt uint32
|
||||
Rttvar uint32
|
||||
Snd_ssthresh uint32
|
||||
Snd_cwnd uint32
|
||||
Advmss uint32
|
||||
Reordering uint32
|
||||
Rcv_rtt uint32
|
||||
Rcv_space uint32
|
||||
Total_retrans uint32
|
||||
}
|
||||
|
||||
const (
|
||||
SizeofSockaddrInet4 = 0x10
|
||||
SizeofSockaddrInet6 = 0x1c
|
||||
SizeofSockaddrAny = 0x70
|
||||
SizeofSockaddrUnix = 0x6e
|
||||
SizeofSockaddrLinklayer = 0x14
|
||||
SizeofSockaddrNetlink = 0xc
|
||||
SizeofSockaddrHCI = 0x6
|
||||
SizeofLinger = 0x8
|
||||
SizeofIPMreq = 0x8
|
||||
SizeofIPMreqn = 0xc
|
||||
SizeofIPv6Mreq = 0x14
|
||||
SizeofMsghdr = 0x38
|
||||
SizeofCmsghdr = 0x10
|
||||
SizeofInet4Pktinfo = 0xc
|
||||
SizeofInet6Pktinfo = 0x14
|
||||
SizeofIPv6MTUInfo = 0x20
|
||||
SizeofICMPv6Filter = 0x20
|
||||
SizeofUcred = 0xc
|
||||
SizeofTCPInfo = 0x68
|
||||
)
|
||||
|
||||
const (
|
||||
IFA_UNSPEC = 0x0
|
||||
IFA_ADDRESS = 0x1
|
||||
IFA_LOCAL = 0x2
|
||||
IFA_LABEL = 0x3
|
||||
IFA_BROADCAST = 0x4
|
||||
IFA_ANYCAST = 0x5
|
||||
IFA_CACHEINFO = 0x6
|
||||
IFA_MULTICAST = 0x7
|
||||
IFLA_UNSPEC = 0x0
|
||||
IFLA_ADDRESS = 0x1
|
||||
IFLA_BROADCAST = 0x2
|
||||
IFLA_IFNAME = 0x3
|
||||
IFLA_MTU = 0x4
|
||||
IFLA_LINK = 0x5
|
||||
IFLA_QDISC = 0x6
|
||||
IFLA_STATS = 0x7
|
||||
IFLA_COST = 0x8
|
||||
IFLA_PRIORITY = 0x9
|
||||
IFLA_MASTER = 0xa
|
||||
IFLA_WIRELESS = 0xb
|
||||
IFLA_PROTINFO = 0xc
|
||||
IFLA_TXQLEN = 0xd
|
||||
IFLA_MAP = 0xe
|
||||
IFLA_WEIGHT = 0xf
|
||||
IFLA_OPERSTATE = 0x10
|
||||
IFLA_LINKMODE = 0x11
|
||||
IFLA_LINKINFO = 0x12
|
||||
IFLA_NET_NS_PID = 0x13
|
||||
IFLA_IFALIAS = 0x14
|
||||
IFLA_MAX = 0x2a
|
||||
RT_SCOPE_UNIVERSE = 0x0
|
||||
RT_SCOPE_SITE = 0xc8
|
||||
RT_SCOPE_LINK = 0xfd
|
||||
RT_SCOPE_HOST = 0xfe
|
||||
RT_SCOPE_NOWHERE = 0xff
|
||||
RT_TABLE_UNSPEC = 0x0
|
||||
RT_TABLE_COMPAT = 0xfc
|
||||
RT_TABLE_DEFAULT = 0xfd
|
||||
RT_TABLE_MAIN = 0xfe
|
||||
RT_TABLE_LOCAL = 0xff
|
||||
RT_TABLE_MAX = 0xffffffff
|
||||
RTA_UNSPEC = 0x0
|
||||
RTA_DST = 0x1
|
||||
RTA_SRC = 0x2
|
||||
RTA_IIF = 0x3
|
||||
RTA_OIF = 0x4
|
||||
RTA_GATEWAY = 0x5
|
||||
RTA_PRIORITY = 0x6
|
||||
RTA_PREFSRC = 0x7
|
||||
RTA_METRICS = 0x8
|
||||
RTA_MULTIPATH = 0x9
|
||||
RTA_FLOW = 0xb
|
||||
RTA_CACHEINFO = 0xc
|
||||
RTA_TABLE = 0xf
|
||||
RTN_UNSPEC = 0x0
|
||||
RTN_UNICAST = 0x1
|
||||
RTN_LOCAL = 0x2
|
||||
RTN_BROADCAST = 0x3
|
||||
RTN_ANYCAST = 0x4
|
||||
RTN_MULTICAST = 0x5
|
||||
RTN_BLACKHOLE = 0x6
|
||||
RTN_UNREACHABLE = 0x7
|
||||
RTN_PROHIBIT = 0x8
|
||||
RTN_THROW = 0x9
|
||||
RTN_NAT = 0xa
|
||||
RTN_XRESOLVE = 0xb
|
||||
RTNLGRP_NONE = 0x0
|
||||
RTNLGRP_LINK = 0x1
|
||||
RTNLGRP_NOTIFY = 0x2
|
||||
RTNLGRP_NEIGH = 0x3
|
||||
RTNLGRP_TC = 0x4
|
||||
RTNLGRP_IPV4_IFADDR = 0x5
|
||||
RTNLGRP_IPV4_MROUTE = 0x6
|
||||
RTNLGRP_IPV4_ROUTE = 0x7
|
||||
RTNLGRP_IPV4_RULE = 0x8
|
||||
RTNLGRP_IPV6_IFADDR = 0x9
|
||||
RTNLGRP_IPV6_MROUTE = 0xa
|
||||
RTNLGRP_IPV6_ROUTE = 0xb
|
||||
RTNLGRP_IPV6_IFINFO = 0xc
|
||||
RTNLGRP_IPV6_PREFIX = 0x12
|
||||
RTNLGRP_IPV6_RULE = 0x13
|
||||
RTNLGRP_ND_USEROPT = 0x14
|
||||
SizeofNlMsghdr = 0x10
|
||||
SizeofNlMsgerr = 0x14
|
||||
SizeofRtGenmsg = 0x1
|
||||
SizeofNlAttr = 0x4
|
||||
SizeofRtAttr = 0x4
|
||||
SizeofIfInfomsg = 0x10
|
||||
SizeofIfAddrmsg = 0x8
|
||||
SizeofRtMsg = 0xc
|
||||
SizeofRtNexthop = 0x8
|
||||
)
|
||||
|
||||
type NlMsghdr struct {
|
||||
Len uint32
|
||||
Type uint16
|
||||
Flags uint16
|
||||
Seq uint32
|
||||
Pid uint32
|
||||
}
|
||||
|
||||
type NlMsgerr struct {
|
||||
Error int32
|
||||
Msg NlMsghdr
|
||||
}
|
||||
|
||||
type RtGenmsg struct {
|
||||
Family uint8
|
||||
}
|
||||
|
||||
type NlAttr struct {
|
||||
Len uint16
|
||||
Type uint16
|
||||
}
|
||||
|
||||
type RtAttr struct {
|
||||
Len uint16
|
||||
Type uint16
|
||||
}
|
||||
|
||||
type IfInfomsg struct {
|
||||
Family uint8
|
||||
X__ifi_pad uint8
|
||||
Type uint16
|
||||
Index int32
|
||||
Flags uint32
|
||||
Change uint32
|
||||
}
|
||||
|
||||
type IfAddrmsg struct {
|
||||
Family uint8
|
||||
Prefixlen uint8
|
||||
Flags uint8
|
||||
Scope uint8
|
||||
Index uint32
|
||||
}
|
||||
|
||||
type RtMsg struct {
|
||||
Family uint8
|
||||
Dst_len uint8
|
||||
Src_len uint8
|
||||
Tos uint8
|
||||
Table uint8
|
||||
Protocol uint8
|
||||
Scope uint8
|
||||
Type uint8
|
||||
Flags uint32
|
||||
}
|
||||
|
||||
type RtNexthop struct {
|
||||
Len uint16
|
||||
Flags uint8
|
||||
Hops uint8
|
||||
Ifindex int32
|
||||
}
|
||||
|
||||
const (
|
||||
SizeofSockFilter = 0x8
|
||||
SizeofSockFprog = 0x10
|
||||
)
|
||||
|
||||
type SockFilter struct {
|
||||
Code uint16
|
||||
Jt uint8
|
||||
Jf uint8
|
||||
K uint32
|
||||
}
|
||||
|
||||
type SockFprog struct {
|
||||
Len uint16
|
||||
Pad_cgo_0 [6]byte
|
||||
Filter *SockFilter
|
||||
}
|
||||
|
||||
type InotifyEvent struct {
|
||||
Wd int32
|
||||
Mask uint32
|
||||
Cookie uint32
|
||||
Len uint32
|
||||
}
|
||||
|
||||
const SizeofInotifyEvent = 0x10
|
||||
|
||||
type PtraceRegs struct {
|
||||
Regs [16]uint64
|
||||
Tstate uint64
|
||||
Tpc uint64
|
||||
Tnpc uint64
|
||||
Y uint32
|
||||
Magic uint32
|
||||
}
|
||||
|
||||
type ptracePsw struct {
|
||||
}
|
||||
|
||||
type ptraceFpregs struct {
|
||||
}
|
||||
|
||||
type ptracePer struct {
|
||||
}
|
||||
|
||||
type FdSet struct {
|
||||
Bits [16]int64
|
||||
}
|
||||
|
||||
type Sysinfo_t struct {
|
||||
Uptime int64
|
||||
Loads [3]uint64
|
||||
Totalram uint64
|
||||
Freeram uint64
|
||||
Sharedram uint64
|
||||
Bufferram uint64
|
||||
Totalswap uint64
|
||||
Freeswap uint64
|
||||
Procs uint16
|
||||
Pad uint16
|
||||
Pad_cgo_0 [4]byte
|
||||
Totalhigh uint64
|
||||
Freehigh uint64
|
||||
Unit uint32
|
||||
X_f [0]int8
|
||||
Pad_cgo_1 [4]byte
|
||||
}
|
||||
|
||||
type Utsname struct {
|
||||
Sysname [65]int8
|
||||
Nodename [65]int8
|
||||
Release [65]int8
|
||||
Version [65]int8
|
||||
Machine [65]int8
|
||||
Domainname [65]int8
|
||||
}
|
||||
|
||||
type Ustat_t struct {
|
||||
Tfree int32
|
||||
Pad_cgo_0 [4]byte
|
||||
Tinode uint64
|
||||
Fname [6]int8
|
||||
Fpack [6]int8
|
||||
Pad_cgo_1 [4]byte
|
||||
}
|
||||
|
||||
type EpollEvent struct {
|
||||
Events uint32
|
||||
X_padFd int32
|
||||
Fd int32
|
||||
Pad int32
|
||||
}
|
||||
|
||||
const (
|
||||
AT_FDCWD = -0x64
|
||||
AT_REMOVEDIR = 0x200
|
||||
AT_SYMLINK_FOLLOW = 0x400
|
||||
AT_SYMLINK_NOFOLLOW = 0x100
|
||||
)
|
||||
|
||||
type PollFd struct {
|
||||
Fd int32
|
||||
Events int16
|
||||
Revents int16
|
||||
}
|
||||
|
||||
const (
|
||||
POLLIN = 0x1
|
||||
POLLPRI = 0x2
|
||||
POLLOUT = 0x4
|
||||
POLLRDHUP = 0x800
|
||||
POLLERR = 0x8
|
||||
POLLHUP = 0x10
|
||||
POLLNVAL = 0x20
|
||||
)
|
||||
|
||||
type Sigset_t struct {
|
||||
X__val [16]uint64
|
||||
}
|
||||
|
||||
const _SC_PAGESIZE = 0x1e
|
||||
|
||||
type Termios struct {
|
||||
Iflag uint32
|
||||
Oflag uint32
|
||||
Cflag uint32
|
||||
Lflag uint32
|
||||
Line uint8
|
||||
Cc [19]uint8
|
||||
Ispeed uint32
|
||||
Ospeed uint32
|
||||
}
|
||||
3
vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go
generated
vendored
3
vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go
generated
vendored
@@ -1,6 +1,6 @@
|
||||
// +build amd64,solaris
|
||||
// Created by cgo -godefs - DO NOT EDIT
|
||||
// cgo -godefs types_solaris.go | go run mkpost.go
|
||||
// cgo -godefs types_solaris.go
|
||||
|
||||
package unix
|
||||
|
||||
@@ -11,7 +11,6 @@ const (
|
||||
sizeofLong = 0x8
|
||||
sizeofLongLong = 0x8
|
||||
PathMax = 0x400
|
||||
MaxHostNameLen = 0x100
|
||||
)
|
||||
|
||||
type (
|
||||
|
||||
64
vendor/vendor.json
vendored
64
vendor/vendor.json
vendored
@@ -33,10 +33,10 @@
|
||||
"revisionTime": "2016-07-29T03:38:29Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "SVXOQdpDBh0ihdZ5aIflgdA+Rpw=",
|
||||
"checksumSHA1": "kBeNcaKk56FguvPSUCEaH6AxpRc=",
|
||||
"path": "github.com/golang/protobuf/proto",
|
||||
"revision": "98fa357170587e470c5f27d3c3ea0947b71eb455",
|
||||
"revisionTime": "2016-10-12T20:53:35Z"
|
||||
"revision": "8ee79997227bf9b34611aee7946ae64735e6fd93",
|
||||
"revisionTime": "2016-11-17T03:31:26Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "bKMZjd2wPw13VwoE7mBeSv5djFA=",
|
||||
@@ -45,10 +45,16 @@
|
||||
"revisionTime": "2016-04-24T11:30:07Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "Ph+qmEo8RdBKBHZUhx0y5Oyk/U0=",
|
||||
"checksumSHA1": "OiV+xm/lsxmVkmQXHitpsbXPUMk=",
|
||||
"path": "github.com/prometheus/client_golang/prometheus",
|
||||
"revision": "5636dc67ae776adf5590da7349e70fbb9559972d",
|
||||
"revisionTime": "2016-09-16T18:03:40Z"
|
||||
"revision": "8aae34f3ffc9a93c75efeaad87bb192aa7750900",
|
||||
"revisionTime": "2016-09-12T10:34:28Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "lG3//eDlwqA4IOuAPrNtLh9G0TA=",
|
||||
"path": "github.com/prometheus/client_golang/prometheus/promhttp",
|
||||
"revision": "8aae34f3ffc9a93c75efeaad87bb192aa7750900",
|
||||
"revisionTime": "2016-09-12T10:34:28Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "DvwvOlPNAgRntBzt3b3OSRMS2N4=",
|
||||
@@ -57,34 +63,34 @@
|
||||
"revisionTime": "2015-02-12T10:17:44Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "mHyjbJ3BWOfUV6q9f5PBt0gaY1k=",
|
||||
"checksumSHA1": "psNQjAMg2W0x8Yq0Kvp3hDBK0AI=",
|
||||
"path": "github.com/prometheus/common/expfmt",
|
||||
"revision": "85637ea67b04b5c3bb25e671dacded2977f8f9f6",
|
||||
"revisionTime": "2016-10-02T21:02:34Z"
|
||||
"revision": "76316eadbb7895a0310c6098559b975216dc33bf",
|
||||
"revisionTime": "2016-09-10T11:41:46Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "GWlM3d2vPYyNATtTFgftS10/A9w=",
|
||||
"path": "github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg",
|
||||
"revision": "85637ea67b04b5c3bb25e671dacded2977f8f9f6",
|
||||
"revisionTime": "2016-10-02T21:02:34Z"
|
||||
"revision": "76316eadbb7895a0310c6098559b975216dc33bf",
|
||||
"revisionTime": "2016-09-10T11:41:46Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "UU6hIfhVjnAYDADQEfE/3T7Ddm8=",
|
||||
"path": "github.com/prometheus/common/log",
|
||||
"revision": "85637ea67b04b5c3bb25e671dacded2977f8f9f6",
|
||||
"revisionTime": "2016-10-02T21:02:34Z"
|
||||
"revision": "76316eadbb7895a0310c6098559b975216dc33bf",
|
||||
"revisionTime": "2016-09-10T11:41:46Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "nFie+rxcX5WdIv1diZ+fu3aj6lE=",
|
||||
"checksumSHA1": "Jx0GXl5hGnO25s3ryyvtdWHdCpw=",
|
||||
"path": "github.com/prometheus/common/model",
|
||||
"revision": "85637ea67b04b5c3bb25e671dacded2977f8f9f6",
|
||||
"revisionTime": "2016-10-02T21:02:34Z"
|
||||
"revision": "76316eadbb7895a0310c6098559b975216dc33bf",
|
||||
"revisionTime": "2016-09-10T11:41:46Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "91KYK0SpvkaMJJA2+BcxbVnyRO0=",
|
||||
"path": "github.com/prometheus/common/version",
|
||||
"revision": "85637ea67b04b5c3bb25e671dacded2977f8f9f6",
|
||||
"revisionTime": "2016-10-02T21:02:34Z"
|
||||
"revision": "76316eadbb7895a0310c6098559b975216dc33bf",
|
||||
"revisionTime": "2016-09-10T11:41:46Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "W218eJZPXJG783fUr/z6IaAZyes=",
|
||||
@@ -93,34 +99,34 @@
|
||||
"revisionTime": "2016-04-11T19:08:41Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "Xz3hUrPvOYGWTuHrEryoYAj9zwg=",
|
||||
"checksumSHA1": "8fD/im5Kwvy3JgmxulDTambmE8w=",
|
||||
"path": "golang.org/x/sys/unix",
|
||||
"revision": "9bb9f0998d48b31547d975974935ae9b48c7a03c",
|
||||
"revisionTime": "2016-10-11T23:07:22Z"
|
||||
"revision": "a646d33e2ee3172a661fc09bca23bb4889a41bc8",
|
||||
"revisionTime": "2016-07-15T05:43:45Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "fpW2dhGFC6SrVzipJx7fjg2DIH8=",
|
||||
"path": "golang.org/x/sys/windows",
|
||||
"revision": "9bb9f0998d48b31547d975974935ae9b48c7a03c",
|
||||
"revisionTime": "2016-10-11T23:07:22Z"
|
||||
"revision": "a646d33e2ee3172a661fc09bca23bb4889a41bc8",
|
||||
"revisionTime": "2016-07-15T05:43:45Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "PjYlbMS0ttyZYlaevvjA/gV3g1c=",
|
||||
"path": "golang.org/x/sys/windows/registry",
|
||||
"revision": "9bb9f0998d48b31547d975974935ae9b48c7a03c",
|
||||
"revisionTime": "2016-10-11T23:07:22Z"
|
||||
"revision": "a646d33e2ee3172a661fc09bca23bb4889a41bc8",
|
||||
"revisionTime": "2016-07-15T05:43:45Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "IRqLaXM/VQRzkbXPuiqOxTb2W0Y=",
|
||||
"path": "golang.org/x/sys/windows/svc",
|
||||
"revision": "9bb9f0998d48b31547d975974935ae9b48c7a03c",
|
||||
"revisionTime": "2016-10-11T23:07:22Z"
|
||||
"revision": "a646d33e2ee3172a661fc09bca23bb4889a41bc8",
|
||||
"revisionTime": "2016-07-15T05:43:45Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "uVlUSSKplihZG7N+QJ6fzDZ4Kh8=",
|
||||
"path": "golang.org/x/sys/windows/svc/eventlog",
|
||||
"revision": "9bb9f0998d48b31547d975974935ae9b48c7a03c",
|
||||
"revisionTime": "2016-10-11T23:07:22Z"
|
||||
"revision": "a646d33e2ee3172a661fc09bca23bb4889a41bc8",
|
||||
"revisionTime": "2016-07-15T05:43:45Z"
|
||||
}
|
||||
],
|
||||
"rootPath": "github.com/martinlindhe/wmi_exporter"
|
||||
|
||||
Reference in New Issue
Block a user