+
Skip to content

p4_server_uptime is not updating on non-SDP installation #93

@plawniczuk

Description

@plawniczuk

Hi,
I'm using current 0.10.2 p4metrics binary on non-sdp installation. I noticed that p4_server_uptime metric is not updating correctly. Counter value is constant.

Here are the logs from p4metrics:

$ sudo docker compose logs p4metrics | grep -C 2 "uptime"
p4metrics  | time="2025-10-02T11:00:49Z" level=debug msg="p4Cmd: p4  -u admin -p \"ssl:perforce.stage.11bits.com:1666\""
p4metrics  | time="2025-10-02T11:00:49Z" level=debug msg="cmd: p4  -u admin -p \"ssl:perforce.stage.11bits.com:1666\" info -s"
p4metrics  | time="2025-10-02T11:00:50Z" level=debug msg="p4info -s: 18 [...]"
p4metrics  | time="2025-10-02T11:00:50Z" level=debug msg="serverID: \"master\""
p4metrics  | time="2025-10-02T11:00:50Z" level=debug msg="cmd: p4  -u admin -p \"ssl:perforce.stage.11bits.com:1666\" configure show"
--
p4metrics  | time="2025-10-02T11:00:50Z" level=debug msg="start: monitorUptime"
p4metrics  | time="2025-10-02T11:00:50Z" level=debug msg="monitorUptime: parsing: 03:26:11"
p4metrics  | time="2025-10-02T11:00:50Z" level=debug msg="Metrics: [{\"p4_server_uptime\" \"P4D Server uptime (seconds)\" \"counter\" \"12371\" []}]"
p4metrics  | time="2025-10-02T11:00:50Z" level=debug msg="start: monitorChange"
p4metrics  | time="2025-10-02T11:00:50Z" level=debug msg="cmd: p4  -u admin -p \"ssl:perforce.stage.11bits.com:1666\" counter change"
--
p4metrics  | time="2025-10-02T11:01:50Z" level=debug msg="start: monitorUptime"
p4metrics  | time="2025-10-02T11:01:50Z" level=debug msg="monitorUptime: parsing: 03:26:11"
p4metrics  | time="2025-10-02T11:01:50Z" level=debug msg="Metrics: [{\"p4_server_uptime\" \"P4D Server uptime (seconds)\" \"counter\" \"12371\" []}]"
p4metrics  | time="2025-10-02T11:01:50Z" level=debug msg="start: monitorChange"
p4metrics  | time="2025-10-02T11:01:50Z" level=debug msg="cmd: p4  -u admin -p \"ssl:perforce.stage.11bits.com:1666\" counter change"
--
p4metrics  | time="2025-10-02T11:02:50Z" level=debug msg="start: monitorUptime"
p4metrics  | time="2025-10-02T11:02:50Z" level=debug msg="monitorUptime: parsing: 03:26:11"
p4metrics  | time="2025-10-02T11:02:50Z" level=debug msg="Metrics: [{\"p4_server_uptime\" \"P4D Server uptime (seconds)\" \"counter\" \"12371\" []}]"
p4metrics  | time="2025-10-02T11:02:50Z" level=debug msg="start: monitorChange"
p4metrics  | time="2025-10-02T11:02:50Z" level=debug msg="cmd: p4  -u admin -p \"ssl:perforce.stage.11bits.com:1666\" counter change"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载