Files
s390-tools/cpacfstats
Marc Hartmayer 6028300366 cpacfstatsd: don't fail if no crypto counters are supported
Do not fail to start the daemon if no crypto counters are supported, as
there is still a use case for the daemon to run, as the user can then
use the 'cpacfstats' tool to evaluate that no counter stats are
available. Previously, the user had to check the syslogs for the reason
why the daemon was not running and the cpacfstats command failed.

Before this change:

$ cpacfstats
cpacfstats: Can't access domain socket file '/run/cpacfstatsd_socket', errno=2 [No such file or directory]
cpacfstats: Maybe cpacfstatsd daemon is not running ???
cpacfstats: Can't connect to daemon

After this change:

$ cpacfstats
 des counter: unsupported
 aes counter: unsupported
 sha counter: unsupported
 rng counter: unsupported
 ecc counter: unsupported
 pai_user   : unsupported
 pai_kernel : unsupported

Also, it's no good practice to let systemd services fail, because
otherwise the system state will be shown as 'degraded':

$ systemctl status
* a46lp59
    State: degraded
     Jobs: 0 queued
   Failed: 1 units

$ systemctl list-units --failed
  UNIT                LOAD   ACTIVE SUB    DESCRIPTION
* cpacfstatsd.service loaded failed failed CPACF statistics collection daemon process for Linux on System z

Reviewed-by: Holger Dengler <dengler@linux.ibm.com>
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2023-07-04 15:41:03 +02:00
..
2022-07-21 15:57:17 +02:00
2022-06-29 14:07:31 +02:00
2022-06-29 14:07:31 +02:00