Hello,
I'm working on an OSI version of devVxStats (IOC/CPU resource monitor), starting with the one from SNS, renaming it devStats, using the same technique that Marty Kraimer used for making OSI devLib (devStats, os/vxWorks/devStatsOSD, os/RTEMS/devStatsOSD, os/default/devStatsOSD). Till Straumann has provided the RTEMS hooks and I'm breaking out the existing vxWorks part and putting together a barebones default. It makes devStats a lot more maintainable without all the ifdef's for different OSs and differences in BSPs and OS versions are shoved down to the lower directories.
Three questions:
(1) Has anybody done this already?
(2) Is the name "devStats" OK? Would devCPUstats or devIOCstats be better? I'm keeping the "VX stats" DTYP.
(3) Has anybody done any work to make applicable parts of devVxStats work for linux? In particular, the max number of FDs and allocated or free FDs for the process. And a soft IOC's own %CPU would be nice if that is somehow available from C. Otherwise, there are probably external soft IOC monitoring tools that provide this kind of information so it's probably not worth the effort.
Some comments:
(1) There is a routine called read_ca_stats that finds the # of CA clients and # of connections in devVxStats. This routine REALLY needs to be a part of epics/base/src/rsrv so that it ultimately gets replaced in future versions.
(2) It would be nice if a routine were added to epicsThread in epics/base to provide the number of suspended threads for soft IOCs.
(3) There is a devVxStats from SLS that has even more features and other changes. I've run out of time to evaluate it and include it.
Thank you,
Stephanie Allison