LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-24-2006, 05:47 AM   #1
BroX
Member
 
Registered: Oct 2003
Location: Sweden
Distribution: Slackware64-current, SlackwareARM-15.0
Posts: 833

Rep: Reputation: 90
Monitor disk space without gkrellm


Hi all,

Currently I am running gkrellm for the sole reason to monitor disk space. When a partition reaches 95% full the pc will be halted to prevent data loss.

I'd like to get rid of gkrellm, but want to keep monitoring disk space. Is there an elegant way to do this? Maybe through conky (fork of torsmo)? Surprisingly google nor LQ came up with anything.

Cheers, Leon.
 
Old 02-24-2006, 07:06 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You could have a cron job check for the space left periodically.
percentleft=$(df / | tail -n 1 | tr -s ' '| cut -d' ' -f5)
if [ ${percentleft%\%} -lt 5 ]; then shutdown -s 500 -h +5 'Disk space critical'; fi

Using quotas may be a more elequent way to handle this.

Last edited by jschiwal; 02-24-2006 at 07:16 AM.
 
Old 02-24-2006, 09:08 AM   #3
BroX
Member
 
Registered: Oct 2003
Location: Sweden
Distribution: Slackware64-current, SlackwareARM-15.0
Posts: 833

Original Poster
Rep: Reputation: 90
Thanks, but what I had in mind was more a kind of real-time monitoring. So that it will notice a near-full partition when copying large amount of files, or ripping a DVD.

Cheers, Leon.
 
Old 02-24-2006, 03:21 PM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
I believe that using quotas you could have a soft limit and a hard limit. On the softlimit you are warned immediately and on a hard limit, you aren't allowed to continue (save the file).

This may work better if you are on a system with several users.

You might read through the ulimit man page. In any case I think that a warning, perhaps using xwindow, would be better than a shutdown.

A program that would do this, ( perhaps there are some ), may get the info from the kernel and run as a service. There may be a kernel feature for this. You could try googling for terms like "disk limit kernel alarm". You could also look at the source for gkrellm and gut it out, removing the display code and retaining the monitoring and action parts of the code.

Someone else on this site probably knows of the perfect program for you!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
monitoring disk activity in GKrellM ScottReed Linux - Software 1 02-04-2006 04:18 PM
3Gb of disk space lost! Disk space problem or mother board conflicts with HDD Mistreated Linux - Hardware 4 12-06-2004 03:58 PM
any other hw monitor besides gkrellm? spyghost Linux - Software 1 11-01-2003 06:58 AM
X not using fully using available monitor space Raptor Ramjet Slackware 7 08-17-2003 11:35 AM
Disk space wastage 73 GB Hard disk rajgopalhg Linux - Hardware 2 10-18-2002 03:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration