ECS: JCASScript kullanarak zamana bağlı sorgu gerçekleştirme

Summary: JCASScript kullanarak zamana bağlı sorgu gerçekleştirme.

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Instructions

JCASScript, zamana bağlı bir sorgu çalıştırır ve bu zaman aralığında yazılan klipleri oluşturur.
Bu sorguyu çalıştırmak için ilgili PEA dosyasına ihtiyacımız olacaktır. ECS ile ilgili şu KB makalesine bakın: JCASScript.jar  kullanarak ECS de temel CAS API işlemleri gerçekleştirmekova sahibini ve ilgili PEA dosyasını nasıl alacağınızı bulmak için.
Dell Destek ekibi, ECS kullanıcı arayüzüne kök erişimimiz yoksa kullanıcıdan ilgili PEA dosyasını sağlamasını ister.

Bir ECS düğümünden JCASScript kullanma:

  • Herhangi bir düğümde yönetici kullanıcı olarak oturum açın ve object-main kapsayıcısına girin.
admin@ecsnode1:~>  sudo dockobj
  • Castools dizinine geçin.
ecsnode1:/ # cd /opt/storageos/tools/castools
  • PEA dosyanızı oluşturun:
ecsnode1:/opt/storageos/tools/castools # vi icoe_cas.pea
ecsnode1:/opt/storageos/tools/castools # cat icoe_cas.pea
<pea version="1.0.0">
<defaultkey name="icoe_cas_obusr">
<credential id="csp1.secret" enc="base64">UmJaVGNsb1Z1M0hxaHVDN3ZXTmE=</credential>
</defaultkey>
<key type="cluster" id="23a0767d-d6e7-3f41-bc1d-89d139549fe2" name="icoe_cas_obusr">
<credential id="csp1.secret" enc="base64">UmJaVGNsb1Z1M0hxaHVDN3ZXTmE=</credential>
</key>
</pea>
ecsnode1:/opt/storageos/tools/castools #
  • Kastabureleri "$LD_LIBRARY_PATH":
ecsnode1:/opt/storageos/tools/castools # export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/storageos/tools/castools/
  • CAS bağlantı noktasını (3218) dinleyen IP adreslerini alın:
ecsnode1:/opt/storageos/tools/castools # sudo ss -nap | grep :3218 | grep LISTEN | grep -oP "(?:[0-9]{1,3}\.){3}[0-9]{1,3}"
  • Başlat »JCASScript.jar" etkileşimli CLI:
ecsnode1:/opt/storageos/tools/castools # java -jar JCASScript.jar

CASScript>
  • Havuza bağlanın:
# poolOpen <ipaddress>?<path to pea file>
Aşağıdaki örnekte, localhost kullanarak yukarıdaki adımda döndürülen veri IP'sini kullanabiliriz.
For example:
CASScript>po localhost?icoe_cas.pea

Attempting to connect to: localhost?icoe_cas.pea

Connected to: localhost?icoe_cas.pea

CASPool Properties:
         Connection String:                 localhost?icoe_cas.pea
         Cluster Time:                      2020.07.30 02:06:39 GMT
         Buffer Size:                       16384
         Prefetch Buffer Size:              32768
         Connection Timeout:                120000
         Multi-Cluster Failover Enabled:    True
         Collision Avoidance Enabled:       False

CASScript>
  • Zamana bağlı bir sorgu başlatmak için bir alt sınır ve bir üst sınır ayarlamamız gerekir.
    querySetLower Sınırı Sorgu ifadesinin başlangıç tarihini ayarlar. Başlangıç tarihi, sorgu ifadesinin alt sınırını temsil eder.

    Sözdizimi: querySetLower Bound startDate

    querySetUpper Bound Sorgu ifadesinin bitiş tarihini ayarlar. Bitiş tarihi, Sözdizimi sorgu ifadesinin

    üst sınırını temsil eder: querySetUpper Bound endTime
For example:

CASScript>querySetLowerBound "2020.07.29 00:00:00"

Query Expression Properties:
        Start Time: 2020.07.29 00:00:00
        End Time  : UNBOUNDED
        Type      : EXISTING

CASScript>querySetUpperBound  "2020.07.30 14:00:00"

Query Expression Properties:
        Start Time: 2020.07.29 00:00:00
        End Time  : 2020.07.30 14:00:00
        Type      : EXISTING
  • Sorguyu çalıştırın ve klipleri bir dosyaya kaydedin.
queryToFile(qtf) Sorgu İfadesi nesnesine dayalı olarak kümeyi sorgular ve C-Clip kimliklerini belirtilen dosyada saklar. İsteğe bağlı olarak döndürülecek maksimum C-Clip ID sayısını ayarlayabiliriz.

Sözdizimi: qtf clips
For example: 

CASScript>qtf cliplist_30Jul2020

Performing clip query

Query Expression Properties:
        Start Time: 2020.07.29 00:00:00
        End Time  : 2020.07.30 14:00:00
        Type      : EXISTING


Number of clips returned:     50
All results returned:         True
Query results written to:     cliplist_30Jul2020


CASScript>
  • İade edilecek yalnızca belirli sayıda klip alın ve ardından aşağıdaki seçeneği kullanın
Sözdizimi: queryToFile fileName maxClipIDsToReturn
For example:

CASScript>qtf cliplist_30Jul2020_limited 25

Performing clip query

Query Expression Properties:
        Start Time: 2020.07.29 00:00:00
        End Time  : 2020.07.30 14:00:00"querySetUpperBound "2020.07.30 14:00:00
        Type      : EXISTING


Number of clips returned:     25
All results returned:         False
Point of incompletion:        2020.07.30 01:20:45 GMT
Query results written to:     cliplist_30Jul2020_limited

CASScript>
  • Döndürülen klip sayısını doğrulayın.
Exit from JCASScript

CASScript>exit

ecsnode1:/opt/storageos/tools/castools # wc -l cliplist_30Jul2020_limited
25 cliplist_30Jul2020_limited
ecsnode1:/opt/storageos/tools/castools #

ecsnode1:/opt/storageos/tools/castools # wc -l cliplist_30Jul2020
50 cliplist_30Jul2020
ecsnode1:/opt/storageos/tools/castools #

Additional Information

Affected Products

Elastic Cloud Storage

Products

ECS Appliance Hardware Series, ECS Appliance Software with Encryption, ECS Appliance Software without Encryption, Elastic Cloud Storage
Article Properties
Article Number: 000020612
Article Type: How To
Last Modified: 27 Aug 2025
Version:  5
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.