mds and mds_stores constantly consuming cpu

The reason why your Spotlight is so active could be a number of things; it could be you have an app or multiple apps constantly changing some folder contents.

First let’s check whether Spotlight is the cause of the fans running so much. To test this, run the following in your terminal:

sudo mdutil -a -i off
this turns off indexing of files, and should result in a clear slow down of the fans if mds and/or mds_stores are to blame.

To turn indexing back on, run

sudo mdutil -a -i on
After this you could run the complete re-indexing of your hard drive (be aware this could be an over night job), it will delete your Spotlight data base forcing it to start over.

sudo rm -rf /.Spotlight-V100/*
The next and final step would be to add others to your (do not scan), privacy settings.

Ref:- https://apple.stackexchange.com/questions/144474/mds-and-mds-stores-constantly-consuming-cpu

Python Django Configuration Mac Terminal

After installing Python3

On Terminal ($) to check the version of python which is installed


$ Python -V
$ Python3 - V

To install pip


$ sudo easy_install pip

To install virtualenv try the code below


$ pip install virtualenv
# If the command returns permission error - try installing only for the #particular user -
pip install virtualenv --user

Setup virtual environment


python -m virtualenv venv

To activate virtual enviroment


source venv/bin.activate

Within the environment, install the Django package using pip. Installing Django allows us to create and run Django applications.

pip install Django

To check Django version after installation


django-admin --version

Django-admin is the command will allow to use all sort of things on Django


Django-admin

To create a Django project on the same directory use the command below. Note the ‘.’ too specify that to create the start project on the directory that we are in.


django-admin startproject trydjando .

To start the development server (which will start a development server at http://127.0.0.1:8000/


Python manage.py runserver

To kill the development server incase default port 8000 error

sudo fuser -k 8000/tcp. This should kill all the processes associated with port 8000.

For osx users you can use sudo lsof -t -i tcp:8000 | xargs kill -9

To link to database DATABASES on the settings.py file

Python manage.py migrate

To create a admin for the server (ex. default web portal http://127.0.0.1:8000/admin)


python manage.py createsuperuser

To change the password for the admin

python manage.py changepassword

Access External HD attached to Apple Extreme from anywhere using a SKY HUB

Assuming the Sky hub is up and running,

Step 1: Connect the Extreme (with HD attached) to Sky Hub using a Ethernet cable

Step 2: Open Airport Utility and complete the default setup for the Airport Extreme. (Create an existing connection and on the Network tab – Router Mode is Off(Bridge Mode)

Step 3: Go to the Sky Hub  settings(default :- 192.168.0.1).  Go  to Advanced (main tab)and Lan IP Setup (sub tab) (The default credentials for SKY hub is admin/sky – This link lists the  most common routers and their credentials http://www.kitz.co.uk/adsl/frogstats.php) – On the Address Reservation section add the Extreme. Find the Apple Extreme’s MAC Address and associate with an IP address.

Step 4:  Go to the sub tab WAN Setup on the Advanced tab again and provide the address of the Default DMZ server as the extreme’s IP address (completed in step 3)  This ensures that the direct point to contact from an external source will be the apple router after the Sky hub. This can be a computer as well if it is for other purposes such as remote connection.

Step 5: On the Sky hub settings go the Security (main tab) and then Services (sub tab)  and add an entry to the Services table section. For example for SAMBA share the port is 445. The complete list of TCP/UDP ports used by apple is here : https://support.apple.com/en-gb/HT202944

Now the share can be accessed from anywhere, by providing the public IP address (the one provided by ISP)  For example: smb://90.192.3.27.