<!-- keep this as a security measure: #uncomment if the subject should only be modifiable by the listed groups * Set ALLOWTOPICCHANGE = Main.TWikiAdminGroup,Main.CMSAdminGroup * Set ALLOWTOPICRENAME = Main.TWikiAdminGroup,Main.CMSAdminGroup #uncomment this if you want the page only be viewable by the listed groups # * Set ALLOWTOPICVIEW = Main.TWikiAdminGroup,Main.CMSAdminGroup --> %TOC% %ICON{arrowleft}% Go to [[CMSTier3Log34][previous page]] / [[CMSTier3Log36][next page]] of Tier3 site log %M% ---+ 19. 12. 2012 Largest directories via Chimera ---++ New version Simply consult the daily report: * http://t3mon.psi.ch/ganglia/PSIT3-custom/v_pnfs_top_dirs.txt * http://t3mon.psi.ch/ganglia/PSIT3-custom/v_pnfs_top_dirs.html ---++ Outdated since May 2014 Based on Fabio's monitoring function the following function & query can be used to extract the largest folders in a given PNFS directory similar to the previous space usage reporting. <pre> CREATE OR REPLACE FUNCTION pnfs_subdirs_du_r(VARCHAR,VARCHAR,INTEGER) RETURNS SETOF v_pnfs AS $$ DECLARE fileordir1 v_pnfs%rowtype; fileordir2 v_pnfs%rowtype; RESULT BIGINT; BEGIN FOR fileordir1 IN ( SELECT * FROM pnfs_dir($1) WHERE path LIKE '/'||$1||'/%' AND depth < $3 ) loop fileordir2 = fileordir1; SELECT INTO RESULT * FROM pnfs_dir_du( SUBSTRING ( fileordir1.path , 2 , LENGTH(fileordir1.path)) , $2) ; fileordir2.isize = RESULT; fileordir2.depth = fileordir2.depth + 1; RETURN NEXT fileordir2; END loop; END; $$ LANGUAGE plpgsql STABLE; </pre> Then use the following query to get all folders below a given folder (up to depth D) ordered in decreasing order by size: *Don't use that query on very large folders with many subfolders!* <pre> SELECT * FROM pnfs_subdirs_du_r('pnfs/psi.ch/cms/trivcat/store/user/dmeister','MB',D) WHERE isize IS NOT NULL ORDER BY isize DESC LIMIT 100; </pre> Of course there would be much more efficient methods to do this; but it works! -- Main.DanielMeister - 2012-12-19 ---------------- %ICON{arrowleft}% Go to [[CMSTier3Log34][previous page]] / [[CMSTier3Log36][next page]] of Tier3 site log %M%
This topic: CmsTier3
>
WebHome
>
CMSTier3Log
>
CMSTier3Log35
Topic revision: r4 - 2014-05-13 - FabioMartinelli
Copyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback