Tags:
dcache
1
view all tags
<!-- 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 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') ORDER BY isize DESC; </pre> -- Main.DanielMeister - 2012-12-19 ---------------- %ICON{arrowleft}% Go to [[CMSTier3Log34][previous page]] / [[CMSTier3Log36][next page]] of Tier3 site log %M%
Edit
|
Attach
|
Watch
|
P
rint version
|
H
istory
:
r4
<
r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r1 - 2012-12-19
-
DanielMeister
CmsTier3
Log In
CmsTier3 Web
Create New Topic
Index
Search
Changes
Notifications
Statistics
Preferences
User Pages
Main Page
Policies
Monitoring Storage Space
Monitoring Slurm Usage
Physics Groups
Steering Board Meetings
Admin Pages
AdminArea
Cluster Specs
Home
Site map
CmsTier3 web
LCGTier2 web
PhaseC web
Main web
Sandbox web
TWiki web
CmsTier3 Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
P
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
Account
Log In
Edit
Attach
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