Quota Monitor Git
Brought to you by:
alavaliant
File | Date | Author | Commit |
---|---|---|---|
debian | 2019-04-17 |
![]() |
[ae9715] increase version to 2.5.2 |
images | 2013-09-22 |
![]() |
[2856f6] increase padding size on right and botton of ic... |
MANIFEST | 2013-09-29 |
![]() |
[19fbb1] update manifest file to include missing file |
README | 2017-05-20 |
![]() |
[b69d68] remove deprecated mysql type |
quota-monitor | 2024-01-21 |
![]() |
[74420b] fix a large number of lint warnings |
quota-monitor.desktop | 2010-09-09 |
![]() |
[a6e5a4] provide icon for desktop file, also install it ... |
setup.py | 2019-04-17 |
![]() |
[ae9715] increase version to 2.5.2 |
Quota Monitor is a linux python/gtk program designed to run in your system tray displaying a different colour icon depending on the amount of home directory quota in use. When the home directory quota is used up it displays warning dialog. The default configuration monitors the root filesystem (/) and the running user's homedir (~) To customise what is monitored you can create a configuration file called quota-monitor.conf in either the location quota-monitor is installed in, in /etc/quota-monitor/ and in your home directory in .config/quota-monitor (or if you have XDG_CONFIG_HOME set the path that it sets inside of .config) The format is like an ini file, for each path to be monitored start a section with a header consisting of the path or an environment variable that contains the location inside [] or a path with an environment variable in ${var} format inside the path e.g. [/] [$HOME] [/mnt/${var}] you can then specify details under the header type= This can be 'disk' to just monitor the free disk space 'quota' to monitor the remaining disk quota space (a check will be done for if a quota exists, if none is found it will revert to disk monitoring) customlabel= Show a custom string at the start of the main window listing of this filesystem instead of just the filesystem path. found= Option, if set to true will make quota monitor try to monitor the filesystem even if it can't detect it's existance at startup. Possibly usefuly if the filesystem isn't always present rawlocation= allows you to specify a base filesystem path incase there is something odd with your filesystem that stops quota-monitor detecting it properly manualquotafs= lets you set the exact name of the quota filesystem to be used, mainly useful for the http type value where the server returned information may not match what the local machine calls the server and file path. Takes the form of "server:path" totaloffset= takes a + or - value that will be added/subtracted from the detected max value for this monitored path. e.g. totaloffset=-1024 makes the total 1024 less than what is autodetected. disabletools= if set to true disables the launch du tool and cleanup wizard buttons for this location (useful if using the http option to monitor a remote filesystem) disabledtoolsmessage= if set for a filesystem with disabletools=true set on it the provided text will be shown in place of the disabled buttons. Message string accepts Pange Markup syntax unitoffset= takes a / or * value that the units for this path will be divided or multiplied by (for normalising values if one path is returning it's values in a different unit size than expected) criticalthreshhold= takes a numeric value which sets the percent of usage that will cause this quota/filesystem to have reached critical level redthreshhold= takes a numeric value which sets the percent of usage that will cause this quota/filesystem to have reached red level yellowthreshhold= takes a numeric value which sets the percent of usage that will cause this quota/filesystem to have reached yellow level ignoregracelimit= if set to True will make quota monitor ignore the non hard limit for the quota on that filesystem (useful if both hard and soft limits are set but unlimited gracetime is set making the soft limit have no impact) rawquotacommandfallback= (only has effect for http type) if set to True will make quota monitor fallback to using the quota command directly if the http rest data is outdated (older than 60seconds) and the quota usage is at dangerous levels. monitorxsessionerrors= (only really useful for http type) if set to True will make quota monitor tail the xsession-errors log file for the user watching for disk/quota space type error text, if such text is found a run of the quota command will be forced to check if the user has just hit their quota limit. (which may result in much faster displaying of problems when quota monitor is used with a http quota source that only updates it's information every few minutes) xsessionerrorslogpath= (only useful with monitorxsessionerrors option), sets the path of the .xsession-errors log file (for cases where it's been set to go to a custom filename or path) httpserverupdatesevery= (for use with http type), specifies the number of seconds between the server refreshing it's information. When set quota monitor won't reconnect to the server to try to get updated information until the time httpserverupdatesevery + lastupdated has been passed. Default value used if not set is 60 there are also two special headers you can set [FILEINCLUDE] and [FILEEXCLUDE] under each one you can set a series of values which adds extra expressions to the values used by the disk cleanup wizard as to what files can and cannot be safely deleted. e.g. [FILEINCLUDE] backup copy automatically generated by a text editor=.*~$ tmp file=.*\.tmp$ temp file=.*\.temp$ If a fileinclude regex includes ${STRING} STRING will be assumed to be referring to an environment variable and quota monitor will replace that part of the regex with the value of that environment variable when comparing to filenames. the 3rd special header is [GENERAL] which currently can have one options set under it of dutool which gives the path to the tool that can be run to show details of file usage in an area. If it is not set dutool defaults to looking for the tools kdirstat then k4dirstat if kdirstat isn't found. very advanced monitoring setup - there is a third option for type, 'http'. If that is to used you must alsa give a value for httpurl=http://server/path/to/http/rest/api/that/returns-a-json-object-like-below/${USERNAME} { servername : { volumename : { blocklimit : 0, blockused : 0, blocksoftlimit : 0, blockgrace : 0, lastupdated : 0, }, }, } all values are in 1kb block units except lastupdated and blockgrace which are a unix timestamps. In the httpurl value ${USERNAME} is replaced with the username of the user running quota-monitor. Multiple server and volume results can be returned from the same url (assuming whatever is written to serve the data can handle it). Writing something to harvest and return quota information over http is left up to you. Since methods for dumping out user quota information differ on all the big network file servers where this http method is of use, I can't really provide any universal code for it.