Skip to content
Open
Show file tree
Hide file tree
Changes from 3 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
30 changes: 30 additions & 0 deletions iocAdmin/Db/ioc.template
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,18 @@ 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")
}

record(ai, "$(IOCNAME):CPU_CNT") {
field(DESC, "Number of CPUs")
field(DTYP, "IOC stats")
Expand All @@ -182,12 +190,20 @@ 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_GB")
}

record(calc, "$(IOCNAME):MEM_USED_GB") {
field(INPA, "$(IOCNAME):MEM_USED")
field(CALC, "A/1e9")
field(PREC, "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.

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 +214,30 @@ record(ai, "$(IOCNAME):MEM_FREE") {
field(EGU, "byte")
field(LLSV, "MAJOR")
field(LSV, "MINOR")
field(FLNK, "$(IOCNAME):MEM_FREE_GB")

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

record(calc, "$(IOCNAME):MEM_FREE_GB") {
field(INPA, "$(IOCNAME):MEM_FREE")
field(CALC, "A/1e9")
field(PREC, "3")
}

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_GB")
}

record(calc, "$(IOCNAME):MEM_MAX_GB") {
field(INPA, "$(IOCNAME):MEM_MAX")
field(CALC, "A/1e9")
field(PREC, "3")
}

record(ao, "$(IOCNAME):CA_UPD_TIME") {
Expand Down
6 changes: 3 additions & 3 deletions op/adl/ioc_stats_soft.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_soft.adl"
version=030109
name="/home/epics/support/devIocStats-3-1-16/op/adl/ioc_stats_soft.adl"
version=030117
}
display {
object {
Expand Down Expand Up @@ -756,7 +756,7 @@ text {
height=15
}
monitor {
chan="$(ioc):IOC_CPU_LOAD"
chan="$(ioc):IOC_SINGLE_CPU_LOAD"
clr=14
bclr=9
}
Expand Down
13 changes: 7 additions & 6 deletions op/bob/autoconvert/ioc_stats_soft.bob
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--Saved on 2026-05-31 15:22:19 by epics-->
<display version="2.0.0">
<name>ioc_stats_soft</name>
<x>807</x>
Expand Down Expand Up @@ -162,17 +163,17 @@
<y>42</y>
<width>0</width>
<height>170</height>
<line_width>1</line_width>
<line_color>
<color red="0" green="0" blue="0">
</color>
</line_color>
<points>
<point x="0.0" y="0.0">
</point>
<point x="0.0" y="170.0">
</point>
</points>
<line_width>1</line_width>
<line_color>
<color red="0" green="0" blue="0">
</color>
</line_color>
</widget>
<widget type="label" version="2.0.0">
<name>text #43</name>
Expand Down Expand Up @@ -766,7 +767,7 @@
</widget>
<widget type="textupdate" version="2.0.0">
<name>text update #170</name>
<pv_name>$(ioc):IOC_CPU_LOAD</pv_name>
<pv_name>$(ioc):IOC_SINGLE_CPU_LOAD</pv_name>
<x>475</x>
<y>479</y>
<width>60</width>
Expand Down
21 changes: 11 additions & 10 deletions op/edl/autoconvert/ioc_stats_soft.edl
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,7 @@ x 475
y 479
w 60
h 15
controlPv "$(ioc):IOC_CPU_LOAD"
controlPv "$(ioc):IOC_SINGLE_CPU_LOAD"
format "decimal"
font "helvetica-medium-r-12.0"
fontAlign "center"
Expand Down Expand Up @@ -1651,10 +1651,10 @@ buttonLabel "Alarm Limits"
numPvs 2
numDsps 1
displayFileName {
0 ioc_stats_limits.edl
0 "ioc_stats_limits.edl"
}
menuLabel {
0 Alarm Limits
0 "Alarm Limits"
}
symbols {
0 "ioc=$(ioc)"
Expand Down Expand Up @@ -1684,10 +1684,10 @@ buttonLabel "EPICS Env Vars"
numPvs 2
numDsps 1
displayFileName {
0 ioc_stats_epics_env.edl
0 "ioc_stats_epics_env.edl"
}
menuLabel {
0 EPICS Env Vars
0 "EPICS Env Vars"
}
symbols {
0 "ioc=$(ioc)"
Expand Down Expand Up @@ -1754,10 +1754,10 @@ buttonLabel "Reload Access Security Conf File"
numPvs 2
numDsps 1
displayFileName {
0 ioc_stats_reloadacf_confirm.edl
0 "ioc_stats_reloadacf_confirm.edl"
}
menuLabel {
0 Reload ACF
0 "Reload ACF"
}
symbols {
0 "ioc=$(ioc)"
Expand Down Expand Up @@ -1787,10 +1787,10 @@ buttonLabel "Reboot"
numPvs 2
numDsps 1
displayFileName {
0 ioc_stats_reboot_confirm.edl
0 "ioc_stats_reboot_confirm.edl"
}
menuLabel {
0 Reboot
0 "Reboot"
}
symbols {
0 "ioc=$(ioc)"
Expand All @@ -1817,10 +1817,11 @@ topShadowColor rgb 65280 65280 65280
botShadowColor rgb 0 0 0
controlPv "$(ioc):GTIM_RESET.PROC"
pressValue "0"
releaseValue
releaseValue
onLabel "Reset"
offLabel "Reset"
3d
useEnumNumeric
font "helvetica-medium-r-8.0"
endObjectProperties

2 changes: 1 addition & 1 deletion op/opi/autoconvert/ioc_stats_soft.opi
Original file line number Diff line number Diff line change
Expand Up @@ -2556,7 +2556,7 @@ $(pv_value)</tooltip>
<name>Text Update</name>
<precision>0</precision>
<precision_from_pv>true</precision_from_pv>
<pv_name>$(ioc):IOC_CPU_LOAD</pv_name>
<pv_name>$(ioc):IOC_SINGLE_CPU_LOAD</pv_name>
<pv_value />
<rotation_angle>0.0</rotation_angle>
<rules />
Expand Down
24 changes: 17 additions & 7 deletions op/ui/autoconvert/ioc_stats_soft.ui
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,16 @@ caChoice &gt; QPushButton {
padding: 1px;
}

/* when font specified, no font sizing is done any more, font: 10pt; is not bad. You could Enable this when you converted from .adl files
caRelatedDisplay &gt; QPushButton {
font: 10pt;
}

caShellCommand &gt; QPushButton {
font: 10pt;
}
*/

caSlider::groove:horizontal {
border: 1px solid #bbb;
background: lightgrey;
Expand Down Expand Up @@ -529,7 +539,7 @@ border-radius: 2px;
<enum>Solid</enum>
</property>
<property name="xyPairs">
<string>0,170;</string>
<string>0,0;0,170;</string>
</property>
</widget>
<widget class="caLabel" name="caLabel_10">
Expand Down Expand Up @@ -1300,7 +1310,7 @@ border-radius: 2px;
<string>Alarm Limits</string>
</property>
<property name="files">
<string>ioc_stats_limits.adl</string>
<string>ioc_stats_limits.ui </string>
</property>
<property name="args">
<string>ioc=$(ioc)</string>
Expand Down Expand Up @@ -1342,7 +1352,7 @@ border-radius: 2px;
<string>EPICS Env Vars</string>
</property>
<property name="files">
<string>ioc_stats_epics_env.adl</string>
<string>ioc_stats_epics_env.ui </string>
</property>
<property name="args">
<string>ioc=$(ioc)</string>
Expand Down Expand Up @@ -2165,7 +2175,7 @@ border-radius: 2px;
<enum>caLineEdit::WidthAndHeight</enum>
</property>
<property name="channel">
<string>$(ioc):IOC_CPU_LOAD</string>
<string>$(ioc):IOC_SINGLE_CPU_LOAD</string>
</property>
<property name="foreground">
<color alpha="255">
Expand Down Expand Up @@ -2927,7 +2937,7 @@ border-radius: 2px;
<string>Reload ACF</string>
</property>
<property name="files">
<string>ioc_stats_reloadacf_confirm.adl</string>
<string>ioc_stats_reloadacf_confirm.ui </string>
</property>
<property name="args">
<string>ioc=$(ioc)</string>
Expand Down Expand Up @@ -2969,7 +2979,7 @@ border-radius: 2px;
<string>Reboot</string>
</property>
<property name="files">
<string>ioc_stats_reboot_confirm.adl</string>
<string>ioc_stats_reboot_confirm.ui </string>
</property>
<property name="args">
<string>ioc=$(ioc)</string>
Expand Down Expand Up @@ -3690,4 +3700,4 @@ border-radius: 2px;
<zorder>caMessageButton_0</zorder>
</widget>
</widget>
</ui>
</ui>
Loading