diff options
author | Steven Toth <[email protected]> | 2016-09-28 12:58:00 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2016-09-28 16:18:05 -0600 |
commit | 8c60bcb4c317026e017a8ecffe303fd4e7f0db33 (patch) | |
tree | a69adc68dd1f442409ff70b07b5f592157c154d7 /src/gallium/auxiliary/hud/hud_private.h | |
parent | 29783c0887b3afd345e15e4e6910c04185219812 (diff) |
gallium/hud: Add support for block I/O, network I/O and lmsensor stats
V8: Feedback based on peer review
convert if block into a switch
Constify some func args
V7: Increase precision when measuring lmsensors volts
Flatten patch series.
V6: Feedback based on peer review
Simplify sensor initialization (arg passing).
Constify some func args
V5: Feedback based on peer review
Convert sprintf to snprintf
Convert char * to const char *
int arg converted to bool
Func changes to take a filename vs a larger struct.
Omit the space between '*' and the param name.
V4: Merged with master as of 2016/9/27 6pm
V3: Flatten the entire patchset ready for the ML
V2: Additional seperate patches based on feedback
a) configure.ac: Add a comment related to libsensors
b) HUD: Disable Block/NIC I/O stats by default.
Implement configuration option --enable-gallium-extra-hud=yes
and enable both statistics when this option is enabled.
c) Configure.ac: Minor cleanup to user visible configuration settings
d) Configure.ac: HUD stats - build system improvements
Move the -lsensors out of a deeper Makefile, bring it into the configure.ac.
Also, rename a compiler directive to more closely follow the standard.
V1: Initial release to the ML
Three new features:
1. Disk/block I/O device read/write stats MB/ps.
2. Network Interface RX/TX transfer statistics as a percentage
of the overall NIC speed.
3. lmsensor power, voltage and temperature sensors.
The lmsensor changes makes a dependency on libsensors so support
for the change is opt out by default.
Signed-off-by: Steven Toth <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/hud/hud_private.h')
-rw-r--r-- | src/gallium/auxiliary/hud/hud_private.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/hud/hud_private.h b/src/gallium/auxiliary/hud/hud_private.h index 2104c277016..c8255129e55 100644 --- a/src/gallium/auxiliary/hud/hud_private.h +++ b/src/gallium/auxiliary/hud/hud_private.h @@ -103,4 +103,29 @@ boolean hud_driver_query_install(struct hud_batch_query_context **pbq, void hud_batch_query_update(struct hud_batch_query_context *bq); void hud_batch_query_cleanup(struct hud_batch_query_context **pbq); +#if HAVE_GALLIUM_EXTRA_HUD +int hud_get_num_nics(bool displayhelp); +#define NIC_DIRECTION_RX 1 +#define NIC_DIRECTION_TX 2 +#define NIC_RSSI_DBM 3 +void hud_nic_graph_install(struct hud_pane *pane, const char *nic_index, + unsigned int mode); + +int hud_get_num_disks(bool displayhelp); +#define DISKSTAT_RD 1 +#define DISKSTAT_WR 2 +void hud_diskstat_graph_install(struct hud_pane *pane, const char *dev_name, + unsigned int mode); +#endif + +#if HAVE_LIBSENSORS +int hud_get_num_sensors(bool displayhelp); +#define SENSORS_TEMP_CURRENT 1 +#define SENSORS_TEMP_CRITICAL 2 +#define SENSORS_VOLTAGE_CURRENT 3 +#define SENSORS_CURRENT_CURRENT 4 +void hud_sensors_temp_graph_install(struct hud_pane *pane, const char *dev_name, + unsigned int mode); +#endif + #endif |