hdd quota control through webmin – GUI – Linux – Ubuntu

Dear All,

Here I documented about how to control/set the hard disk / home space quota to each users, groups through webmin gui.

You may get so many documents on how to do the same in command line itself.

Here we go !!!

1. Enable quota check on filesystem

First, you should specify which filesystem are allowed for quota check.

Modify the /etc/fstab, and add the keyword usrquota and grpquota to the corresponding filesystem that you would like to monitor.

The following example indicates that both user and group quota check is enabled on /home filesystem

# vim /etc/fstab
UUID=4ea80ca3-37b7-447e-831a-700a38627029 /home ext4 defaults,usrquota,grpquota 1 2 

or

 /dev/hda1 /home ext4 defaults,usrquota,grpquota 1 2

Reboot the server after the above change. While rebooting it will take some time (only one time) to enable usrquota, grpquota on the /home filesystem. So wait.

2. Initial quota check on Linux filesystem using quotacheck

Once you’ve enabled disk quota check on the filesystem, collect all quota information initially as shown below. For that you may need to install the following packages.

# apt-get install quota quotatool
# quotacheck -avug 
quotacheck: Scanning /dev/sda3 [/home] done 
quotacheck: Checked 5182 directories and 31566 files 
quotacheck: Old file not found. 
quotacheck: Old file not found.

In the above command:

  • a: Check all quota-enabled filesystem
  • v: Verbose mode
  • u: Check for user disk quota
  • g: Check for group disk quota

The above command will create a aquota file for user and group under the filesystem directory as shown below.

# ls /home/ 
aquota.user aquota.group
# quotaon -avug

3. Install webmin gui to control hdd quota for the users & groups

First install the dependencies as shown below

# apt-get install apt-show-versions

For Ubuntu 12.04 you can download the webmin deb file from the below link


http://sourceforge.net/projects/webadmin/files/webmin/1.620/webmin_1.620_all.deb/download

and install as follows

# dpkg -i webmin_1.620_all.deb

Once you installed you can access the webmin in your browser at either
https://localhost:10000/
or it will give you hostname as like below.


https://arulalan:10000/

You can download other os distro binary and source files from the below link.


http://sourceforge.net/projects/webadmin/files/webmin/

4. Open webmin gui

now log into webmin & search ‘quota’ you should see a result called “Disk Quotas”

click on it and press enable quotas on /home

now u can create/set hdd quotas like soft, hart limits & grace time for each users, groups…

Soft limit : Actual size that you are allocating to the user/group
Grace time : Some grace period (seconds to days) you are allocating to allow the user to exceed the soft limit (upto grace period) but not hard limit.
Once they exceed the soft limit, then they have to revert back to less than their soft limit size within the allocated grace time period.
Hard limit : Hard limit that you are allocating to the user/group for the max size they can use at any most case. They can not exceed this limit at any time.

5. Notify the used home size & quota status report to the user when they login into the shell/terminal

Finally :-

add the below lines in the

# vim /etc/bash.bashrc

to show the users quota information with their limit & used space whenever they login to the shell/terminal.

echo "Your home directory quota information "
quota -us $USER
echo "Try to keep space < quota. You cant exceed the limit "

Have Fun !

Posted in Documentation, Linux, Ubuntu, Uncategorized, Web | Tagged , , , , , , , | Leave a comment

2012 in review

The WordPress.com stats helper monkeys prepared a 2012 annual report for this blog.

Here’s an excerpt:

4,329 films were submitted to the 2012 Cannes Film Festival. This blog had 18,000 views in 2012. If each view were a film, this blog would power 4 Film Festivals

Click here to see the complete report.

I couldn’t post my thoughts & codes in the past 6 months. :( .

I learned many new subjects in M.Tech Atmospheric Sciences.

Let me post those stuff in following days.

Happy new year to all. :-)

Regards,

Arulalan.T

Posted in Arulalan | Leave a comment

2011 in review

The WordPress.com stats helper monkeys prepared a 2011 annual report for this blog.

Here’s an excerpt:

The concert hall at the Syndey Opera House holds 2,700 people. This blog was viewed about 30,000 times in 2011. If it were a concert at Sydney Opera House, it would take about 11 sold-out performances for that many people to see it.

Click here to see the complete report.

Posted in Uncategorized | Leave a comment

About MetPy (ECMWF)

Dear Friends,

I have read about the MetPy from the ECMWF
http://www.ecmwf.int/
.

MetPy = Meteorological Python

Few words about ECMWF :

They are using

  • Perl language to created web application to serve the auto generated plots for both intranet & internet (in the above link)
  • Python language to do diagnostics
  • Magics or MetView to do plot
  • Serving around 24,000 images per day

Few words about MetPy :

A high level library called MetPy is being

developed. It currently offers:

  • an abstract definition of meteorological data and fields,
  • GRIB decoding, coding and field computation,
  • Field sorting and indexing,
  • ODB access using its NetCDF file export facility,
  • core score computing (rmse, ancf, stddev, mean), on a weighed grid and limited areas,
  • access to Verify scores (backwards compatibility) ,
  • interface with Magics,
  • interface with PCMS,
  • everything available in open source.

Example Program of MetPy usage :

>>> from MetPy import *

>>> an = FieldSet( ‘an.grib’ )
>>> fc = FieldSet( ‘fc.grib’ )
>>> cl = FieldSet( ‘climatology.grib’ )
>>> bi = FieldSet( ‘biases.grib’ )

>>> scores = Scores( fc-cl+bi,
an-cl,
area = verify_config[ 'europe' ] )

>>> print scores.correlation( )

>>> print scores.rmse( )

Few Application of MetPy :

  • Currently a typical experiment diagnostics is being written on ocean data.
  • compare ocean observation profiles with experiment fields and generate statistics.

MetPy Utilities :

  • The Date class is a primordial building block as computations on dates are always needed particularly in diagnostics & verification.
  • Configuration tools are also important, once your library can read configuration files with sufficient flexibility, you can introduce parametrisation from the begin-ning of any new development.

MetPy Source Link :


https://github.com/pmarshwx/MetPy

Presentation Link :
It contains about ECMWF & little core about MetPy


http://www.ecmwf.int/newsevents/meetings/workshops/2003/9th_Meteorological_Operational_Systems/presentations/Gibert.pdf


http://synopticview.co.uk/WhitePapers/metpy/

Conclusion :

  • MetPy Meteo France also installed & running the MetPy.
  • MetPy module has Fields, FieldSet, Ensemble, FieldIndex, Diagnostics.

I couldnt understand few meteorological terms in the MetPy. So I couldnt realize the more power of it.

What I understood from the example is metpy can calculate Scores, correlation, rmse & etc.,

I will post the CDAT Vs MetPy in upcoming posts in my blog.

Thanks.

Arulalan.T

Posted in Uncategorized | Leave a comment

Installing Sphinx inside the UV-CDAT (alpha)

Dear All,

I have face a problem that I can not install sphinx inside uv-cdat (alpha) python path.

Also I can not use easy_install of uv-cdat python, since it has some zlib library missing.

I hope uv-cdat team will fix all these issues soon.

Mean while we should learn how to use sphinx for our uv-cdat python modules.

Once we installed the sphinx correctly inside our system python,
then do the following steps.

* we can not install sphinx successfully inside the uv-cdat due to zlib version problem of uv-cdat.

Here is short route to work out the sphinx for uv-cdat modules….

Below is uv-cdat installed path in my machine.

*******************************************************

sys.path.append(‘/opt/uv-cdat/bin/’)
sys.path.append(‘/opt/uv-cdat/lib/python2.7/site-packages’)

*******************************************************

Add the above two sys.path.append lines in the following three system executable python scripts.

$ sudo gedit /usr/local/bin/sphinx-quickstart

$ sudo gedit /usr/local/bin/sphinx-autogen

$ sudo gedit /usr/local/bin/sphinx-build

Thats it.

Here after from the normal system executables sphinx-quickstart, sphinx-autogen, sphinx-build we can generate the sphinx index.html
of our uv-cdat (diagnosis) py modules.

We have to understand that we didnt installed sphinx inside the uv-cdat python path.

We just added the uv-cdat packages path into the system python path, while the above three executables running.

Enjoy.

By,

Arulalan.T
Dated : 13.12.2011

Posted in Uncategorized | Leave a comment

Setting Auto Completion in Python Shell

Dear Friends,

Today I found very useful tips from the CDAT document page about how to make auto completion in python shell.

#!/usr/bin/env python
import rlcompleter
import readline
readline.parse_and_bind(&quot;tab: complete&quot;)

Save the above code as .auto_completion_python_shell.py inyour home directory of your home directory in *nix system.

Then open the .bashrc by

$ gedit .bashrc

add the following line at the end of the file.

export PYTHONSTARTUP="$HOME/.auto_complete_python_shell.py"

Save the file and close it. Close the terminal.

Now reopen the terminal, issue the command python

>>> im[tab] [tab]
it should automatically complete the import command.

It also displays the available methods, and variables of any object in the shell prompt.

Of-course it will not be fashion as "bpython" and "ipython"

But in some situations, python shell is best compare to bpython when we accessing large set of data.

In some cases bpython ncurses fails to handle large set of data…

Those cases we can apply our own PYTHONSTARTUP script to make it as auto complete commands…

Note : This auto completion will works only under shell, not under $python -i some_script.py (not under interactive script shell).

Cheers!

Arulalan.T

Posted in Uncategorized | Tagged , , , , , | Leave a comment

SFD 2011 Stalls Suggestions

Dear All,

I hope the SFD 2011 preparation is going on.

Here I narrated the list of stalls which will be helpful to the public and students.

If you are newbie to sfd and have interest to put stalls,

then the following list may gives you an idea about it.

There are two ways to put stall. 1. Easy way, 2. Medium way.

Easy way not even takes more than one hour to prepare to make stall.

How it means, if you know some thing / already used some tools means,
you can make stall by showing slide show / live demo.

Medium way means, it needs 2 or 3 people to be combined, need to spend few days
to execution it and need some more hardware resources.

Easy Way :
************
SFD goal is reach the foss to the public and students.
So first of all showcase them about what they already know in their M$ os for daily usage.

  1. What is FOSS/ GNU License,
  2. OO / Libre Office Word, Spread Sheet, Presentation, Drawing
  3. GIMP
  4. Inkscape
  5. Languages Introductions (including installation steps in the slides)
  1. Gcc, G++
  2. Ruby, JRuby
  3. Python, Jython, Cython
  4. Php,
  5. Perl,
  6. Bash,
  7. Java (Explain about how to setup/install java. Most of newbies dont know about this)
  8. more

6. Language Frameworks Introductions

  1. RoR,
  2. Django,
  3. Catelist,
  4. more

7. Data Bases with GUIs and Shell

  1. MySql,
  2. Postgres,
  3. Sqlite3
  4. Mongo DB
  5. DBase

8. DB Connections from languages

  1. phpMyadmin (GUI)
  2. DB connections Python, Ruby, Perl, Php scripts

9.CMS (Content Management Systems)

  1. Drupal
  2. Joomla
  3. WordPress

10. Editors

  1. gedit with its plugins for developers
  1. Auto word completion
  2. Showing in side panel of Python Syntax Error and disobeying PEP8 rules (from ubuntu 11.04)
  3. Snippet
  4. Other languages advantages in gedit
  5. more

2.VIM

  1. Intro
  2. Its advantage over languages

3.emacs

  1. Intro

11.Version Controls (both gui & commands)

  1. Subversion (bleeding edge)
  2. Git
  3. Bazzar
  4. Mercurial
  5. more (show demos by make live changes in images (gimp), audio/video partial edited files and make changes in text files)

12.Audio Players

  1. MPlayer,
  2. VLC,
  3. Amarok

13.Video Players Audio & Video editing tools

  1. Audacity
  2. Pitivi

14. 3D Compiz effects live demo and its videos

15. OS Distributions (ubuntu, fedora, centOs, debian, BSD, etc)

16. KDE environments and its tools

17. Gnome environments and its tools

18. Live CD Live Installation (or slide)

19. Famous FOSS Tools Like

  1. K3b (Dvd/cd writer) and more

20. Games

  1. 2D games for kids
  2. 3D games like
  1. Open Arena
  2. Alien Arena
  3. more [1]

21. Education Tools

  1. Physics & Electronics Simulations
  1. gnusim8085
  2. circuits connections simulation (search in net)
  3. more

2.Chemistry Simulations (search in net)

3.Biology more(Last time Jaya College students showed demo of all these edu tools)

22. FireFox Addons Demo (If wifi/Internet dongle available)

  1. FireBug
  2. Download Helpers
  3. Live download by firefox addons (in simple way)
  4. Twitter connections/post from firefox
  5. WordPress posts from firefox
  6. more

23. Tamil in ubuntu / fedora

  1. Full ubuntu environment in tamil
  2. Tamil Key board layouts (both tamil unicode and symphony[english to tamil] type writer)
  3. more

All the above are very basics only. Where ever I mentioned “more”, you can get it more ideas by searching in Internet.

and if you want to know about available specific tools means (for eg education tools, physics, chemistry, etc) I suggest
you to open the Ubuntu Software Centre or synaptic package manager.

You will get more detailed info about available packages/software tools.

[1]
http://www.online-game-walkthrough.com/2007/12/top-10-free-linux-3d-games.html

Medium Way :

****************

  1. Multiple Desktops (Single CPU, multi monitors, multi keyboards, multi mouse)
  2. Thin Client Demo
  3. Heart Beats Demo
  1. MySql heart beat
  2. more

Big Blue Button (Lan audio/video/text chat & remote presentation) VLC (Video Lan Connection demo by making lan video streaming)

Arduino Robotics Demo Blender (3D animation maker) more
You can bring your project (if that has done by foss ) and you make stall.

If you want to make stall in sfd means, please mail to list or the MIT students to allot stall for you.

Previous years SFD links :
******************************

SFD by ILUGC


http://www.ilugc.in/search/node/sfd


http://www.ilugc.in/content/sfd-2009-ilugc-recap


http://www.ilugc.in/content/sfd-2009-topics-and-volunteers


http://www.ilugc.in/content/software-freedom-day-ilugc


http://www.ilugc.in/content/sfd-2009-photos


http://www.ilugc.in/content/announcing-sofware-freedom-day-celebrations-ilugc


http://www.ilugc.in/content/call-volunteers-demo-stalls-software-freedom-day-2011


http://wiki.ilugc.in/index.php?title=Sfd2011

SFD by Jaya Engg College :

http://www.ilugc.in/content/software-freedom-day-celebraions-jaya-engg-college

SFD by Kanchilug :


http://kanchilug.wordpress.com/2009/09/21/software-freedom-day-2009/


http://kanchilug.wordpress.com/2010/09/21/software-freedom-day/


http://kanchilug.wordpress.com/?s=sfd

From the above links, you can collect the details like,
how to prepare for SFD stalls and how to organize it.

I hope this helps you to make stalls in SFD ’11.
If you have any ideas to make SFD’11 as grand event, you are welcome to share it.

If you have any idea to put stalls in ILUGC SFD’11, please add your stall details in the ilugc wiki page here.


http://wiki.ilugc.in/index.php?title=Sfd2011

Thanks,

Arulalan.T

Posted in Ideas, Linux | Tagged , , , | Leave a comment

Pytest Documentation: Unit test framework in Python

Dear All,

Here I documented about

  • An introduction to unit test in Python
  • How to use PyTest framework in python to test your py code

To download the above pdf document click on it.

Thanks.

Arulalan.T

Posted in Arulalan, CDAT, Documentation, IIT D, Python | Tagged , , , , , , | Leave a comment

Pygrib Installation & Usage Documentation

Dear All,

Here I documented from where to download the pygrib , how to install it inside our cdat path in ubuntu and how to use it with examples.

 

To download the above pdf document click on it.

Thanks.

Posted in Arulalan, CDAT, Documentation, IIT D, Python | Tagged , , , , , | Leave a comment