1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 <2024> 2025 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 <2024> 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: EPICS Archiver Appliance BPL- Changing storage intervals for PVs on an individual basis |
From: | "Shankar, Murali via Tech-talk" <tech-talk at aps.anl.gov> |
To: | "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov> |
Date: | Fri, 26 Jan 2024 02:55:15 +0000 |
Hi
Windsor,
Re:
I am interested in changing the storage profile (i.e. sts/mts/lts) for a specific single PV
I assume you want to do this after the PV has been added to the archiver. If so, modifyStoreURLForPV
is what I would use. Here's some python to do the same
import requests
import json
typeinfo = requests.get("http://localhost:17665/mgmt/bpl/getPVTypeInfo", params={"pv": "mshankar:arch:sine"}).json()
print(json.dumps(typeinfo["dataStores"], indent=4))
requests.get("http://localhost:17665/mgmt/bpl/pauseArchivingPV", params={"pv": "mshankar:arch:sine"})
requests.get("http://localhost:17665/mgmt/bpl/modifyStoreURLForPV", params={"pv": "mshankar:arch:sine", "storage":
"MTS", "plugin_url": "pb://localhost?name=MTS&rootFolder=${ARCHAPPL_MEDIUM_TERM_FOLDER}&partitionGranularity=PARTITION_DAY&hold=14&gather=7"})
typeinfo = requests.get("http://localhost:17665/mgmt/bpl/getPVTypeInfo", params={"pv": "mshankar:arch:sine"}).json()
print(json.dumps(typeinfo["dataStores"], indent=4))
requests.get("http://localhost:17665/mgmt/bpl/resumeArchivingPV", params={"pv": "mshankar:arch:sine"})
For more complex changes; there is the jackhammer BPL of /putPVTypeInfo but plz do be
careful when using this.
Changing the data store parameters in the typeinfo does not really modify the underlying
data for the PV; that is, if you want to change the partition granularity etc, you'll need to use consolidateDataForPV ( immediately after the
pauseArchivingPV )
to empty out the STS/MTS etc into the LTS and then make your changes. Hope that makes sense.
Please do reach out if you have more complex requirements.
Regards,
Murali
|