]> granicus.if.org Git - sysstat/commitdiff
Add comments in files and cosmetic fix
authorSebastien GODARD <sysstat@users.noreply.github.com>
Mon, 10 Jan 2022 17:19:18 +0000 (18:19 +0100)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Mon, 10 Jan 2022 17:29:10 +0000 (18:29 +0100)
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
count.c
rd_stats.c
rd_stats.h

diff --git a/count.c b/count.c
index 0adc25e14722868da4158262edf5caecb3acd657..1a520a4f6639e397369da63b7c30c6a23d58d44b 100644 (file)
--- a/count.c
+++ b/count.c
@@ -154,6 +154,9 @@ int get_proc_cpu_nr(void)
  *    one have been disabled, we get the total number of proc since we use
  *    /sys to count them).
  * 2: two proc...
+ *
+ * USED BY:
+ * sadc, cifsiostat, iostat, mpstat, pidstat, tapestat
  ***************************************************************************
  */
 __nr_t get_cpu_nr(unsigned int max_nr_cpus, int highest)
@@ -186,6 +189,9 @@ __nr_t get_cpu_nr(unsigned int max_nr_cpus, int highest)
  *
  * RETURNS:
  * Number of interrupts per processor.
+ *
+ * USED BY:
+ * sadc, mpstat
  ***************************************************************************
  */
 __nr_t get_irqcpu_nr(char *file, int max_nr_irqcpu, int cpu_nr)
index ec074200d4b1cfd8d41a84215acb438cbf1cb044..7c59b926341b89ac3aa26d78b753eafdba0c2e40 100644 (file)
@@ -68,6 +68,9 @@ struct stats_psi {
  *
  * (*)This doesn't account for all processors in the machine in the case
  * where some CPU are offline and located at the end of the list.
+ *
+ * USED BY:
+ * sadc, iostat, mpstat, pidstat
  ***************************************************************************
  */
 __nr_t read_stat_cpu(struct stats_cpu *st_cpu, __nr_t nr_alloc)
@@ -237,6 +240,9 @@ __nr_t read_stat_irq(struct stats_irq *st_irq, __nr_t nr_alloc)
  *
  * RETURNS:
  * 1 on success, 0 otherwise.
+ *
+ * USED BY:
+ * sadc, pidstat
  ***************************************************************************
  */
 __nr_t read_meminfo(struct stats_memory *st_memory)
@@ -329,6 +335,9 @@ __nr_t read_meminfo(struct stats_memory *st_memory)
  *
  * OUT:
  * @uptime     Uptime value in hundredths of a second.
+ *
+ * USED BY:
+ * sadc, cifsiostat, iostat, mpstat, pidstat
  ***************************************************************************
  */
 void read_uptime(unsigned long long *uptime)
@@ -372,6 +381,9 @@ void read_uptime(unsigned long long *uptime)
  *
  * OUT:
  * @xds                Structure with extended statistics.
+ *
+ * USED BY:
+ * sar, sadf, iostat
  ***************************************************************************
 */
 void compute_ext_disk_stats(struct stats_disk *sdc, struct stats_disk *sdp,
@@ -405,6 +417,9 @@ void compute_ext_disk_stats(struct stats_disk *sdc, struct stats_disk *sdp,
  *
  * RETURNS:
  * Interval of time based on current CPU, expressed in jiffies.
+ *
+ * USED BY:
+ * sar, sadf, mpstat
  ***************************************************************************
  */
 unsigned long long get_per_cpu_interval(struct stats_cpu *scc,
@@ -2728,7 +2743,7 @@ __nr_t read_fchost(struct stats_fchost *st_fc, __nr_t nr_alloc)
  ***************************************************************************
  */
 int read_softnet(struct stats_softnet *st_softnet, __nr_t nr_alloc,
-                 unsigned char online_cpu_bitmap[])
+                unsigned char online_cpu_bitmap[])
 {
        FILE *fp;
        struct stats_softnet *st_softnet_i;
index 9dda2df10f1065256d7d140e87145d081b51d60d..c9d0a1ed7a4d4b7dfa271f09d03c24aad12dc7bd 100644 (file)
 
 /*
  * Structure for CPU statistics.
- * In activity buffer: First structure is for global CPU utilisation ("all").
+ * In activity buffer: First structure is for global CPU utilization ("all").
  * Following structures are for each individual CPU (0, 1, etc.)
+ *
+ * Used by: sadc, sar, sadf, iostat, mpstat, pidstat
  */
 struct stats_cpu {
        unsigned long long cpu_user;
@@ -187,7 +189,11 @@ struct stats_io {
 #define STATS_IO_UL    0
 #define STATS_IO_U     0
 
-/* Structure for memory and swap space utilization statistics */
+/*
+ * Structure for memory and swap space utilization statistics.
+ *
+ * Used by: sadc, sar, sadf, pidstat
+ */
 struct stats_memory {
        unsigned long long frmkb;
        unsigned long long bufkb;
@@ -257,7 +263,11 @@ struct stats_serial {
 #define STATS_SERIAL_UL                0
 #define STATS_SERIAL_U         7
 
-/* Structure for block devices statistics */
+/*
+ * Structure for block devices statistics.
+ *
+ * Used by: sadc, sar, sadf, iostat
+ */
 struct stats_disk {
        unsigned long long nr_ios;
        unsigned long long wwn[2];
@@ -600,7 +610,7 @@ struct stats_net_udp6 {
 
 /*
  * Structure for CPU frequency statistics.
- * In activity buffer: First structure is for global CPU utilisation ("all").
+ * In activity buffer: First structure is for global CPU utilization ("all").
  * Following structures are for each individual CPU (0, 1, etc.)
  */
 struct stats_pwr_cpufreq {
@@ -627,7 +637,7 @@ struct stats_huge {
 
 /*
  * Structure for weighted CPU frequency statistics.
- * In activity buffer: First structure is for global CPU utilisation ("all").
+ * In activity buffer: First structure is for global CPU utilization ("all").
  * Following structures are for each individual CPU (0, 1, etc.)
  */
 struct stats_pwr_wghfreq {