<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://t2bwiki.iihe.ac.be/index.php?action=history&amp;feed=atom&amp;title=FindSizeOnDcache</id>
	<title>FindSizeOnDcache - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://t2bwiki.iihe.ac.be/index.php?action=history&amp;feed=atom&amp;title=FindSizeOnDcache"/>
	<link rel="alternate" type="text/html" href="https://t2bwiki.iihe.ac.be/index.php?title=FindSizeOnDcache&amp;action=history"/>
	<updated>2026-05-16T11:26:54Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://t2bwiki.iihe.ac.be/index.php?title=FindSizeOnDcache&amp;diff=97&amp;oldid=prev</id>
		<title>Maintenance script: Created page with &quot; == How to find the size of a directory on dcache ==  As a simple du does not work on our system (files larger than 2GB are reported as having a size=1), we need to query th...&quot;</title>
		<link rel="alternate" type="text/html" href="https://t2bwiki.iihe.ac.be/index.php?title=FindSizeOnDcache&amp;diff=97&amp;oldid=prev"/>
		<updated>2015-08-26T12:28:30Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; == How to find the size of a directory on dcache ==  As a simple du does not work on our system (files larger than 2GB are reported as having a size=1), we need to query th...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
== How to find the size of a directory on dcache ==&lt;br /&gt;
&lt;br /&gt;
As a simple du does not work on our system (files larger than 2GB are reported as having a size=1), we need to query the database directly. On our system we have 2 options for this.&lt;br /&gt;
&lt;br /&gt;
=== direct query on the database ===&lt;br /&gt;
&lt;br /&gt;
First, go to the dcache admin interface and find the pnfsid of the directory you want to test&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd PnfsManager&lt;br /&gt;
pnfsidof &amp;lt;directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This gives you &amp;lt;pnfsid&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /pnfs/fs/usr&lt;br /&gt;
 . /usr/etc/pnfsSetup&lt;br /&gt;
export PATH=$PATH:/opt/pnfs/tools&lt;br /&gt;
&lt;br /&gt;
pnfsDump -r &amp;lt;pnfsid&amp;gt;   -o simple /tmp/files-diff.txt&lt;br /&gt;
awk &amp;#039;/File/ {print $5}&amp;#039; /tmp/files-diff.txt | tr -d &amp;#039;(&amp;#039; | tr -d &amp;#039;)&amp;#039; &amp;gt; /tmp/file.sizes.txt&lt;br /&gt;
awk &amp;#039;{sum +=$0} END {print sum}&amp;#039; /tmp/file.sizes.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This procedure gives the total size in bytes.&lt;br /&gt;
&lt;br /&gt;
=== Automated script ===&lt;br /&gt;
&lt;br /&gt;
on maite:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /root/damadori/final&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
adapt the file quota.cfg in order to have the correct directory and run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./script.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The results are displayed on http://maite.iihe.ac.be:2288/quota &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note that both procedures can take up quite some time to finish&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{TracNotice|{{PAGENAME}}}}&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>