Fork me on GitHub

Command Line Examples To Monitor Processes

In this section, we will see how to monitor the active content export or import processes.

List Processes

To list all the content export or import processes, run the following:

$ curl -i -u admin:admin http://localhost:8080/cms/ws/exim/ps

          
HTTP/1.1 200 
Date: Wed, 21 Feb 2018 02:25:03 GMT
Content-Type: text/plain
Content-Length: 153

     UID   PID             TTY    STIME     TIME %PRGR CMD
   admin     1       127.0.0.1 20:06:41 00:00:02 0.21  POST /cms/ws/exim/import?tag=foo
   admin     2       127.0.0.1 20:06:42 00:00:01 0.17  POST /cms/ws/exim/export?tag=bar
          

Show the Details of Single Process

To see the details of a single content export or import process, run the following:

$ curl -i -u admin:admin http://localhost:8080/cms/ws/exim/ps/1

          
HTTP/1.1 200 
Date: Wed, 21 Feb 2018 02:28:02 GMT
Content-Type: multipart/mixed; boundary="uuid:aea91404-d48b-4203-8432-bda7d3a921f5"
Transfer-Encoding: chunked


--uuid:aea91404-d48b-4203-8432-bda7d3a921f5
Content-Type: application/json
Content-Transfer-Encoding: binary
Content-ID: <params>

{
  "batchSize" : 200,
  "throttle" : 10,
  "publishOnImport" : "none",
  "dataUrlSizeThreshold" : 262144,
  "binaries" : {
    "queries" : [ ],
    "paths" : [ ],
    "includes" : [ "/content/gallery/contenteximdemo/**" ],
    "excludes" : [ "/content/gallery/contenteximdemo/samples/**" ]
  },
  "documents" : {
    "queries" : [ ],
    "paths" : [ ],
    "includes" : [ "/content/documents/contenteximdemo/**" ],
    "excludes" : [ "/content/documents/contenteximdemo/news/**" ]
  },
  "docbasePropNames" : null,
  "documentTags" : null,
  "binaryTags" : null,
  "galleryFolderPrimaryType" : "hippogallery:stdImageGallery",
  "galleryFolderFolderTypes" : [ "new-image-folder" ],
  "galleryFolderGalleryTypes" : [ "hippogallery:imageset" ],
  "assetFolderPrimaryType" : "hippogallery:stdAssetGallery",
  "assetFolderFolderTypes" : [ "new-file-folder" ],
  "assetFolderGalleryTypes" : [ "hippogallery:exampleAssetSet" ]
}
--uuid:aea91404-d48b-4203-8432-bda7d3a921f5
Content-Type: text/plain
Content-Transfer-Encoding: binary
Content-ID: <status>

     UID   PID             TTY    STIME     TIME %PRGR CMD
   admin     1       127.0.0.1 02:27:02 00:00:33 1.00  POST /cms/ws/exim/import


--uuid:aea91404-d48b-4203-8432-bda7d3a921f5--
          

You can see the execution log file content by executing the following:

$ curl -i -u admin:admin http://localhost:8080/cms/ws/exim/ps/1/logs
...
          
HTTP/1.1 200 
Date: Fri, 21 Feb 2018 02:26:02 GMT
Content-Type: text/plain
Content-Length: 0

INFO 2018-02-21 02:25:01,452 ContentEximService#importContentFromZip begins with /usr/local/tomcat/temp/_exim_5203172107687682282.zip
...