Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions iocAdmin/Db/ioc.template
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,25 @@ record(ai, "$(IOCNAME):IOC_CPU_LOAD") {
field(HIGH, "70")
field(HHSV, "MAJOR")
field(HSV, "MINOR")
field(FLNK, "$(IOCNAME):IOC_SINGLE_CPU_LOAD")

info(autosaveFields_pass0, "HOPR LOPR HIHI HIGH LOW LOLO HHSV HSV LSV LLSV")
}

record(calc, "$(IOCNAME):IOC_SINGLE_CPU_LOAD") {
field(INPA, "$(IOCNAME):IOC_CPU_LOAD")
field(INPB, "$(IOCNAME):CPU_CNT")
field(CALC, "A*B")
field(PREC, "1")
field(EGU, "%")
}

record(calcout, "$(IOCNAME):IOC_SINGLE_CPU_LOAD_HOPR") {
field(INPA, "$(IOCNAME):CPU_CNT CP")
field(CALC, "A*100")
field(OUT, "$(IOCNAME):IOC_SINGLE_CPU_LOAD.HOPR")
}

record(ai, "$(IOCNAME):CPU_CNT") {
field(DESC, "Number of CPUs")
field(DTYP, "IOC stats")
Expand All @@ -182,12 +197,22 @@ record(ai, "$(IOCNAME):SUSP_TASK_CNT") {
info(autosaveFields_pass0, "HOPR LOPR HIHI HIGH LOW LOLO HHSV HSV LSV LLSV")
}


record(ai, "$(IOCNAME):MEM_USED") {
field(DESC, "Allocated Memory")
field(SCAN, "I/O Intr")
field(DTYP, "IOC stats")
field(INP, "@allocated_bytes")
field(EGU, "byte")
field(FLNK, "$(IOCNAME):MEM_USED_GiB")
}

record(calc, "$(IOCNAME):MEM_USED_GiB") {
field(INPA, "$(IOCNAME):MEM_USED")
field(CALC, "A/1073741824")
field(PREC, "3")
field(EGU, "GiB")
field(DESC, "Used memory in GiB (2^30 bytes)")
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we have EGU=byte on the MEM_USED record, maybe add the equivalent here?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes to EGU. imo it should be GB, and the scaling factor should be A/B where B is 1073741824 ($2^{30}$).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Careful. According to standards the 1024^3 units are called GiB while GB uses 1000^3.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to standards

I guess this is SI. So I have had GB and GiB backwards all these years...

@ralphlange ralphlange Jun 2, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought the lowercase "i" was a typo.
But I will never call it "gibibyte" in public. I swear.


record(ai, "$(IOCNAME):MEM_FREE") {
Expand All @@ -198,16 +223,34 @@ record(ai, "$(IOCNAME):MEM_FREE") {
field(EGU, "byte")
field(LLSV, "MAJOR")
field(LSV, "MINOR")
field(FLNK, "$(IOCNAME):MEM_FREE_GiB")

info(autosaveFields_pass0, "HOPR LOPR LOW LOLO LSV LLSV")
}

record(calc, "$(IOCNAME):MEM_FREE_GiB") {
field(INPA, "$(IOCNAME):MEM_FREE")
field(CALC, "A/1073741824")
field(PREC, "3")
field(EGU, "GiB")
field(DESC, "Free memory in GiB (2^30 bytes)")
}

record(ai, "$(IOCNAME):MEM_MAX") {
field(DESC, "Maximum Memory")
field(SCAN, "I/O Intr")
field(DTYP, "IOC stats")
field(INP, "@total_bytes")
field(EGU, "byte")
field(FLNK, "$(IOCNAME):MEM_MAX_GiB")
}

record(calc, "$(IOCNAME):MEM_MAX_GiB") {
field(INPA, "$(IOCNAME):MEM_MAX")
field(CALC, "A/1073741824")
field(PREC, "3")
field(EGU, "GiB")
field(DESC, "Max. memory in GiB (2^30 bytes)")
}

record(ao, "$(IOCNAME):CA_UPD_TIME") {
Expand Down
28 changes: 14 additions & 14 deletions op/adl/ioc_stats_epics_env.adl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

file {
name="/home/epics/devel/devIocStats-3-1-15/op/adl/ioc_stats_epics_env.adl"
version=030109
name="/home/epics/support/devIocStats-3-1-16/op/adl/ioc_stats_epics_env.adl"
version=030117
}
display {
object {
Expand Down Expand Up @@ -263,7 +263,7 @@ text {
}
monitor {
chan="$(ioc):CA_SERVER_PORT"
clr=14
clr=54
bclr=4
}
align="horiz. centered"
Expand All @@ -279,7 +279,7 @@ text {
}
monitor {
chan="$(ioc):CA_REPEATER_PORT"
clr=14
clr=54
bclr=4
}
align="horiz. centered"
Expand All @@ -295,7 +295,7 @@ text {
}
monitor {
chan="$(ioc):CA_ADDR_LIST"
clr=14
clr=54
bclr=4
}
align="horiz. centered"
Expand All @@ -311,7 +311,7 @@ text {
}
monitor {
chan="$(ioc):CA_AUTO_ADDR_LIST"
clr=14
clr=54
bclr=4
}
align="horiz. centered"
Expand All @@ -327,7 +327,7 @@ text {
}
monitor {
chan="$(ioc):CA_MAX_ARRAY_BYTES"
clr=14
clr=54
bclr=4
}
align="horiz. centered"
Expand All @@ -343,7 +343,7 @@ text {
}
monitor {
chan="$(ioc):CA_CONN_TMO"
clr=14
clr=54
bclr=4
}
align="horiz. centered"
Expand All @@ -359,7 +359,7 @@ text {
}
monitor {
chan="$(ioc):CA_MAX_SEARCH_PERIOD"
clr=14
clr=54
bclr=4
}
align="horiz. centered"
Expand All @@ -375,7 +375,7 @@ text {
}
monitor {
chan="$(ioc):CA_BEACON_PERIOD"
clr=14
clr=54
bclr=4
}
align="horiz. centered"
Expand All @@ -391,7 +391,7 @@ text {
}
monitor {
chan="$(ioc):TZ"
clr=14
clr=54
bclr=4
}
align="horiz. centered"
Expand All @@ -407,7 +407,7 @@ text {
}
monitor {
chan="$(ioc):TS_NTP_INET"
clr=14
clr=54
bclr=4
}
align="horiz. centered"
Expand All @@ -423,7 +423,7 @@ text {
}
monitor {
chan="$(ioc):IOC_LOG_PORT"
clr=14
clr=54
bclr=4
}
align="horiz. centered"
Expand All @@ -439,7 +439,7 @@ text {
}
monitor {
chan="$(ioc):IOC_LOG_INET"
clr=14
clr=54
bclr=4
}
align="horiz. centered"
Expand Down
50 changes: 25 additions & 25 deletions op/adl/ioc_stats_limits.adl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

file {
name="/home/epics/devel/devIocStats-3-1-15/op/adl/ioc_stats_limits.adl"
version=030109
name="/home/epics/support/devIocStats-3-1-16/op/adl/ioc_stats_limits.adl"
version=030117
}
display {
object {
Expand Down Expand Up @@ -204,8 +204,8 @@ text {
}
monitor {
chan="$(ioc):CA_CLNT_CNT"
clr=14
bclr=9
clr=60
bclr=14
}
clrmod="alarm"
align="horiz. centered"
Expand All @@ -221,8 +221,8 @@ text {
}
monitor {
chan="$(ioc):CA_CONN_CNT"
clr=14
bclr=9
clr=60
bclr=14
}
clrmod="alarm"
align="horiz. centered"
Expand All @@ -238,8 +238,8 @@ text {
}
monitor {
chan="$(ioc):SUSP_TASK_CNT"
clr=14
bclr=9
clr=61
bclr=14
}
clrmod="alarm"
align="horiz. centered"
Expand All @@ -255,8 +255,8 @@ text {
}
monitor {
chan="$(ioc):FD_FREE"
clr=14
bclr=9
clr=60
bclr=14
}
clrmod="alarm"
align="horiz. centered"
Expand All @@ -272,8 +272,8 @@ text {
}
monitor {
chan="$(ioc):IOC_CPU_LOAD"
clr=14
bclr=9
clr=60
bclr=14
}
clrmod="alarm"
align="horiz. centered"
Expand All @@ -289,8 +289,8 @@ text {
}
monitor {
chan="$(ioc):MEM_FREE"
clr=14
bclr=9
clr=60
bclr=14
}
clrmod="alarm"
align="horiz. centered"
Expand Down Expand Up @@ -333,7 +333,7 @@ text {
control {
chan="$(ioc):CA_CLNT_CNT.HIGH"
clr=14
bclr=7
bclr=51
}
limits {
}
Expand All @@ -348,7 +348,7 @@ text {
control {
chan="$(ioc):CA_CONN_CNT.HIGH"
clr=14
bclr=7
bclr=51
}
limits {
}
Expand All @@ -363,7 +363,7 @@ text {
control {
chan="$(ioc):IOC_CPU_LOAD.HIGH"
clr=14
bclr=7
bclr=51
}
limits {
}
Expand All @@ -378,7 +378,7 @@ text {
control {
chan="$(ioc):FD_FREE.LOLO"
clr=14
bclr=7
bclr=51
}
limits {
}
Expand All @@ -393,7 +393,7 @@ text {
control {
chan="$(ioc):MEM_FREE.LOLO"
clr=14
bclr=7
bclr=51
}
limits {
}
Expand Down Expand Up @@ -434,7 +434,7 @@ text {
control {
chan="$(ioc):CA_CLNT_CNT.HIHI"
clr=14
bclr=7
bclr=51
}
limits {
}
Expand All @@ -449,7 +449,7 @@ text {
control {
chan="$(ioc):CA_CONN_CNT.HIHI"
clr=14
bclr=7
bclr=51
}
limits {
}
Expand All @@ -464,7 +464,7 @@ text {
control {
chan="$(ioc):SUSP_TASK_CNT.HIHI"
clr=14
bclr=7
bclr=51
}
limits {
}
Expand All @@ -479,7 +479,7 @@ text {
control {
chan="$(ioc):IOC_CPU_LOAD.HIHI"
clr=14
bclr=7
bclr=51
}
limits {
}
Expand All @@ -494,7 +494,7 @@ text {
control {
chan="$(ioc):FD_FREE.LOW"
clr=14
bclr=7
bclr=51
}
limits {
}
Expand All @@ -509,7 +509,7 @@ text {
control {
chan="$(ioc):MEM_FREE.LOW"
clr=14
bclr=7
bclr=51
}
limits {
}
Expand Down
Loading
Loading