From 23f14f1f18f13d4eaacff1f7f4d73b829ae5c111 Mon Sep 17 00:00:00 2001 From: kruskall <99559985+kruskall@users.noreply.github.com> Date: Fri, 11 Oct 2024 20:46:46 +0200 Subject: [PATCH] feat(metricbeat): initial windows arm support (#41039) resolve some of the compile errors on windows arm the remaining compile errors will be fixed once elastic/elastic-agent-system-metrics is bumped --- .../windows/pdh/defs_pdh_windows_arm.go | 217 ++++++++++++++++++ .../windows/pdh/defs_pdh_windows_arm64.go | 217 ++++++++++++++++++ metricbeat/helper/windows/pdh/doc.go | 4 +- .../service/defs_service_windows_arm.go | 206 +++++++++++++++++ .../service/defs_service_windows_arm64.go | 209 +++++++++++++++++ metricbeat/module/windows/service/doc.go | 4 +- 6 files changed, 855 insertions(+), 2 deletions(-) create mode 100644 metricbeat/helper/windows/pdh/defs_pdh_windows_arm.go create mode 100644 metricbeat/helper/windows/pdh/defs_pdh_windows_arm64.go create mode 100644 metricbeat/module/windows/service/defs_service_windows_arm.go create mode 100644 metricbeat/module/windows/service/defs_service_windows_arm64.go diff --git a/metricbeat/helper/windows/pdh/defs_pdh_windows_arm.go b/metricbeat/helper/windows/pdh/defs_pdh_windows_arm.go new file mode 100644 index 00000000000..e794050dcf5 --- /dev/null +++ b/metricbeat/helper/windows/pdh/defs_pdh_windows_arm.go @@ -0,0 +1,217 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you 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. + +// Code generated by cmd/cgo -godefs; DO NOT EDIT. +// cgo.exe -godefs defs_pdh_windows.go + +package pdh + +type PdhErrno uintptr + +const ( + PDH_CSTATUS_VALID_DATA PdhErrno = 0x0 + PDH_CSTATUS_NEW_DATA PdhErrno = 0x1 + PDH_CSTATUS_NO_MACHINE PdhErrno = 0x800007d0 + PDH_CSTATUS_NO_INSTANCE PdhErrno = 0x800007d1 + PDH_MORE_DATA PdhErrno = 0x800007d2 + PDH_CSTATUS_ITEM_NOT_VALIDATED PdhErrno = 0x800007d3 + PDH_RETRY PdhErrno = 0x800007d4 + PDH_NO_DATA PdhErrno = 0x800007d5 + PDH_CALC_NEGATIVE_DENOMINATOR PdhErrno = 0x800007d6 + PDH_CALC_NEGATIVE_TIMEBASE PdhErrno = 0x800007d7 + PDH_CALC_NEGATIVE_VALUE PdhErrno = 0x800007d8 + PDH_DIALOG_CANCELLED PdhErrno = 0x800007d9 + PDH_END_OF_LOG_FILE PdhErrno = 0x800007da + PDH_ASYNC_QUERY_TIMEOUT PdhErrno = 0x800007db + PDH_CANNOT_SET_DEFAULT_REALTIME_DATASOURCE PdhErrno = 0x800007dc + PDH_CSTATUS_NO_OBJECT PdhErrno = 0xc0000bb8 + PDH_CSTATUS_NO_COUNTER PdhErrno = 0xc0000bb9 + PDH_CSTATUS_INVALID_DATA PdhErrno = 0xc0000bba + PDH_MEMORY_ALLOCATION_FAILURE PdhErrno = 0xc0000bbb + PDH_INVALID_HANDLE PdhErrno = 0xc0000bbc + PDH_INVALID_ARGUMENT PdhErrno = 0xc0000bbd + PDH_FUNCTION_NOT_FOUND PdhErrno = 0xc0000bbe + PDH_CSTATUS_NO_COUNTERNAME PdhErrno = 0xc0000bbf + PDH_CSTATUS_BAD_COUNTERNAME PdhErrno = 0xc0000bc0 + PDH_INVALID_BUFFER PdhErrno = 0xc0000bc1 + PDH_INSUFFICIENT_BUFFER PdhErrno = 0xc0000bc2 + PDH_CANNOT_CONNECT_MACHINE PdhErrno = 0xc0000bc3 + PDH_INVALID_PATH PdhErrno = 0xc0000bc4 + PDH_INVALID_INSTANCE PdhErrno = 0xc0000bc5 + PDH_INVALID_DATA PdhErrno = 0xc0000bc6 + PDH_NO_DIALOG_DATA PdhErrno = 0xc0000bc7 + PDH_CANNOT_READ_NAME_STRINGS PdhErrno = 0xc0000bc8 + PDH_LOG_FILE_CREATE_ERROR PdhErrno = 0xc0000bc9 + PDH_LOG_FILE_OPEN_ERROR PdhErrno = 0xc0000bca + PDH_LOG_TYPE_NOT_FOUND PdhErrno = 0xc0000bcb + PDH_NO_MORE_DATA PdhErrno = 0xc0000bcc + PDH_ENTRY_NOT_IN_LOG_FILE PdhErrno = 0xc0000bcd + PDH_DATA_SOURCE_IS_LOG_FILE PdhErrno = 0xc0000bce + PDH_DATA_SOURCE_IS_REAL_TIME PdhErrno = 0xc0000bcf + PDH_UNABLE_READ_LOG_HEADER PdhErrno = 0xc0000bd0 + PDH_FILE_NOT_FOUND PdhErrno = 0xc0000bd1 + PDH_FILE_ALREADY_EXISTS PdhErrno = 0xc0000bd2 + PDH_NOT_IMPLEMENTED PdhErrno = 0xc0000bd3 + PDH_STRING_NOT_FOUND PdhErrno = 0xc0000bd4 + PDH_UNABLE_MAP_NAME_FILES PdhErrno = 0x80000bd5 + PDH_UNKNOWN_LOG_FORMAT PdhErrno = 0xc0000bd6 + PDH_UNKNOWN_LOGSVC_COMMAND PdhErrno = 0xc0000bd7 + PDH_LOGSVC_QUERY_NOT_FOUND PdhErrno = 0xc0000bd8 + PDH_LOGSVC_NOT_OPENED PdhErrno = 0xc0000bd9 + PDH_WBEM_ERROR PdhErrno = 0xc0000bda + PDH_ACCESS_DENIED PdhErrno = 0xc0000bdb + PDH_LOG_FILE_TOO_SMALL PdhErrno = 0xc0000bdc + PDH_INVALID_DATASOURCE PdhErrno = 0xc0000bdd + PDH_INVALID_SQLDB PdhErrno = 0xc0000bde + PDH_NO_COUNTERS PdhErrno = 0xc0000bdf + PDH_SQL_ALLOC_FAILED PdhErrno = 0xc0000be0 + PDH_SQL_ALLOCCON_FAILED PdhErrno = 0xc0000be1 + PDH_SQL_EXEC_DIRECT_FAILED PdhErrno = 0xc0000be2 + PDH_SQL_FETCH_FAILED PdhErrno = 0xc0000be3 + PDH_SQL_ROWCOUNT_FAILED PdhErrno = 0xc0000be4 + PDH_SQL_MORE_RESULTS_FAILED PdhErrno = 0xc0000be5 + PDH_SQL_CONNECT_FAILED PdhErrno = 0xc0000be6 + PDH_SQL_BIND_FAILED PdhErrno = 0xc0000be7 + PDH_CANNOT_CONNECT_WMI_SERVER PdhErrno = 0xc0000be8 + PDH_PLA_COLLECTION_ALREADY_RUNNING PdhErrno = 0xc0000be9 + PDH_PLA_ERROR_SCHEDULE_OVERLAP PdhErrno = 0xc0000bea + PDH_PLA_COLLECTION_NOT_FOUND PdhErrno = 0xc0000beb + PDH_PLA_ERROR_SCHEDULE_ELAPSED PdhErrno = 0xc0000bec + PDH_PLA_ERROR_NOSTART PdhErrno = 0xc0000bed + PDH_PLA_ERROR_ALREADY_EXISTS PdhErrno = 0xc0000bee + PDH_PLA_ERROR_TYPE_MISMATCH PdhErrno = 0xc0000bef + PDH_PLA_ERROR_FILEPATH PdhErrno = 0xc0000bf0 + PDH_PLA_SERVICE_ERROR PdhErrno = 0xc0000bf1 + PDH_PLA_VALIDATION_ERROR PdhErrno = 0xc0000bf2 + PDH_PLA_VALIDATION_WARNING PdhErrno = 0x80000bf3 + PDH_PLA_ERROR_NAME_TOO_LONG PdhErrno = 0xc0000bf4 + PDH_INVALID_SQL_LOG_FORMAT PdhErrno = 0xc0000bf5 + PDH_COUNTER_ALREADY_IN_QUERY PdhErrno = 0xc0000bf6 + PDH_BINARY_LOG_CORRUPT PdhErrno = 0xc0000bf7 + PDH_LOG_SAMPLE_TOO_SMALL PdhErrno = 0xc0000bf8 + PDH_OS_LATER_VERSION PdhErrno = 0xc0000bf9 + PDH_OS_EARLIER_VERSION PdhErrno = 0xc0000bfa + PDH_INCORRECT_APPEND_TIME PdhErrno = 0xc0000bfb + PDH_UNMATCHED_APPEND_COUNTER PdhErrno = 0xc0000bfc + PDH_SQL_ALTER_DETAIL_FAILED PdhErrno = 0xc0000bfd + PDH_QUERY_PERF_DATA_TIMEOUT PdhErrno = 0xc0000bfe +) + +var pdhErrors = map[PdhErrno]struct{}{ + PDH_CSTATUS_VALID_DATA: struct{}{}, + PDH_CSTATUS_NEW_DATA: struct{}{}, + PDH_CSTATUS_NO_MACHINE: struct{}{}, + PDH_CSTATUS_NO_INSTANCE: struct{}{}, + PDH_MORE_DATA: struct{}{}, + PDH_CSTATUS_ITEM_NOT_VALIDATED: struct{}{}, + PDH_RETRY: struct{}{}, + PDH_NO_DATA: struct{}{}, + PDH_CALC_NEGATIVE_DENOMINATOR: struct{}{}, + PDH_CALC_NEGATIVE_TIMEBASE: struct{}{}, + PDH_CALC_NEGATIVE_VALUE: struct{}{}, + PDH_DIALOG_CANCELLED: struct{}{}, + PDH_END_OF_LOG_FILE: struct{}{}, + PDH_ASYNC_QUERY_TIMEOUT: struct{}{}, + PDH_CANNOT_SET_DEFAULT_REALTIME_DATASOURCE: struct{}{}, + PDH_CSTATUS_NO_OBJECT: struct{}{}, + PDH_CSTATUS_NO_COUNTER: struct{}{}, + PDH_CSTATUS_INVALID_DATA: struct{}{}, + PDH_MEMORY_ALLOCATION_FAILURE: struct{}{}, + PDH_INVALID_HANDLE: struct{}{}, + PDH_INVALID_ARGUMENT: struct{}{}, + PDH_FUNCTION_NOT_FOUND: struct{}{}, + PDH_CSTATUS_NO_COUNTERNAME: struct{}{}, + PDH_CSTATUS_BAD_COUNTERNAME: struct{}{}, + PDH_INVALID_BUFFER: struct{}{}, + PDH_INSUFFICIENT_BUFFER: struct{}{}, + PDH_CANNOT_CONNECT_MACHINE: struct{}{}, + PDH_INVALID_PATH: struct{}{}, + PDH_INVALID_INSTANCE: struct{}{}, + PDH_INVALID_DATA: struct{}{}, + PDH_NO_DIALOG_DATA: struct{}{}, + PDH_CANNOT_READ_NAME_STRINGS: struct{}{}, + PDH_LOG_FILE_CREATE_ERROR: struct{}{}, + PDH_LOG_FILE_OPEN_ERROR: struct{}{}, + PDH_LOG_TYPE_NOT_FOUND: struct{}{}, + PDH_NO_MORE_DATA: struct{}{}, + PDH_ENTRY_NOT_IN_LOG_FILE: struct{}{}, + PDH_DATA_SOURCE_IS_LOG_FILE: struct{}{}, + PDH_DATA_SOURCE_IS_REAL_TIME: struct{}{}, + PDH_UNABLE_READ_LOG_HEADER: struct{}{}, + PDH_FILE_NOT_FOUND: struct{}{}, + PDH_FILE_ALREADY_EXISTS: struct{}{}, + PDH_NOT_IMPLEMENTED: struct{}{}, + PDH_STRING_NOT_FOUND: struct{}{}, + PDH_UNABLE_MAP_NAME_FILES: struct{}{}, + PDH_UNKNOWN_LOG_FORMAT: struct{}{}, + PDH_UNKNOWN_LOGSVC_COMMAND: struct{}{}, + PDH_LOGSVC_QUERY_NOT_FOUND: struct{}{}, + PDH_LOGSVC_NOT_OPENED: struct{}{}, + PDH_WBEM_ERROR: struct{}{}, + PDH_ACCESS_DENIED: struct{}{}, + PDH_LOG_FILE_TOO_SMALL: struct{}{}, + PDH_INVALID_DATASOURCE: struct{}{}, + PDH_INVALID_SQLDB: struct{}{}, + PDH_NO_COUNTERS: struct{}{}, + PDH_SQL_ALLOC_FAILED: struct{}{}, + PDH_SQL_ALLOCCON_FAILED: struct{}{}, + PDH_SQL_EXEC_DIRECT_FAILED: struct{}{}, + PDH_SQL_FETCH_FAILED: struct{}{}, + PDH_SQL_ROWCOUNT_FAILED: struct{}{}, + PDH_SQL_MORE_RESULTS_FAILED: struct{}{}, + PDH_SQL_CONNECT_FAILED: struct{}{}, + PDH_SQL_BIND_FAILED: struct{}{}, + PDH_CANNOT_CONNECT_WMI_SERVER: struct{}{}, + PDH_PLA_COLLECTION_ALREADY_RUNNING: struct{}{}, + PDH_PLA_ERROR_SCHEDULE_OVERLAP: struct{}{}, + PDH_PLA_COLLECTION_NOT_FOUND: struct{}{}, + PDH_PLA_ERROR_SCHEDULE_ELAPSED: struct{}{}, + PDH_PLA_ERROR_NOSTART: struct{}{}, + PDH_PLA_ERROR_ALREADY_EXISTS: struct{}{}, + PDH_PLA_ERROR_TYPE_MISMATCH: struct{}{}, + PDH_PLA_ERROR_FILEPATH: struct{}{}, + PDH_PLA_SERVICE_ERROR: struct{}{}, + PDH_PLA_VALIDATION_ERROR: struct{}{}, + PDH_PLA_VALIDATION_WARNING: struct{}{}, + PDH_PLA_ERROR_NAME_TOO_LONG: struct{}{}, + PDH_INVALID_SQL_LOG_FORMAT: struct{}{}, + PDH_COUNTER_ALREADY_IN_QUERY: struct{}{}, + PDH_BINARY_LOG_CORRUPT: struct{}{}, + PDH_LOG_SAMPLE_TOO_SMALL: struct{}{}, + PDH_OS_LATER_VERSION: struct{}{}, + PDH_OS_EARLIER_VERSION: struct{}{}, + PDH_INCORRECT_APPEND_TIME: struct{}{}, + PDH_UNMATCHED_APPEND_COUNTER: struct{}{}, + PDH_SQL_ALTER_DETAIL_FAILED: struct{}{}, + PDH_QUERY_PERF_DATA_TIMEOUT: struct{}{}, +} + +type PdhCounterFormat uint32 + +const ( + PdhFmtDouble PdhCounterFormat = 0x200 + + PdhFmtLarge PdhCounterFormat = 0x400 + + PdhFmtLong PdhCounterFormat = 0x100 + + PdhFmtNoScale PdhCounterFormat = 0x1000 + + PdhFmtNoCap100 PdhCounterFormat = 0x8000 + + PdhFmtMultiply1000 PdhCounterFormat = 0x2000 +) diff --git a/metricbeat/helper/windows/pdh/defs_pdh_windows_arm64.go b/metricbeat/helper/windows/pdh/defs_pdh_windows_arm64.go new file mode 100644 index 00000000000..e794050dcf5 --- /dev/null +++ b/metricbeat/helper/windows/pdh/defs_pdh_windows_arm64.go @@ -0,0 +1,217 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you 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. + +// Code generated by cmd/cgo -godefs; DO NOT EDIT. +// cgo.exe -godefs defs_pdh_windows.go + +package pdh + +type PdhErrno uintptr + +const ( + PDH_CSTATUS_VALID_DATA PdhErrno = 0x0 + PDH_CSTATUS_NEW_DATA PdhErrno = 0x1 + PDH_CSTATUS_NO_MACHINE PdhErrno = 0x800007d0 + PDH_CSTATUS_NO_INSTANCE PdhErrno = 0x800007d1 + PDH_MORE_DATA PdhErrno = 0x800007d2 + PDH_CSTATUS_ITEM_NOT_VALIDATED PdhErrno = 0x800007d3 + PDH_RETRY PdhErrno = 0x800007d4 + PDH_NO_DATA PdhErrno = 0x800007d5 + PDH_CALC_NEGATIVE_DENOMINATOR PdhErrno = 0x800007d6 + PDH_CALC_NEGATIVE_TIMEBASE PdhErrno = 0x800007d7 + PDH_CALC_NEGATIVE_VALUE PdhErrno = 0x800007d8 + PDH_DIALOG_CANCELLED PdhErrno = 0x800007d9 + PDH_END_OF_LOG_FILE PdhErrno = 0x800007da + PDH_ASYNC_QUERY_TIMEOUT PdhErrno = 0x800007db + PDH_CANNOT_SET_DEFAULT_REALTIME_DATASOURCE PdhErrno = 0x800007dc + PDH_CSTATUS_NO_OBJECT PdhErrno = 0xc0000bb8 + PDH_CSTATUS_NO_COUNTER PdhErrno = 0xc0000bb9 + PDH_CSTATUS_INVALID_DATA PdhErrno = 0xc0000bba + PDH_MEMORY_ALLOCATION_FAILURE PdhErrno = 0xc0000bbb + PDH_INVALID_HANDLE PdhErrno = 0xc0000bbc + PDH_INVALID_ARGUMENT PdhErrno = 0xc0000bbd + PDH_FUNCTION_NOT_FOUND PdhErrno = 0xc0000bbe + PDH_CSTATUS_NO_COUNTERNAME PdhErrno = 0xc0000bbf + PDH_CSTATUS_BAD_COUNTERNAME PdhErrno = 0xc0000bc0 + PDH_INVALID_BUFFER PdhErrno = 0xc0000bc1 + PDH_INSUFFICIENT_BUFFER PdhErrno = 0xc0000bc2 + PDH_CANNOT_CONNECT_MACHINE PdhErrno = 0xc0000bc3 + PDH_INVALID_PATH PdhErrno = 0xc0000bc4 + PDH_INVALID_INSTANCE PdhErrno = 0xc0000bc5 + PDH_INVALID_DATA PdhErrno = 0xc0000bc6 + PDH_NO_DIALOG_DATA PdhErrno = 0xc0000bc7 + PDH_CANNOT_READ_NAME_STRINGS PdhErrno = 0xc0000bc8 + PDH_LOG_FILE_CREATE_ERROR PdhErrno = 0xc0000bc9 + PDH_LOG_FILE_OPEN_ERROR PdhErrno = 0xc0000bca + PDH_LOG_TYPE_NOT_FOUND PdhErrno = 0xc0000bcb + PDH_NO_MORE_DATA PdhErrno = 0xc0000bcc + PDH_ENTRY_NOT_IN_LOG_FILE PdhErrno = 0xc0000bcd + PDH_DATA_SOURCE_IS_LOG_FILE PdhErrno = 0xc0000bce + PDH_DATA_SOURCE_IS_REAL_TIME PdhErrno = 0xc0000bcf + PDH_UNABLE_READ_LOG_HEADER PdhErrno = 0xc0000bd0 + PDH_FILE_NOT_FOUND PdhErrno = 0xc0000bd1 + PDH_FILE_ALREADY_EXISTS PdhErrno = 0xc0000bd2 + PDH_NOT_IMPLEMENTED PdhErrno = 0xc0000bd3 + PDH_STRING_NOT_FOUND PdhErrno = 0xc0000bd4 + PDH_UNABLE_MAP_NAME_FILES PdhErrno = 0x80000bd5 + PDH_UNKNOWN_LOG_FORMAT PdhErrno = 0xc0000bd6 + PDH_UNKNOWN_LOGSVC_COMMAND PdhErrno = 0xc0000bd7 + PDH_LOGSVC_QUERY_NOT_FOUND PdhErrno = 0xc0000bd8 + PDH_LOGSVC_NOT_OPENED PdhErrno = 0xc0000bd9 + PDH_WBEM_ERROR PdhErrno = 0xc0000bda + PDH_ACCESS_DENIED PdhErrno = 0xc0000bdb + PDH_LOG_FILE_TOO_SMALL PdhErrno = 0xc0000bdc + PDH_INVALID_DATASOURCE PdhErrno = 0xc0000bdd + PDH_INVALID_SQLDB PdhErrno = 0xc0000bde + PDH_NO_COUNTERS PdhErrno = 0xc0000bdf + PDH_SQL_ALLOC_FAILED PdhErrno = 0xc0000be0 + PDH_SQL_ALLOCCON_FAILED PdhErrno = 0xc0000be1 + PDH_SQL_EXEC_DIRECT_FAILED PdhErrno = 0xc0000be2 + PDH_SQL_FETCH_FAILED PdhErrno = 0xc0000be3 + PDH_SQL_ROWCOUNT_FAILED PdhErrno = 0xc0000be4 + PDH_SQL_MORE_RESULTS_FAILED PdhErrno = 0xc0000be5 + PDH_SQL_CONNECT_FAILED PdhErrno = 0xc0000be6 + PDH_SQL_BIND_FAILED PdhErrno = 0xc0000be7 + PDH_CANNOT_CONNECT_WMI_SERVER PdhErrno = 0xc0000be8 + PDH_PLA_COLLECTION_ALREADY_RUNNING PdhErrno = 0xc0000be9 + PDH_PLA_ERROR_SCHEDULE_OVERLAP PdhErrno = 0xc0000bea + PDH_PLA_COLLECTION_NOT_FOUND PdhErrno = 0xc0000beb + PDH_PLA_ERROR_SCHEDULE_ELAPSED PdhErrno = 0xc0000bec + PDH_PLA_ERROR_NOSTART PdhErrno = 0xc0000bed + PDH_PLA_ERROR_ALREADY_EXISTS PdhErrno = 0xc0000bee + PDH_PLA_ERROR_TYPE_MISMATCH PdhErrno = 0xc0000bef + PDH_PLA_ERROR_FILEPATH PdhErrno = 0xc0000bf0 + PDH_PLA_SERVICE_ERROR PdhErrno = 0xc0000bf1 + PDH_PLA_VALIDATION_ERROR PdhErrno = 0xc0000bf2 + PDH_PLA_VALIDATION_WARNING PdhErrno = 0x80000bf3 + PDH_PLA_ERROR_NAME_TOO_LONG PdhErrno = 0xc0000bf4 + PDH_INVALID_SQL_LOG_FORMAT PdhErrno = 0xc0000bf5 + PDH_COUNTER_ALREADY_IN_QUERY PdhErrno = 0xc0000bf6 + PDH_BINARY_LOG_CORRUPT PdhErrno = 0xc0000bf7 + PDH_LOG_SAMPLE_TOO_SMALL PdhErrno = 0xc0000bf8 + PDH_OS_LATER_VERSION PdhErrno = 0xc0000bf9 + PDH_OS_EARLIER_VERSION PdhErrno = 0xc0000bfa + PDH_INCORRECT_APPEND_TIME PdhErrno = 0xc0000bfb + PDH_UNMATCHED_APPEND_COUNTER PdhErrno = 0xc0000bfc + PDH_SQL_ALTER_DETAIL_FAILED PdhErrno = 0xc0000bfd + PDH_QUERY_PERF_DATA_TIMEOUT PdhErrno = 0xc0000bfe +) + +var pdhErrors = map[PdhErrno]struct{}{ + PDH_CSTATUS_VALID_DATA: struct{}{}, + PDH_CSTATUS_NEW_DATA: struct{}{}, + PDH_CSTATUS_NO_MACHINE: struct{}{}, + PDH_CSTATUS_NO_INSTANCE: struct{}{}, + PDH_MORE_DATA: struct{}{}, + PDH_CSTATUS_ITEM_NOT_VALIDATED: struct{}{}, + PDH_RETRY: struct{}{}, + PDH_NO_DATA: struct{}{}, + PDH_CALC_NEGATIVE_DENOMINATOR: struct{}{}, + PDH_CALC_NEGATIVE_TIMEBASE: struct{}{}, + PDH_CALC_NEGATIVE_VALUE: struct{}{}, + PDH_DIALOG_CANCELLED: struct{}{}, + PDH_END_OF_LOG_FILE: struct{}{}, + PDH_ASYNC_QUERY_TIMEOUT: struct{}{}, + PDH_CANNOT_SET_DEFAULT_REALTIME_DATASOURCE: struct{}{}, + PDH_CSTATUS_NO_OBJECT: struct{}{}, + PDH_CSTATUS_NO_COUNTER: struct{}{}, + PDH_CSTATUS_INVALID_DATA: struct{}{}, + PDH_MEMORY_ALLOCATION_FAILURE: struct{}{}, + PDH_INVALID_HANDLE: struct{}{}, + PDH_INVALID_ARGUMENT: struct{}{}, + PDH_FUNCTION_NOT_FOUND: struct{}{}, + PDH_CSTATUS_NO_COUNTERNAME: struct{}{}, + PDH_CSTATUS_BAD_COUNTERNAME: struct{}{}, + PDH_INVALID_BUFFER: struct{}{}, + PDH_INSUFFICIENT_BUFFER: struct{}{}, + PDH_CANNOT_CONNECT_MACHINE: struct{}{}, + PDH_INVALID_PATH: struct{}{}, + PDH_INVALID_INSTANCE: struct{}{}, + PDH_INVALID_DATA: struct{}{}, + PDH_NO_DIALOG_DATA: struct{}{}, + PDH_CANNOT_READ_NAME_STRINGS: struct{}{}, + PDH_LOG_FILE_CREATE_ERROR: struct{}{}, + PDH_LOG_FILE_OPEN_ERROR: struct{}{}, + PDH_LOG_TYPE_NOT_FOUND: struct{}{}, + PDH_NO_MORE_DATA: struct{}{}, + PDH_ENTRY_NOT_IN_LOG_FILE: struct{}{}, + PDH_DATA_SOURCE_IS_LOG_FILE: struct{}{}, + PDH_DATA_SOURCE_IS_REAL_TIME: struct{}{}, + PDH_UNABLE_READ_LOG_HEADER: struct{}{}, + PDH_FILE_NOT_FOUND: struct{}{}, + PDH_FILE_ALREADY_EXISTS: struct{}{}, + PDH_NOT_IMPLEMENTED: struct{}{}, + PDH_STRING_NOT_FOUND: struct{}{}, + PDH_UNABLE_MAP_NAME_FILES: struct{}{}, + PDH_UNKNOWN_LOG_FORMAT: struct{}{}, + PDH_UNKNOWN_LOGSVC_COMMAND: struct{}{}, + PDH_LOGSVC_QUERY_NOT_FOUND: struct{}{}, + PDH_LOGSVC_NOT_OPENED: struct{}{}, + PDH_WBEM_ERROR: struct{}{}, + PDH_ACCESS_DENIED: struct{}{}, + PDH_LOG_FILE_TOO_SMALL: struct{}{}, + PDH_INVALID_DATASOURCE: struct{}{}, + PDH_INVALID_SQLDB: struct{}{}, + PDH_NO_COUNTERS: struct{}{}, + PDH_SQL_ALLOC_FAILED: struct{}{}, + PDH_SQL_ALLOCCON_FAILED: struct{}{}, + PDH_SQL_EXEC_DIRECT_FAILED: struct{}{}, + PDH_SQL_FETCH_FAILED: struct{}{}, + PDH_SQL_ROWCOUNT_FAILED: struct{}{}, + PDH_SQL_MORE_RESULTS_FAILED: struct{}{}, + PDH_SQL_CONNECT_FAILED: struct{}{}, + PDH_SQL_BIND_FAILED: struct{}{}, + PDH_CANNOT_CONNECT_WMI_SERVER: struct{}{}, + PDH_PLA_COLLECTION_ALREADY_RUNNING: struct{}{}, + PDH_PLA_ERROR_SCHEDULE_OVERLAP: struct{}{}, + PDH_PLA_COLLECTION_NOT_FOUND: struct{}{}, + PDH_PLA_ERROR_SCHEDULE_ELAPSED: struct{}{}, + PDH_PLA_ERROR_NOSTART: struct{}{}, + PDH_PLA_ERROR_ALREADY_EXISTS: struct{}{}, + PDH_PLA_ERROR_TYPE_MISMATCH: struct{}{}, + PDH_PLA_ERROR_FILEPATH: struct{}{}, + PDH_PLA_SERVICE_ERROR: struct{}{}, + PDH_PLA_VALIDATION_ERROR: struct{}{}, + PDH_PLA_VALIDATION_WARNING: struct{}{}, + PDH_PLA_ERROR_NAME_TOO_LONG: struct{}{}, + PDH_INVALID_SQL_LOG_FORMAT: struct{}{}, + PDH_COUNTER_ALREADY_IN_QUERY: struct{}{}, + PDH_BINARY_LOG_CORRUPT: struct{}{}, + PDH_LOG_SAMPLE_TOO_SMALL: struct{}{}, + PDH_OS_LATER_VERSION: struct{}{}, + PDH_OS_EARLIER_VERSION: struct{}{}, + PDH_INCORRECT_APPEND_TIME: struct{}{}, + PDH_UNMATCHED_APPEND_COUNTER: struct{}{}, + PDH_SQL_ALTER_DETAIL_FAILED: struct{}{}, + PDH_QUERY_PERF_DATA_TIMEOUT: struct{}{}, +} + +type PdhCounterFormat uint32 + +const ( + PdhFmtDouble PdhCounterFormat = 0x200 + + PdhFmtLarge PdhCounterFormat = 0x400 + + PdhFmtLong PdhCounterFormat = 0x100 + + PdhFmtNoScale PdhCounterFormat = 0x1000 + + PdhFmtNoCap100 PdhCounterFormat = 0x8000 + + PdhFmtMultiply1000 PdhCounterFormat = 0x2000 +) diff --git a/metricbeat/helper/windows/pdh/doc.go b/metricbeat/helper/windows/pdh/doc.go index 736bde4bec9..71f1b10067a 100644 --- a/metricbeat/helper/windows/pdh/doc.go +++ b/metricbeat/helper/windows/pdh/doc.go @@ -20,5 +20,7 @@ package pdh //go:generate go run mkpdh_defs.go //go:generate go run ../run.go -cmd "go tool cgo -godefs defs_pdh_windows.go" -goarch amd64 -output defs_pdh_windows_amd64.go //go:generate go run ../run.go -cmd "go tool cgo -godefs defs_pdh_windows.go" -goarch 386 -output defs_pdh_windows_386.go +//go:generate go run ../run.go -cmd "go tool cgo -godefs defs_pdh_windows.go" -goarch arm64 -output defs_pdh_windows_arm64.go +//go:generate go run ../run.go -cmd "go tool cgo -godefs defs_pdh_windows.go" -goarch arm -output defs_pdh_windows_arm.go //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zpdh_windows.go pdh_windows.go -//go:generate goimports -w defs_pdh_windows_amd64.go defs_pdh_windows_386.go zpdh_windows.go +//go:generate goimports -w defs_pdh_windows_amd64.go defs_pdh_windows_386.go defs_pdh_windows_arm64.go defs_pdh_windows_arm.go zpdh_windows.go diff --git a/metricbeat/module/windows/service/defs_service_windows_arm.go b/metricbeat/module/windows/service/defs_service_windows_arm.go new file mode 100644 index 00000000000..ebf58d8d4bd --- /dev/null +++ b/metricbeat/module/windows/service/defs_service_windows_arm.go @@ -0,0 +1,206 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you 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. + +// Created by cgo -godefs - DO NOT EDIT +// cgo.exe -godefs defs_service_windows.go + +package service + +type ServiceErrno uintptr + +const ( + SERVICE_ERROR_ACCESS_DENIED ServiceErrno = 0x5 + SERVICE_ERROR_MORE_DATA ServiceErrno = 0xea + SERVICE_ERROR_INVALID_PARAMETER ServiceErrno = 0x57 + SERVICE_ERROR_INVALID_HANDLE ServiceErrno = 0x6 + SERVICE_ERROR_INVALID_LEVEL ServiceErrno = 0x7c + SERVICE_ERROR_INVALID_NAME ServiceErrno = 0x7b + SERVICE_ERROR_SHUTDOWN_IN_PROGRESS ServiceErrno = 0x45b + SERVICE_ERROR_DATABASE_DOES_NOT_EXIST ServiceErrno = 0x429 + SERVICE_ERROR_INSUFFICIENT_BUFFER ServiceErrno = 0x7a + SERVICE_ERROR_SERVICE_DOES_NOT_EXIST ServiceErrno = 0x424 +) + +type ServiceErrorControl uint32 + +const ( + SERVICE_ERROR_CRITICAL ServiceErrno = 0x3 + SERVICE_ERROR_IGNORE ServiceErrno = 0x0 + SERVICE_ERROR_NORMAL ServiceErrno = 0x1 + SERVICE_ERROR_SEVERE ServiceErrno = 0x2 +) + +var serviceErrors = map[ServiceErrno]struct{}{ + SERVICE_ERROR_ACCESS_DENIED: struct{}{}, + SERVICE_ERROR_MORE_DATA: struct{}{}, + SERVICE_ERROR_INVALID_PARAMETER: struct{}{}, + SERVICE_ERROR_INVALID_HANDLE: struct{}{}, + SERVICE_ERROR_INVALID_LEVEL: struct{}{}, + SERVICE_ERROR_INVALID_NAME: struct{}{}, + SERVICE_ERROR_SHUTDOWN_IN_PROGRESS: struct{}{}, + SERVICE_ERROR_DATABASE_DOES_NOT_EXIST: struct{}{}, + SERVICE_ERROR_INSUFFICIENT_BUFFER: struct{}{}, + SERVICE_ERROR_CRITICAL: struct{}{}, + SERVICE_ERROR_IGNORE: struct{}{}, + SERVICE_ERROR_NORMAL: struct{}{}, + SERVICE_ERROR_SEVERE: struct{}{}, + SERVICE_ERROR_SERVICE_DOES_NOT_EXIST: struct{}{}, +} + +type ServiceType uint32 + +const ( + ServiceDriver ServiceType = 0xb + + ServiceFileSystemDriver ServiceType = 0x2 + + ServiceKernelDriver ServiceType = 0x1 + + ServiceWin32 ServiceType = 0x30 + + ServiceWin32OwnProcess ServiceType = 0x10 + + ServiceWin32Shareprocess ServiceType = 0x20 + ServiceInteractiveProcess ServiceType = 0x100 +) + +type ServiceState uint32 + +const ( + ServiceContinuePending ServiceState = 0x5 + ServicePausePending ServiceState = 0x6 + ServicePaused ServiceState = 0x7 + ServiceRunning ServiceState = 0x4 + ServiceStartPending ServiceState = 0x2 + ServiceStopPending ServiceState = 0x3 + ServiceStopped ServiceState = 0x1 +) + +type ServiceEnumState uint32 + +const ( + ServiceActive ServiceEnumState = 0x1 + + ServiceInActive ServiceEnumState = 0x2 + + ServiceStateAll ServiceEnumState = 0x3 +) + +type ServiceSCMAccessRight uint32 + +const ( + ScManagerAllAccess ServiceSCMAccessRight = 0xf003f + + ScManagerConnect ServiceSCMAccessRight = 0x1 + + ScManagerEnumerateService ServiceSCMAccessRight = 0x4 + + ScManagerQueryLockStatus ServiceSCMAccessRight = 0x10 +) + +type ServiceAccessRight uint32 + +const ( + ServiceAllAccess ServiceAccessRight = 0xf01ff + + ServiceChangeConfig ServiceAccessRight = 0x2 + + ServiceEnumerateDependents ServiceAccessRight = 0x8 + + ServiceInterrogate ServiceAccessRight = 0x80 + + ServicePauseContinue ServiceAccessRight = 0x40 + + ServiceQueryConfig ServiceAccessRight = 0x1 + + ServiceQueryStatus ServiceAccessRight = 0x4 + + ServiceStart ServiceAccessRight = 0x10 + + ServiceStop ServiceAccessRight = 0x20 + + ServiceUserDefinedControl ServiceAccessRight = 0x100 +) + +type ServiceInfoLevel uint32 + +const ( + ScEnumProcessInfo ServiceInfoLevel = 0x0 +) + +type ServiceStartType uint32 + +const ( + ServiceAutoStart ServiceStartType = 0x2 + + ServiceBootStart ServiceStartType = 0x0 + + ServiceDemandStart ServiceStartType = 0x3 + + ServiceDisabled ServiceStartType = 0x4 + + ServiceSystemStart ServiceStartType = 0x1 +) + +type ProcessAccessRight uint32 + +const ( + ProcessAllAccess ProcessAccessRight = 0x1f0fff + ProcessCreateProcess ProcessAccessRight = 0x80 + ProcessCreateThread ProcessAccessRight = 0x2 + ProcessDupHandle ProcessAccessRight = 0x40 + ProcessQueryInformation ProcessAccessRight = 0x400 + ProcessQueryLimitInformation ProcessAccessRight = 0x1000 + ProcessSetInformation ProcessAccessRight = 0x200 + ProcessSetQuota ProcessAccessRight = 0x100 + ProcessSuspendResume ProcessAccessRight = 0x800 + ProcessTerminate ProcessAccessRight = 0x1 + ProcessVmOperation ProcessAccessRight = 0x8 + ProcessVmRead ProcessAccessRight = 0x10 + ProcessVmWrite ProcessAccessRight = 0x20 + ProcessSynchronize ProcessAccessRight = 0x100000 +) + +type ServiceStatusProcess struct { + DwServiceType uint32 + DwCurrentState uint32 + DwControlsAccepted uint32 + DwWin32ExitCode uint32 + DwServiceSpecificExitCode uint32 + DwCheckPoint uint32 + DwWaitHint uint32 + DwProcessId uint32 + DwServiceFlags uint32 +} + +type EnumServiceStatusProcess struct { + LpServiceName *int8 + LpDisplayName *int8 + ServiceStatusProcess ServiceStatusProcess +} + +type QueryServiceConfig struct { + DwServiceType uint32 + DwStartType uint32 + DwErrorControl uint32 + LpBinaryPathName *int8 + LpLoadOrderGroup *int8 + DwTagId uint32 + LpDependencies *int8 + LpServiceStartName *int8 + LpDisplayName *int8 +} diff --git a/metricbeat/module/windows/service/defs_service_windows_arm64.go b/metricbeat/module/windows/service/defs_service_windows_arm64.go new file mode 100644 index 00000000000..9b2b6686d57 --- /dev/null +++ b/metricbeat/module/windows/service/defs_service_windows_arm64.go @@ -0,0 +1,209 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you 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. + +// Created by cgo -godefs - DO NOT EDIT +// cgo.exe -godefs defs_service_windows.go + +package service + +type ServiceErrno uintptr + +const ( + SERVICE_ERROR_ACCESS_DENIED ServiceErrno = 0x5 + SERVICE_ERROR_MORE_DATA ServiceErrno = 0xea + SERVICE_ERROR_INVALID_PARAMETER ServiceErrno = 0x57 + SERVICE_ERROR_INVALID_HANDLE ServiceErrno = 0x6 + SERVICE_ERROR_INVALID_LEVEL ServiceErrno = 0x7c + SERVICE_ERROR_INVALID_NAME ServiceErrno = 0x7b + SERVICE_ERROR_SHUTDOWN_IN_PROGRESS ServiceErrno = 0x45b + SERVICE_ERROR_DATABASE_DOES_NOT_EXIST ServiceErrno = 0x429 + SERVICE_ERROR_INSUFFICIENT_BUFFER ServiceErrno = 0x7a + SERVICE_ERROR_SERVICE_DOES_NOT_EXIST ServiceErrno = 0x424 +) + +type ServiceErrorControl uint32 + +const ( + SERVICE_ERROR_CRITICAL ServiceErrno = 0x3 + SERVICE_ERROR_IGNORE ServiceErrno = 0x0 + SERVICE_ERROR_NORMAL ServiceErrno = 0x1 + SERVICE_ERROR_SEVERE ServiceErrno = 0x2 +) + +var serviceErrors = map[ServiceErrno]struct{}{ + SERVICE_ERROR_ACCESS_DENIED: struct{}{}, + SERVICE_ERROR_MORE_DATA: struct{}{}, + SERVICE_ERROR_INVALID_PARAMETER: struct{}{}, + SERVICE_ERROR_INVALID_HANDLE: struct{}{}, + SERVICE_ERROR_INVALID_LEVEL: struct{}{}, + SERVICE_ERROR_INVALID_NAME: struct{}{}, + SERVICE_ERROR_SHUTDOWN_IN_PROGRESS: struct{}{}, + SERVICE_ERROR_DATABASE_DOES_NOT_EXIST: struct{}{}, + SERVICE_ERROR_INSUFFICIENT_BUFFER: struct{}{}, + SERVICE_ERROR_CRITICAL: struct{}{}, + SERVICE_ERROR_IGNORE: struct{}{}, + SERVICE_ERROR_NORMAL: struct{}{}, + SERVICE_ERROR_SEVERE: struct{}{}, + SERVICE_ERROR_SERVICE_DOES_NOT_EXIST: struct{}{}, +} + +type ServiceType uint32 + +const ( + ServiceDriver ServiceType = 0xb + + ServiceFileSystemDriver ServiceType = 0x2 + + ServiceKernelDriver ServiceType = 0x1 + + ServiceWin32 ServiceType = 0x30 + + ServiceWin32OwnProcess ServiceType = 0x10 + + ServiceWin32Shareprocess ServiceType = 0x20 + ServiceInteractiveProcess ServiceType = 0x100 +) + +type ServiceState uint32 + +const ( + ServiceContinuePending ServiceState = 0x5 + ServicePausePending ServiceState = 0x6 + ServicePaused ServiceState = 0x7 + ServiceRunning ServiceState = 0x4 + ServiceStartPending ServiceState = 0x2 + ServiceStopPending ServiceState = 0x3 + ServiceStopped ServiceState = 0x1 +) + +type ServiceEnumState uint32 + +const ( + ServiceActive ServiceEnumState = 0x1 + + ServiceInActive ServiceEnumState = 0x2 + + ServiceStateAll ServiceEnumState = 0x3 +) + +type ServiceSCMAccessRight uint32 + +const ( + ScManagerAllAccess ServiceSCMAccessRight = 0xf003f + + ScManagerConnect ServiceSCMAccessRight = 0x1 + + ScManagerEnumerateService ServiceSCMAccessRight = 0x4 + + ScManagerQueryLockStatus ServiceSCMAccessRight = 0x10 +) + +type ServiceAccessRight uint32 + +const ( + ServiceAllAccess ServiceAccessRight = 0xf01ff + + ServiceChangeConfig ServiceAccessRight = 0x2 + + ServiceEnumerateDependents ServiceAccessRight = 0x8 + + ServiceInterrogate ServiceAccessRight = 0x80 + + ServicePauseContinue ServiceAccessRight = 0x40 + + ServiceQueryConfig ServiceAccessRight = 0x1 + + ServiceQueryStatus ServiceAccessRight = 0x4 + + ServiceStart ServiceAccessRight = 0x10 + + ServiceStop ServiceAccessRight = 0x20 + + ServiceUserDefinedControl ServiceAccessRight = 0x100 +) + +type ServiceInfoLevel uint32 + +const ( + ScEnumProcessInfo ServiceInfoLevel = 0x0 +) + +type ServiceStartType uint32 + +const ( + ServiceAutoStart ServiceStartType = 0x2 + + ServiceBootStart ServiceStartType = 0x0 + + ServiceDemandStart ServiceStartType = 0x3 + + ServiceDisabled ServiceStartType = 0x4 + + ServiceSystemStart ServiceStartType = 0x1 +) + +type ProcessAccessRight uint32 + +const ( + ProcessAllAccess ProcessAccessRight = 0x1f0fff + ProcessCreateProcess ProcessAccessRight = 0x80 + ProcessCreateThread ProcessAccessRight = 0x2 + ProcessDupHandle ProcessAccessRight = 0x40 + ProcessQueryInformation ProcessAccessRight = 0x400 + ProcessQueryLimitInformation ProcessAccessRight = 0x1000 + ProcessSetInformation ProcessAccessRight = 0x200 + ProcessSetQuota ProcessAccessRight = 0x100 + ProcessSuspendResume ProcessAccessRight = 0x800 + ProcessTerminate ProcessAccessRight = 0x1 + ProcessVmOperation ProcessAccessRight = 0x8 + ProcessVmRead ProcessAccessRight = 0x10 + ProcessVmWrite ProcessAccessRight = 0x20 + ProcessSynchronize ProcessAccessRight = 0x100000 +) + +type ServiceStatusProcess struct { + DwServiceType uint32 + DwCurrentState uint32 + DwControlsAccepted uint32 + DwWin32ExitCode uint32 + DwServiceSpecificExitCode uint32 + DwCheckPoint uint32 + DwWaitHint uint32 + DwProcessId uint32 + DwServiceFlags uint32 +} + +type EnumServiceStatusProcess struct { + LpServiceName *int8 + LpDisplayName *int8 + ServiceStatusProcess ServiceStatusProcess + Pad_cgo_0 [4]byte +} + +type QueryServiceConfig struct { + DwServiceType uint32 + DwStartType uint32 + DwErrorControl uint32 + Pad_cgo_0 [4]byte + LpBinaryPathName *int8 + LpLoadOrderGroup *int8 + DwTagId uint32 + Pad_cgo_1 [4]byte + LpDependencies *int8 + LpServiceStartName *int8 + LpDisplayName *int8 +} diff --git a/metricbeat/module/windows/service/doc.go b/metricbeat/module/windows/service/doc.go index a766843e504..116ac7c58ef 100644 --- a/metricbeat/module/windows/service/doc.go +++ b/metricbeat/module/windows/service/doc.go @@ -20,5 +20,7 @@ package service //go:generate go run ../../../helper/windows/run.go -cmd "go tool cgo -godefs defs_service_windows.go" -goarch amd64 -output defs_service_windows_amd64.go //go:generate go run ../../../helper/windows/run.go -cmd "go tool cgo -godefs defs_service_windows.go" -goarch 386 -output defs_service_windows_386.go +//go:generate go run ../../../helper/windows/run.go -cmd "go tool cgo -godefs defs_service_windows.go" -goarch arm64 -output defs_service_windows_arm64.go +//go:generate go run ../../../helper/windows/run.go -cmd "go tool cgo -godefs defs_service_windows.go" -goarch arm -output defs_service_windows_arm.go //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zservice_windows.go service_windows.go -//go:generate goimports -w defs_service_windows_amd64.go defs_service_windows_386.go +//go:generate goimports -w defs_service_windows_amd64.go defs_service_windows_386.go defs_service_windows_arm64.go defs_service_windows_arm.go