001/*
002 * jPOS Project [http://jpos.org]
003 * Copyright (C) 2000-2026 jPOS Software SRL
004 *
005 * This program is free software: you can redistribute it and/or modify
006 * it under the terms of the GNU Affero General Public License as
007 * published by the Free Software Foundation, either version 3 of the
008 * License, or (at your option) any later version.
009 *
010 * This program is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
013 * GNU Affero General Public License for more details.
014 *
015 * You should have received a copy of the GNU Affero General Public License
016 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
017 */
018
019package org.jpos.log.evt;
020
021import com.fasterxml.jackson.annotation.JsonProperty;
022import com.fasterxml.jackson.annotation.JsonPropertyOrder;
023import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
024import org.jpos.log.AuditLogEvent;
025import java.nio.charset.Charset;
026import java.time.Duration;
027import java.util.List;
028import java.util.UUID;
029
030@JsonPropertyOrder({
031  "osName", "osVersion", "javaVersion", "javaVendor", "aes", "host", "userName", "cwd", "watch-service", "environment",
032  "args", "encoding", "zone-info", "processName", "freeSpace", "usableSpace", "version", "revision", "instance",
033  "uptime", "loadAverage", "processors", "drift", "maxMemory", "totalMemory", "freeMemory", "inUseMemory",
034  "gcTotalCnt", "gcTotalTime", "threadCount", "threadPeak", "nameRegistrar"
035})
036public record SysInfo (
037  @JsonProperty("os-name") String osName,
038  @JsonProperty("os-version") String osVersion,
039  @JsonProperty("java-version") String javaVersion,
040  @JsonProperty("java-vendor") String javaVendor,
041  @JsonProperty("AES") String aes,
042  String host,
043  @JsonProperty("user-name") String userName,
044  @JsonProperty("cwd") String cwd,
045  @JsonProperty("watch-service") String watchService,
046  String environment,
047  String args,
048  Charset encoding,
049  @JsonProperty("zone-info") String zoneInfo,
050  @JsonProperty("process-name") String processName,
051  @JsonProperty("free-space") String freeSpace,
052  @JsonProperty("usable-space") String usableSpace,
053  String version,
054  String revision,
055  UUID instance,
056  Duration uptime,
057  @JsonProperty("load-average") double loadAverage,
058  int processors,
059  long drift,
060  @JsonProperty("max-memory") long maxMemory,
061  @JsonProperty("total-memory") long totalMemory,
062  @JsonProperty("free-memory") long freeMemory,
063  @JsonProperty("in-use-memory") long inUseMemory,
064  @JsonProperty("gc-total-cnt") long gcTotalCnt,
065  @JsonProperty("gc-total-time") long gcTotalTime,
066  @JsonProperty("thread-count") int threadCount,
067  @JsonProperty("thread-peak") int threadPeak,
068  @JsonProperty("name-registrar") @JacksonXmlProperty(localName = "name-registrar") List<KV> nameRegistrarEntries,
069  @JsonProperty("threads") @JacksonXmlProperty(localName = "threads") List<KV> threads,
070  @JsonProperty("scripts") @JacksonXmlProperty(localName = "scripts") List<ProcessOutput> scripts
071) implements AuditLogEvent { }