Conky hard disk info  [Solved]

Message
Author
User avatar
wdscharff
Posts: 1153
Joined: Mon Feb 24, 2020 1:07 am

Re: Conky hard disk info

#11 Post by wdscharff »

i have already listed the corresponding conky commands above, simply adapt the font and colour specifications to your own system (or throw them out) and the "goto" instructions for formatting as well.

Code: Select all

${font Open Sans:Bold:size=12}${color}mounted ${color0}${hr 2}$color$font$

${font Open Sans:size=12}Data ${goto 80}${fs_used /media/DATA} / ${fs_size /media/DATA}   ${goto 220} ${color5}${fs_bar 8,250 /media/DATA}${color}  ${goto 500}${fs_free_perc /media/DATA}% frei ${color} ${goto 580}I/O: ${color5}${diskio_read /dev/disk/by-label/DATA}${color}  :  ${color5}${diskio_write  /dev/disk/by-label/DATA}${color}
 
${font Open Sans:size=12}evo850 ${goto 80}${fs_used /media/evo850} / ${fs_size /media/evo850}   ${goto 220} ${color5}${fs_bar 8,250 /media/evo850}${color}  ${goto 500}${fs_free_perc /media/evo850}% frei ${goto 580}I/O: ${color5}${diskio_read /dev/disk/by-label/evo850}${color}  :  ${color5}${diskio_write  /dev/disk/by-label/evo850}${color}
in my case it is also a matter of the fact that they have to fit into a rather wide conky, since my conky is 700px wide.
mounted.jpg
You do not have the required permissions to view the files attached to this post.
my working horse Desktop AMD Ryzen 9 3900x, 32GB Ram // SSD ... enough
mx-fluxbox, what else?

In nature there are neither rewards nor punishments.
There are consequences.


my wallpaper gallery

Mjaakko
Posts: 34
Joined: Mon Jul 10, 2023 7:22 pm

Re: Conky hard disk info

#12 Post by Mjaakko »

wdscharff wrote: Mon Sep 18, 2023 12:08 pm i have already listed the corresponding conky commands above...
That I already saw but what's under Root and Home.... syntax for Total/use: 243 GIB/31,1 GIB. Does it show HDD capacity or the / and /home. Until now, after several Google searches, only Inxi shows total capacity but doesn't work with Conky. Also, not with FvwmConsole.

User avatar
siamhie
Global Moderator
Posts: 3793
Joined: Fri Aug 20, 2021 5:45 pm

Re: Conky hard disk info

#13 Post by siamhie »

@Mjaakko The link I posted (http://ifxgroup.net/conky.htm#fs_bar) has all the conky variables regarding hard drive information that can be shown.
This is my Fluxbox . There are many others like it, but this one is mine. My Fluxbox is my best friend. It is my life.
I must master it as I must master my life. Without me, my Fluxbox is useless. Without my Fluxbox, I am useless.

User avatar
entropyfoe
Posts: 637
Joined: Thu Apr 19, 2007 11:42 am

Re: Conky hard disk info

#14 Post by entropyfoe »

Is what you want found in the MX-Antix17 conky?

Those last four lines provide the memory, swap, root partition, and data disk; both amount used, and the total size.

Code: Select all

....
${if_up $template4}
${color}$template4 up: $alignr${color3} ${upspeed $template4}
${color}$alignr${upspeedgraph   $template4 25,170 5599cc 5599cc}
${color}$template4 down: $alignr${color3} ${downspeed $template4}
${color2}$alignr${downspeedgraph $template4 25,170  5599cc 5599cc}${endif}${if_up $template5}
${color}$template5 up: $alignr${color3} ${upspeed $template5}
${color}$alignr${upspeedgraph   $template5 25,170 5599cc 5599cc}
${color}$template5 down: $alignr${color3} ${downspeed $template5}
${color2}$alignr${downspeedgraph $template5 25,170  5599cc 5599cc}${endif}${if_up $template6}
${color}$template6 up: $alignr${color3} ${upspeed $template6}
${color2}$alignr${upspeedgraph   $template6 25,170 5599cc 5599cc}
${color}$template6 down: $alignr${color3} ${downspeed $template6}
${color2}$alignr${downspeedgraph $template6 25,170 5599cc 5599cc}${endif}${if_up $template7}
${color}$template7 up: $alignr${color3} ${upspeed $template7}
${color2}$alignr${upspeedgraph   $template7 25,170 5599cc 5599cc}
${color}$template7 down: $alignr${color3} ${downspeed $template7}
${color2}$alignr${downspeedgraph $template7 25,170 5599cc 5599cc}${endif}
${color}${alignr}${color8}Used / Total
${color}mem:${alignr}$mem ${color3} /${color} $memmax
${color}swap:${alignr}$swap ${color3} /${color} $swapmax
${color}root:${alignr}${fs_used /} ${color3} /${color} ${fs_size /}
${color}Data:${alignr}${fs_used /media/Data} ${color3} /${color} ${fs_size /media/Data}
]]
You do not have the required permissions to view the files attached to this post.
MX 23.6 AHS on Asus PRIME B650
Ryzen 9700X (16 threads @ 3.8 GHz)
64 Gig DDR4 6400 (Crucial)
Integrated Radeon graphics
Samsung 970 NVMe nvme0n1 P1-3=MX-23.5, P4=testing
Samsung 980 NVMe =2TB Data, plus 4TB WD =backups
on-board ethernet & sound

User avatar
wdscharff
Posts: 1153
Joined: Mon Feb 24, 2020 1:07 am

Re: Conky hard disk info

#15 Post by wdscharff »

Mjaakko wrote: Mon Sep 18, 2023 6:42 pm
That I already saw but what's under Root and Home.... syntax for Total/use: 243 GIB/31,1 GIB. Does it show HDD capacity or the / and /home. Until now, after several Google searches, only Inxi shows total capacity but doesn't work with Conky. Also, not with FvwmConsole.
Since root and /home are on the same partition for me, they are displayed together, otherwise I would have a different entry for /home, similar to the one for /DATA, which is my data partition to /home on the same SSD.
Here is the missing root/home

Code: Select all

${voffset 4}${color}${font Open Sans:Bold:size=12}Root and Home ${color0}${hr 3}
${font Open Sans:size=12}${color}total/use: ${fs_size /} / ${fs_used /} ${goto 230}${color5}${fs_bar 10,100 /}${color}${goto 350}Disk I/O: ${color5}${diskio /dev/nvme0n1p1}${color} ${goto 480}R: ${color5}${diskio_read /dev/nvme0n1p1}${color} ${goto 560}W: ${color5}${diskio_write /dev/nvme0n1p1}${color}  ${color}${goto 645}°C : ${color5}${hwmon 1 temp 3}${color}
ps: fs_size always shows the size of a partition not the whole ssd/hdd, which is of little interest to me because most of my ssd only has one partition and it occupies the entire space. Mi Inxi you can still see the space that all the disks have together, how much is occupied and how much is free. i think that's nice, but if you want to know that, you have to add half a dozen numbers in your head, the use of the calculator is legitimate, nowadays not everyone can do mental arithmetic :-)
Somewhere I also have a conky in which I have integrated inxi, but the same full package as with qsi. if you find the right command line, you can do a lot with inxi in conky, but not everything.
my working horse Desktop AMD Ryzen 9 3900x, 32GB Ram // SSD ... enough
mx-fluxbox, what else?

In nature there are neither rewards nor punishments.
There are consequences.


my wallpaper gallery

Mjaakko
Posts: 34
Joined: Mon Jul 10, 2023 7:22 pm

Re: Conky hard disk info  [Solved]

#16 Post by Mjaakko »

siamhie wrote: Mon Sep 18, 2023 6:52 pm @Mjaakko The link I posted (http://ifxgroup.net/conky.htm#fs_bar) has all the conky variables regarding hard drive information that can be shown.
I checked but only for mounted partitions. Usually, for everything need sudo such as sudo fdisk -l. I spent hours searching and experimenting to get rid of inxi generated triangle characters. Found the trick. With sed, copy specified selected alpha, numeric and character symbols. This excludes garbage characters when not specified.

Code: Select all

sed 's/[^a-z  A-Z 0-9 . % ( )]//g' file.txt
Trick when using FvwmConsole:

Code: Select all

Exec inxi -b > ~/.fvwm/core/7Modules/ConkyBtn/tmp.txt

Exec grep 'Storage' ~/.fvwm/core/7Modules/ConkyBtn/tmp.txt | \ 
   sed 's/[^a-z  A-Z 0-9 . % ( )]//g' | \
   sed 's/12//g' > ~/.fvwm/core/7Modules/ConkyBtn/hdd-storage.conf
Conky

Code: Select all

${execp cat ~/.fvwm/core/7Modules/ConkyBtn/hdd-storage.conf | sed 's/  Local Storage/HDD/'}
Result:
HDD total 386.94 GIB used 322.16 GIB (83.2%)

User avatar
siamhie
Global Moderator
Posts: 3793
Joined: Fri Aug 20, 2021 5:45 pm

Re: Conky hard disk info

#17 Post by siamhie »

Mjaakko wrote: Thu Sep 21, 2023 8:27 am
siamhie wrote: Mon Sep 18, 2023 6:52 pm @Mjaakko The link I posted (http://ifxgroup.net/conky.htm#fs_bar) has all the conky variables regarding hard drive information that can be shown.
I checked but only for mounted partitions. Usually, for everything need sudo such as sudo fdisk -l.

I use blkid to find out all partitions on my system (mounted or not). sudo not required.

I spent hours searching and experimenting to get rid of inxi generated triangle characters. Found the trick. With sed, copy specified selected alpha, numeric and character symbols. This excludes garbage characters when not specified.

Code: Select all

sed 's/[^a-z  A-Z 0-9 . % ( )]//g' file.txt
Trick when using FvwmConsole:

Code: Select all

Exec inxi -b > ~/.fvwm/core/7Modules/ConkyBtn/tmp.txt

Exec grep 'Storage' ~/.fvwm/core/7Modules/ConkyBtn/tmp.txt | \ 
   sed 's/[^a-z  A-Z 0-9 . % ( )]//g' | \
   sed 's/12//g' > ~/.fvwm/core/7Modules/ConkyBtn/hdd-storage.conf
Conky

Code: Select all

${execp cat ~/.fvwm/core/7Modules/ConkyBtn/hdd-storage.conf | sed 's/  Local Storage/HDD/'}
Result:
HDD total 386.94 GIB used 322.16 GIB (83.2%)

@Mjaakko Glad you found a way to get it working. Mark your post (that worked) solved (check mark icon) so that others may find it useful.
This is my Fluxbox . There are many others like it, but this one is mine. My Fluxbox is my best friend. It is my life.
I must master it as I must master my life. Without me, my Fluxbox is useless. Without my Fluxbox, I am useless.

User avatar
rasat
Posts: 653
Joined: Tue Dec 19, 2017 12:19 pm

Re: Conky hard disk info

#18 Post by rasat »

Thanks @Mjaakko you made it. I was following this topic with interest. Would be great to have one conky button in Fvwm. Here it is, embedded in one push button (FvwmButtons).

Image

Mjaakko
Posts: 34
Joined: Mon Jul 10, 2023 7:22 pm

Re: Conky hard disk info

#19 Post by Mjaakko »

One more question, @rasat how did you get the Battery bar and percentage? Looked at different places but there are too many options and configs.

User avatar
rasat
Posts: 653
Joined: Tue Dec 19, 2017 12:19 pm

Re: Conky hard disk info

#20 Post by rasat »

Here is the battery syntax.

Code: Select all

${color2}${color grey}Battery:  \
${if_existing /sys/class/power_supply/BAT0/status}${voffset 1}${color6}${battery_bar 6,80 BAT0}  ${voffset -1}${color3}${battery_percent BAT0}%${endif}\
${if_existing /sys/class/power_supply/BAT1/status}${voffset 1}${color6}${battery_bar 6,80 BAT1}  ${voffset -1}${color3}${battery_percent BAT1}%${endif}

Post Reply

Return to “Software / Configuration”