I was runnig out ouf disk space -> searching for tint2 applet

Hi,

today I was running out of disk space. :woozy_face: I did not pay attention to my conkey infopanels. I think, the information is too small and I don’t want to add another conkey to my desktop.

What I am looking for is a possibility to see my free disk space in the tint2 panel. Has anyboy an idea how to show the used or free diskspace in tint2? If a warning comes when a specified limit is reached this would be perfect.

… I wouldn’t be surprised if the option is already there and I not able to find it.

Bernd…

There is no such thing built into tint2, but you can easily add an executor if you like, see sample executors:

doc/tint2.md · master · o9000 / tint2 · GitLab

In Mabox I use Conky: Mount points - it solves the problem perfectly for me.

Working on many remote systems, I also have a habit of checking disk usage frequently:

df -kh

In my experience, a full disk is the most common cause of problems on Linux systems - and the first thing to check when troubleshooting.

1 Like

Hi Bernd,

Search the forum for weather and you’ll find something I crafted up for Tint2 panel to show weather. If you create a small script with df -kh command inside (like napcok wrote), make it executable and put that into panel added (see weather script panel) it should show you the desired info.

Problem with df -kh it shows all, better use somthing like df -k /dev/sda1 | tail -1 | awk ‘{print $4}’ that give free space in MB’s.

NB. If you replace {print $4} with {print $5} it should show the free %.

1 Like

Maybe it’s worth adding something like this to Mabox by default? :thinking:

I am currently playing with the script:

#!/bin/bash

LIMIT=90
df -H |grep -v "boot" | grep -v "/dev/loop" | grep '^/dev' |awk ' { print $5 " " $1 }' | while read -r output;
do 
	usedspace=$(echo "$output" | awk '{ print $1 }' | cut -d'%' -f1 )
	partition=$(echo "$output" | awk '{ print $2 }' )
	if [ "$usedspace" -gt "$LIMIT" ]; then
	notify-send.sh -u critical -i mbcc "Almost out of disc space!" "\nRunning out of space: \n${partition} <b>${usedspace}%</b>"
	fi
done

Save it as check-disk-space in ~/bin/

And configure tint2 executor as below:

The executor is invisible - no reason to waste space on the panel.
Executes every 30 minutes (Interval = 1800).
And if the specified disk usage limit is exceeded ( > 90%)
shows notification.

2 Likes

The reason why I was running out of disk space has nothing to do with Linux. It is my fault. I test a lot of software. Sometimes I did not remove the installed packages or dependencies were not removed. And so the space of my HDD is decreasing.

This Executor work fine! Exactly what I was looking for. No waste of space in the panel and a message that I can not ignore.

Perfect! Thank you very much.

1 Like