hattedsquirrel / ryzen_monitor

Monitor power information of Ryzen processors via the PM table of the SMU
GNU Affero General Public License v3.0
95 stars 16 forks source link

Skip part of output to fit important information into screen #26

Open annulen opened 11 months ago

annulen commented 11 months ago

I have Ryzen 5950x, and right now ryzen_monitor output doesn't completely fit into my terminal. In "monitoring" mode, i.e. without hitting Ctrl-C, I can only see cores 9–15 and anything below them. It would be great if it was possible to skip in particular Memory Interface block as it has no dynamically changing data at all.

For now I just commented out respective code block in ryzen_monitor.c but I guess it would be helpful to have a command line option for that.

diff --git a/src/ryzen_monitor.c b/src/ryzen_monitor.c
index 092b409..6ec1b85 100644
--- a/src/ryzen_monitor.c
+++ b/src/ryzen_monitor.c
@@ -206,20 +206,20 @@ void draw_screen(pm_table *pmt, system_info *sysinfo) {
     print_line("FIT", "%7.f   | %7.f   | %8.2f %%", pmta(FIT_VALUE), pmta(FIT_LIMIT), (pmta(FIT_VALUE) / pmta(FIT_LIMIT)) * 100.f);
     fprintf(stdout, "╰───────────────────────────────────────────────┴────────────────────────────────────────────────╯\n");

-    fprintf(stdout, "╭── Memory Interface ───────────────────────────┬────────────────────────────────────────────────╮\n");
-    print_line("Coupled Mode", "%8s", pmta(UCLK_FREQ) == pmta(MEMCLK_FREQ) ? "ON" : "OFF");
-    print_line("Fabric Clock (Average)", "%5.f MHz", pmta(FCLK_FREQ_EFF));
-    print_line("Fabric Clock", "%5.f MHz", pmta(FCLK_FREQ));
-    print_line("Uncore Clock", "%5.f MHz", pmta(UCLK_FREQ));
-    print_line("Memory Clock", "%5.f MHz", pmta(MEMCLK_FREQ));
-    //print_line("VDDCR_Mem", "%7.3f W", pmta(VDDIO_MEM_POWER)); //Is listed below in power section
-    //print_line("VDDCR_SoC", "%7.3f V", pmta(SOC_SET_VOLTAGE)); //Might be the default voltage, not the actually set one
-    print_line("cLDO_VDDM", "%7.4f V", pmta(V_VDDM));
-    print_line("cLDO_VDDP", "%7.4f V", pmta(V_VDDP));
-    if(pmt->V_VDDG)     print_line("cLDO_VDDG", "%7.4f V", pmta(V_VDDG));
-    if(pmt->V_VDDG_IOD) print_line("cLDO_VDDG_IOD", "%7.4f V", pmta(V_VDDG_IOD));
-    if(pmt->V_VDDG_CCD) print_line("cLDO_VDDG_CCD", "%7.4f V", pmta(V_VDDG_CCD));
-    fprintf(stdout, "╰───────────────────────────────────────────────┴────────────────────────────────────────────────╯\n");
+    //fprintf(stdout, "╭── Memory Interface ───────────────────────────┬────────────────────────────────────────────────╮\n");
+    //print_line("Coupled Mode", "%8s", pmta(UCLK_FREQ) == pmta(MEMCLK_FREQ) ? "ON" : "OFF");
+    //print_line("Fabric Clock (Average)", "%5.f MHz", pmta(FCLK_FREQ_EFF));
+    //print_line("Fabric Clock", "%5.f MHz", pmta(FCLK_FREQ));
+    //print_line("Uncore Clock", "%5.f MHz", pmta(UCLK_FREQ));
+    //print_line("Memory Clock", "%5.f MHz", pmta(MEMCLK_FREQ));
+    ////print_line("VDDCR_Mem", "%7.3f W", pmta(VDDIO_MEM_POWER)); //Is listed below in power section
+    ////print_line("VDDCR_SoC", "%7.3f V", pmta(SOC_SET_VOLTAGE)); //Might be the default voltage, not the actually set one
+    //print_line("cLDO_VDDM", "%7.4f V", pmta(V_VDDM));
+    //print_line("cLDO_VDDP", "%7.4f V", pmta(V_VDDP));
+    //if(pmt->V_VDDG)     print_line("cLDO_VDDG", "%7.4f V", pmta(V_VDDG));
+    //if(pmt->V_VDDG_IOD) print_line("cLDO_VDDG_IOD", "%7.4f V", pmta(V_VDDG_IOD));
+    //if(pmt->V_VDDG_CCD) print_line("cLDO_VDDG_CCD", "%7.4f V", pmta(V_VDDG_CCD));
+    //fprintf(stdout, "╰───────────────────────────────────────────────┴────────────────────────────────────────────────╯\n");

     if(pmt->has_graphics){
     fprintf(stdout, "╭── Graphics Subsystem──────────────────────────┬────────────────────────────────────────────────╮\n");
annulen commented 11 months ago

I've also commented out block under if (sysinfo->available) { which print CPU Model info. This data is also static and takes enormous vertical space.