Skip to content

Commit 67c2cc0

Browse files
committed
Add selinux rules, update man page
1 parent acd37fc commit 67c2cc0

File tree

2 files changed

+30
-21
lines changed

2 files changed

+30
-21
lines changed

src/pmdas/denki/pmdadenki.1

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,31 @@
1-
'\"macro stdmacro
2-
.\"
3-
.\" Copyright (c) 2021 Red Hat.
4-
.\"
1+
.\"
2+
.\" Copyright (c) 2021-2024 Red Hat.
3+
.\"
54
.\" This program is free software; you can redistribute it and/or modify it
65
.\" under the terms of the GNU General Public License as published by the
76
.\" Free Software Foundation; either version 2 of the License, or (at your
87
.\" option) any later version.
9-
.\"
8+
.\"
109
.\" This program is distributed in the hope that it will be useful, but
1110
.\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
1211
.\" or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1312
.\" for more details.
14-
.\"
15-
.TH PMDADENKI 1 "PCP" "Performance Co-Pilot"
16-
.SH NAME
13+
.\"
14+
.TH "PMDADENKI" "1" "PCP" "Performance Co-Pilot" ""
15+
.SH "NAME"
1716
\f3pmdadenki\f1 \- metrics related to the systems electrical consumption
18-
.SH SYNOPSIS
17+
.SH "SYNOPSIS"
1918
\f3$PCP_PMDAS_DIR/denki/pmdadenki\f1
2019
[\f3\-d\f1 \f2domain\f1]
2120
[\f3\-l\f1 \f2logfile\f1]
22-
.SH DESCRIPTION
21+
.SH "DESCRIPTION"
2322
.B pmdadenki
2423
is a Performance Metrics Domain Agent (PMDA) which extracts
2524
electricity related performance metrics.
26-
.PP
25+
.PP
2726
Currently, metrics from RAPL (on Intel cpus) and battery
2827
charge values are available, if supported by the hardware.
29-
.PP
28+
.PP
3029
.B \-l
3130
Location of the log file. By default, a log file named
3231
.I denki.log
@@ -43,28 +42,28 @@ The
4342
.B denki
4443
PMDA is installed and available by default on Linux.
4544
If you want to undo the installation, do the following as root:
46-
.PP
45+
.PP
4746
.ft CR
48-
.nf
47+
.nf
4948
.in +0.5i
5049
# cd $PCP_PMDAS_DIR/denki
5150
# ./Remove
5251
.in
53-
.fi
52+
.fi
5453
.ft 1
55-
.PP
54+
.PP
5655
If you want to establish access to the names, help text and values for the
5756
denki metrics once more, after removal, do the following as root:
58-
.PP
57+
.PP
5958
.ft CR
60-
.nf
59+
.nf
6160
.in +0.5i
6261
# cd $PCP_PMDAS_DIR/denki
6362
# ./Install
6463
.in
65-
.fi
64+
.fi
6665
.ft 1
67-
.PP
66+
.PP
6867
.B pmdadenki
6968
is launched by
7069
.BR pmcd (1)
@@ -118,5 +117,5 @@ as described in
118117
and
119118
.BR pcp.env (5).
120119

121-
.\" control lines for scripts/man-spell
120+
.\" control lines for scripts/man\-spell
122121
.\" +ok+ pmdadenki denki RAPL cpus

src/selinux/pcp.te

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,3 +1067,13 @@ allow syslogd_t pcp_log_t:fifo_file { open read write };
10671067
#files_manage_generic_tmp_files(pcp_pmie_t)
10681068
#
10691069
##============= pcp_pmlogger_t ==============
1070+
1071+
#============= pmda-denki =================
1072+
require {
1073+
type pcp_pmcd_t;
1074+
type cpu_device_t;
1075+
class chr_file { open read };
1076+
}
1077+
#============= pcp_pmcd_t ==============
1078+
allow pcp_pmcd_t cpu_device_t:chr_file read;
1079+
allow pcp_pmcd_t cpu_device_t:chr_file open;

0 commit comments

Comments
 (0)