{"id":1550,"date":"2026-08-04T15:05:35","date_gmt":"2026-08-04T14:05:35","guid":{"rendered":"https:\/\/ri.itservices.manchester.ac.uk\/csf4\/?page_id=1550"},"modified":"2026-08-04T15:24:54","modified_gmt":"2026-08-04T14:24:54","slug":"disk-usage-analysis","status":"publish","type":"page","link":"https:\/\/ri.itservices.manchester.ac.uk\/csf4\/filesystems\/disk-usage-analysis\/","title":{"rendered":"Disk usage analysis"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>This page describes methods to analyse your usage of storage like home, scratch, RDS, etc.<\/p>\n<h2>scrusage<\/h2>\n<p>You can use the utility <strong><code>scrusage<\/code><\/strong> to quickly get an overview of your scratch directory in CSF4.<\/p>\n<pre>\r\n$ scrusage\r\nYour scratch usage: 13.7GB, 233845 files\r\n<\/pre>\n<h2>Fast and detailed interactive disk usage scanning<\/h2>\n<h3>Running the scan<\/h3>\n<p>You can scan your home directory, scratch directory and any other place like and RDS share (where you have at least <strong>Read<\/strong> access) using this method interactively. This method is quick and you can look through the sub-directories and find what is consuming most of your space.<\/p>\n<pre class='slurm'>\r\n# First start an <a href=\"https:\/\/ri.itservices.manchester.ac.uk\/csf4\/batch\/srun\/\" target=\"_blank\">interactive job\/session<\/a>\r\nsrun -p multicore -n 8 --pty bash\r\n\r\n# Load the ncdu module which will do the scanning\r\nmodule purge\r\nmodule load ncdu\/2.9.1\r\n\r\n# cd to the directory which you want to scan\r\ncd\r\n#or\r\ncd ~\/scratch\/\r\n\r\n# Start the scanning\r\nncdu -t $SLURM_NTASKS -r\r\n\r\n<\/pre>\n<h3>Viewing and navigating the results<\/h3>\n<h4>Scanning<\/h4>\n<p>When scanning of your chose directory is in progress, you will see this:<br \/>\n<img decoding=\"async\" src=\"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-content\/uploads\/usage.png\" alt=\"\" width=\"880\" class=\"alignnone size-full wp-image-12552\" \/><br \/>\nLet the scanning complete.<\/p>\n<h4>Scan result<\/h4>\n<p>When the scan is completed, you will be presented with the scan results which will look like this:<br \/>\nSub-directories are listed in the descending order of usage. Usage of each sub-directory is also shown.<br \/>\n<img decoding=\"async\" src=\"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-content\/uploads\/usage1.png\" alt=\"\" width=\"880\" class=\"alignnone size-full wp-image-12552\" \/><br \/>\nAt the very bottom left corner you will see the <strong>Total disk usage<\/strong> of the directory you have scanned. It is <strong>1.1TB<\/strong> in the above example.<br \/>\nFar right to it is the total number of files and folders in the scanned directory where it says <strong>Items<\/strong>.<\/p>\n<h4>Navigating<\/h4>\n<p>You can navigate to sub-directories by using <strong>arrow keys<\/strong> and then hitting <strong>enter<\/strong>. In this example using <strong>down arrows key<\/strong>, we have scrolled down and selected\/highlighted the <code>.conda<\/code> sub-directory:<br \/>\n<img decoding=\"async\" src=\"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-content\/uploads\/usage2.png\" alt=\"\" width=\"880\" class=\"alignnone size-full wp-image-12552\" \/><br \/>\nWith the <code>.conda<\/code> sub-directory selected\/highlighted, when you hit <strong>enter<\/strong>, you will be presented with the usage of the .conda sub-directory:<br \/>\n<img decoding=\"async\" src=\"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-content\/uploads\/usage3.png\" alt=\"\" width=\"880\" class=\"alignnone size-full wp-image-12552\" \/><br \/>\nTo go back to previous\/upper-level directory, navigate to the item <strong><code>\/..<\/code><\/strong> and hit <strong>enter<\/strong>.<\/p>\n<h4>Quitting<\/h4>\n<p>Press <strong><code>q<\/code><\/strong> to quit <strong>ncdu<\/strong>.<br \/>\nType <strong><code>exit<\/code><\/strong> and hit <strong>enter<\/strong> to exit the interactive job\/session.<\/p>\n<p><strong>TIP<\/strong>: If you have lots of files and folders in the directory that you are scanning, select more number of cores for your interactive job (e.g. <strong>-n 16<\/strong>). More number of cores means faster scanning. 8-Core is good for few hundred GB.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction This page describes methods to analyse your usage of storage like home, scratch, RDS, etc. scrusage You can use the utility scrusage to quickly get an overview of your scratch directory in CSF4. $ scrusage Your scratch usage: 13.7GB, 233845 files Fast and detailed interactive disk usage scanning Running the scan You can scan your home directory, scratch directory and any other place like and RDS share (where you have at least Read access).. <a href=\"https:\/\/ri.itservices.manchester.ac.uk\/csf4\/filesystems\/disk-usage-analysis\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":14,"featured_media":0,"parent":25,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1550","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf4\/wp-json\/wp\/v2\/pages\/1550","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf4\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf4\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf4\/wp-json\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf4\/wp-json\/wp\/v2\/comments?post=1550"}],"version-history":[{"count":3,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf4\/wp-json\/wp\/v2\/pages\/1550\/revisions"}],"predecessor-version":[{"id":1555,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf4\/wp-json\/wp\/v2\/pages\/1550\/revisions\/1555"}],"up":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf4\/wp-json\/wp\/v2\/pages\/25"}],"wp:attachment":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf4\/wp-json\/wp\/v2\/media?parent=1550"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}