Add records with better units in ioc.template#85
Conversation
simon-ess
left a comment
There was a problem hiding this comment.
Minor comment, and it applies to all similar added records.
| field(INPA, "$(IOCNAME):MEM_USED") | ||
| field(CALC, "A/1e9") | ||
| field(PREC, "3") | ||
| } |
There was a problem hiding this comment.
Since we have EGU=byte on the MEM_USED record, maybe add the equivalent here?
There was a problem hiding this comment.
Yes to EGU. imo it should be GB, and the scaling factor should be A/B where B is 1073741824 (
There was a problem hiding this comment.
Careful. According to standards the 1024^3 units are called GiB while GB uses 1000^3.
There was a problem hiding this comment.
According to standards
I guess this is SI. So I have had GB and GiB backwards all these years...
There was a problem hiding this comment.
I thought the lowercase "i" was a typo.
But I will never call it "gibibyte" in public. I swear.
|
Should we somehow deal with the fact that many sources confuse GB (1000^3) with GiB (1024^3)? Documentation-wise maybe? |
Personally, I find % of total more meaningful. Also, it would be nice if HOPR for this new record were computed as well. |
Changed ST_SCRIPT and APP_DIR to use waveform records rather than 2 stringin records. Changed memory record names from GB to GiB.
|
I have updated this PR:
|
The difference is how the numbers change when you change the (virtual) host machine's number of CPUs. % of single stays the same, so that values stay valid/comparable in the archive. % of total jumps when you change the host, making comparisons of archived data complicated. |
For a single process I prefer units of single CPU for 2 reasons:
|
|
Note that I did not remove the existing IOC_CPU_LOAD record that uses units of all CPUs. I just added a new IOC_SINGLE_CPU_LOAD that uses units of a single CPU. I also changed the ioc_stats_soft OPI screens to use the new IOC_SINGLE_CPU_LOAD rather than IOC_CPU_LOAD because the label for that value has always said "IOC (one CPU)". |
|
This looks good to me, although it is now failing the pre-commit check. HOWEVER this seems to be failing on auto-converted files. Did you manually update these or use a tool? |
I use the tools that come with Phoebus, edm, caQtDM, etc. I just ran a script locally to trim the trailing whitespace from the autoconverted files and pushed the new versions to this branch. |
|
It is still failing on the end-of-file check. I ran a script locally to check and fix that all files end with a newline. It found no files that did not end with newline, so I don't understand this error. |
|
Hi @MarkRivers - if you run it should fine the missing EOF newlines. As in the log from the run it finds If you like I can push these changes to your branch. |
|
@simon-ess The |
|
I looked at the file ioc_stats_epics_env.edl with vi and it DOES have a newline at the end. I ran this command to look for all files without newlines in the op/edl/autoconvert directory. It found no files without newlines. I then manually removed the newline from the end of ioc_stats_epics_env.edl, and the above command still found no files without ending newlines. I am confused. |
The label in the ioc_admin_soft OPI files says the IOC_CPU_LOAD is in units % of 1 CPU, but this is not true, it is in units % of all CPUs. Create a new IOC_SINGLE_CPU_LOAD record that is in units of % of a single CPU. Change ioc_admin_soft OPI screens to use this new record, so it agrees with the label.
The memory units for FREE, USED, and MAX are in bytes. This is very hard to read on systems with lots of memory. Create new records with _GB suffix that are in units of GB.