Notes on Ubuntu (Linux) computing

Brief notes on installation, setup and other tasks in the Ubuntu world

Posts Tagged ‘mercurial

Install psutil from google repository

with 3 comments

In order to do some profiling of Python scripts (memory profile, in particular) I am installing psutil and memory_profiler. A nice overview of profiling, both time and memory, can be found here.

To start, we install psutil. First, clone the repository using mercurial (make sure to execute the following in sensible place):

hg clone

Next, cd into the new directory and install:

cd psutil
sudo python install

Finally, start Python and try the following commands:

import psutil
print psutil.cpu_times()
print psutil.virtual_memory()

These commands should provide information you would normally obtain using the top command. Check the website for further examples.


Written by Chris S

December 30, 2013 at 9:52 pm

Posted in Python

Tagged with , ,

Install mercurial

with 2 comments

Mercurial is another version control system. A version is in the repository, so installation is easy:

sudo apt-get install mercurial

Once installed, you can check the version using:

hg --version

Written by Chris S

October 8, 2012 at 8:51 pm