Thank you for taking time out to help me with this. Hey, maybe I am doing something wrong cause I am just getting the printout for the:
# isi sync target list -v
Its not providing any additional information in reference to disk usage on each filesystem. I am not sure if its because the script is broken up and I did not assemble it properly in a one liner? I ran it like this:
as peter said, you can access it through P-API. There are some ways to directly access the database but I would not recommend that, since upgrades brick the accessmethod regularly :P
You also won’t see any trends with du -hxcd1.
I suggest you to try to define what you want to achieve – maybe someone already faced this and can tell you a stable way to reach your aim.
I agree your not going to get trending from running du once, but if a daily du is achievable on a cluster then you can see those report over a period of time and establish a trend.
Peter_Sero
6 Operator
•
1169 Posts
1485
0
Posted August 16th, 2017 08:00
Thanks for the feedback! I think you got the quote marks right by copy-pasting.
Had to add another line to match a newer output format:
isi sync target list -v |
awk -F": " '
{ print $0; }
/^Target Dir:/ { printf "du: "; system("du -hxd1 \""$2"\""); }
/^ *Target Path:/ { printf " du: "; system("du -hxd1 \""$2"\""); }
'
The script simple adds a line tagged with "du:" after the Target Path line.
The path is repeated within the output from the du command.
sample output:
Name: TEST
Source: isi810
Target Path: /ifs/data/target 1
du: 2.5K /ifs/data/target 1
Last Job State: finished
FOFB State: writes_disabled
Source Cluster GUID: 000c2982a34602941c59a81c747b2bfa5644
Last Source Coordinator IP: 127.0.0.1
Legacy Policy: No
Last Update: 2017-08-16T11:22:16
(Note: the example target path contains a space in "target 1" to show that spaces in paths are handled correctly.
That's what those multiple quote marks are for...)
If even different output formats are found, please post a sample.
Cheers
-- Peter