<div dir="ltr">Since I'm pretty proud of my awk one-liner, and maybe it's useful for this kind of charging, here's how to sum up how much data each user has in the filesystem (without regards to if the data blocks are offline, online, replicated or compressed):<div><br></div><div># cat full-file-list.policy</div><div><div>RULE EXTERNAL LIST 'files' EXEC ''</div><div><br></div><div>RULE LIST 'files'</div><div>     SHOW( VARCHAR(USER_ID) || ' ' ||</div><div>          VARCHAR(GROUP_ID) || ' ' ||</div><div>          VARCHAR(FILESET_NAME) || ' ' ||</div><div>           VARCHAR(FILE_SIZE) || ' ' ||</div><div>           VARCHAR(KB_ALLOCATED) )</div></div><div><br></div><div># mmapplypolicy gpfs0 -P /gpfs/gpfsmgt/etc/full-file-list.policy -I defer -f /tmp/full-file-list</div><div># awk '{a[$4] += $7} END{ print "# UID\t Bytes" ; for (i in a) print i, "\t", a[i]}' /tmp/full-file-list.list.files</div><div><br></div><div>Takes ~15 minutes to run on a 60 million file filesystem.</div><div><br></div><div><br></div><div>  -jf</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 3, 2018 at 11:43 AM, Sobey, Richard A <span dir="ltr"><<a href="mailto:r.sobey@imperial.ac.uk" target="_blank">r.sobey@imperial.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-GB" link="#0563C1" vlink="#954F72">
<div class="m_3158692028178835453WordSection1">
<p class="MsoNormal">Hi all,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I’d be interested to talk to anyone that is using HSM to move data to tape, (and stubbing the file(s)) specifically any strategies you’ve employed to figure out how to charge your customers (where you do charge anyway) based on usage.
<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">On-list or off is fine with me.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks<span class="HOEnZb"><font color="#888888"><u></u><u></u></font></span></p><span class="HOEnZb"><font color="#888888">
<p class="MsoNormal">Richard<u></u><u></u></p>
</font></span></div>
</div>

<br>______________________________<wbr>_________________<br>
gpfsug-discuss mailing list<br>
gpfsug-discuss at <a href="http://spectrumscale.org" rel="noreferrer" target="_blank">spectrumscale.org</a><br>
<a href="http://gpfsug.org/mailman/listinfo/gpfsug-discuss" rel="noreferrer" target="_blank">http://gpfsug.org/mailman/<wbr>listinfo/gpfsug-discuss</a><br>
<br></blockquote></div><br></div>