Retrieving Watson Speech services log files
You can retrieve the log files for the Speech services to check the services' status. You can send the files to IBM Support to help diagnose problems.
To package and send log files to IBM Support, compress your logs into a .zip
file and send the compressed files to IBM®
Support.
- Permissions you need for these tasks:
- You must have login credentials for the cluster.
Log retrieval topics
For more information about retrieving log files, see the following topics:
Retrieving logs for pods
To retrieve the log file for a pod, use the following steps:
Log in to the Red Hat® OpenShift® cluster:
oc login OpenShift_URL:port
To learn what pods are available, enter the following command. In the command,
${PROJECT_CPD_INSTANCE}
is the name of the project (namespace) for your deployment.oc get pods -l 'app.kubernetes.io/name \ in (speech-to-text,text-to-speech,ibm-rabbitmq,ibm-minio)' \ --namespace ${PROJECT_CPD_INSTANCE}
The command produces output like the abbreviated example that follows. The output depends on the Speech services and other microservices that you are running and on the size and scale of your installation. You use the pod names from the first column of the output as input to the commands in the following steps. A status of
Running
indicates an active long-running process; a status ofCompleted
indicates a task-based process that has finished.NAME READY STATUS RESTARTS AGE speech-cr-cert-gen-slr9t 0/1 Completed 0 4d23h speech-cr-gdpr-data-deletion-c467dc65d-4drqz 1/1 Running 0 4d23h speech-cr-stt-models-d951-253b-nlqpz 0/4 Completed 0 4d23h speech-cr-stt-am-patcher-688c68dd5c-vvfw6 2/2 Running 0 3d6h speech-cr-stt-async-596d76d864-vs4sj 1/1 Running 0 3d6h speech-cr-stt-customization-548dbb84dd-9lnc7 1/1 Running 0 4d23h speech-cr-stt-cr-gw-instance-586cb84f77-6v75b 1/1 Running 0 4d23h speech-cr-stt-runtime-85957944ff-wrzl4 2/2 Running 0 3d6h speech-cr-tts-voices-38cb-5f5d-vrlk4 0/4 Completed 0 4d23h speech-cr-tts-customization-6cdb7d88fc-jcbgr 1/1 Running 0 4d23h speech-cr-tts-runtime-858bd6f96f-g7dcw 2/2 Running 0 3d6h speech-cr-tts-cr-gw-instance-5c4d66cf99-bq5g7 1/1 Running 0 4d23h speech-pro-b4d0-ib-12ce-0 1/1 Running 0 5d speech-pro-b4d0-ib-12ce-1 1/1 Running 0 5d speech-pro-b4d0-ib-12ce-2 1/1 Running 0 5d speech-cr-ibm-minio-0 1/1 Running 0 5d speech-cr-ibm-minio-1 1/1 Running 0 5d speech-cr-ibm-minio-2 1/1 Running 0 5d speech-cr-postgres-1-initdb-tkzcl 0/1 Completed 0 5d speech-cr-postgres-2-join-kvhcc 0/1 Completed 0 5d speech-cr-postgres-3-join-6l4nb 0/1 Completed 0 5d speech-cr>-postgres-1 1/1 Running 0 5d speech-cr-postgres-2 1/1 Running 0 5d speech-cr-postgres-3 1/1 Running 0 5d
To retrieve the log for a microservice of your installation, enter the following command. The command redirects the output to a file that has the same name as the pod with a
.log
extension.oc logs pod-name --namespace ${PROJECT_CPD_INSTANCE} > pod-name.log
where
- pod-name
- The name of the pod whose log file you want to retrieve.
${PROJECT_CPD_INSTANCE}
- The name of the project (namespace) for your deployment.
Some pods might be running multiple containers (for example,
stt-runtime
). In that case, the output from the previous command also includes the container name. You can enter the following command to retrieve the logs for each container. The command redirects the output to a file that has the name of both the pod and the container with a.log
extension.oc logs pod-name -c container-name --namespace ${PROJECT_CPD_INSTANCE} \ > pod-name_container-name.log
where
- pod-name
- The name of the pod whose log file you want to retrieve.
- container-name
- The name of a container for the specified pod.
${PROJECT_CPD_INSTANCE}
- The name of the project (namespace) for your deployment.
Retrieving logs for runtime containers
Runtime containers perform the actual operations of the Watson Speech services. The log files for a container are collected inside of the container's file system. To retrieve the log for a runtime container, use the following steps:
Log in to the Red Hat OpenShift cluster:
oc login OpenShift_URL:port
Make sure the runtime pods are in the running state by entering the following command. In the command,
${PROJECT_CPD_INSTANCE}
is the name of the project (namespace) for your deployment.oc get pods -l 'app.kubernetes.io/component \ in (tts-runtime,stt-runtime)' --namespace ${PROJECT_CPD_INSTANCE}
Enter the following command to create an output directory named
exported_logs
for the collected log files:mkdir exported_logs
Enter the following commands to retrieve the logs for a runtime pod. Repeat the commands once for each runtime pod. The command creates a tar file for the logs of each pod that has the name of the pod followed by the string
_logs
. It writes each tar file to theexported_logs
directory.oc exec -ti pod-name --namespace ${PROJECT_CPD_INSTANCE} \ -- tar zcf pod-name_logs.tgz logs/
oc cp pod-name:pod-name_logs.tgz exported_logs/pod-name_logs.tgz \ --namespace ${PROJECT_CPD_INSTANCE}
where
- pod-name
- The name of a runtime pod whose log files you want to retrieve.
${PROJECT_CPD_INSTANCE}
- The name of the project (namespace) for your deployment.
Retrieving logs for the Watson Speech operator
The Watson Speech operator orchestrates the activities of the Speech services in your cluster. The operator runs a pod in a namespace that is largely separate from the namespace for the Speech services. To retrieve the log file for the operator, use the following steps:
Log in to the Red Hat OpenShift cluster:
oc login OpenShift_URL:port
Learn the name of the pod for the operator. In the command,
${PROJECT_CPD_OPS}
is the name of the project (namespace) in which the Watson Speech operator is deployed.oc get pods -l app.kubernetes.io/name=watson-speech --namespace ${PROJECT_CPD_OPS}
The operator might have multiple pods. To retrieve the operator's log for a pod, enter the following command. The command redirects the output to a log file that has the same name as the pod with a
.log
extension.oc logs pod-name --namespace ${PROJECT_CPD_OPS} > pod-name.log
where
- pod-name
- The name of the pod whose log file you want to retrieve.
${PROJECT_CPD_OPS}
- The name of the project (namespace) in which the Watson Speech operator is deployed.