So is it even possible to use conky to generate output os swap file size and amount used? If it is then i am clearly doing it wrong. My conky line in question looks like this
${font OpenDyslexic:size=12}${voffset 0}${exec lsb_release -d | awk '{print $2" "$3}'} | Kernel: ${kernel} | Ram: ${mem}/${memmax} | Root: ${fs_used /}/${fs_size /} Swap: ${swap_used /}/${swap_size /} | Cpu: ${cpu cpu0}%
]]
and the output is shown in the pic. i tried to copy the root info format but that wasnt the way.
ok i got it. it's
${font OpenDyslexic:size=12}${voffset 0}${exec lsb_release -d | awk '{print $2" "$3}'} | Kernel: ${kernel} | Ram: ${mem}/${memmax} | Root: ${fs_used /}/${fs_size /} Swap: ${fs_used /swap}/${fs_size /swap} | Cpu: ${cpu cpu0}%
no that doesnt work either. i turned swap on and conky didnt update the swap info
sudo swapon
NAME TYPE SIZE USED PRIO
/dev/nvme0n1p5 partition 16G 0B -2
so i edited fstab to be sure i have it right and rebooted. inxi see it plainly enough. so clearly it can be read.
Swap:
ID-1: swap-1 type: partition size: 16 GiB used: 0 KiB (0.0%)
dev: /dev/nvme1n1p5
i think i've gotten closer to right?
${font OpenDyslexic:size=12}${voffset 0}${exec lsb_release -d | awk '{print $2" "$3}'} | Kernel: ${kernel} | Ram: ${mem}/${memmax} | Root: ${fs_used /}/${fs_size /} Swap: ${fs_used /dev/nvme1n1p5}/${fs_size /dev/nvme1n1p5} | Cpu: ${cpu cpu0}%
that's still not quite right but it seems a step closer? it's showing my swap size as 3.45gb when it should show as 16gb. inxi and gparted show it correctly. why can't i from conky? is it a root privilege issue? cant be or i wouldnt have a root file size reported in conky...
So from googleing it it seems i need the mount point for a partition for conky to read it and not a dev id i e i need /mount/swap or something like that is that right? but when i do a
mount | grep nvme1n1p5
nothing gets returned to me
according to conky.sourceforge.net these commands are relevant
fs_bar (height),(width) fs
Bar that shows how much space is used on a file system. height is the height in pixels. fs is any file on that file system.
fs_bar_free (height),(width) fs
Bar that shows how much space is free on a file system. height is the height in pixels. fs is any file on that file system.
fs_free (fs)
Free space on a file system available for users.
fs_free_perc (fs)
Free percentage of space on a file system available for users.
fs_size (fs)
File system size.
fs_type (fs)
File system type.
fs_used (fs)
File system used space.
fs_used_perc (fs)
Percent of file system used space.
so it looks like i'm doing part of it correctly. so it seems like i need the mount point for swap to to /swap in fstab for that to work but when i set it to /swap and reboot i get nothing reported by adjusating the path to the swap as /swap in conky. and i get some crazy output when i set it to /dev/nvme1n1p5 which is the dev path reported in inxi and gparted
$ swap Shows the amount of SWAP used
$ swapbar (Height, wide) It shows the use of the SWAP in the form of a bar. Height and width are the height and width of the bar in pixels.
$ swapgraph (height, width color1 color2) Show a graph with the use of SWAP. Height and width are the height and width of the graph in pixels. Color1 and color2 are the gradient colors that the graph will take, with color 1 being the most to the left and color 2 being the most to the right
$ swapmax Shows the amount of SWAP we have
$ swapperc Shows the percentage of SWAP used
guess i was overthinking it?
conky.text = [[
${font OpenDyslexic:size=12}${voffset 0}${exec lsb_release -d | awk '{print $2" "$3}'} | Kernel: ${kernel} | Ram: ${mem}/${memmax} | Root: ${fs_used /}/${fs_size /} Swap: $swap/$swapmax | Cpu: ${cpu cpu0}%
]]
there's 3 hrs of my life i wont get back..lol
tada!
(thanks for playing)