# How to download the  z/OS OneAgent diagnostics logs

**URL:** <https://community.dynatrace.com/t/how-to-download-the-z-os-oneagent-diagnostics-logs/36942>\
**Category:** Troubleshooting\
**Tags:** oneagent, mainframe, profiling-and-optimization\
**Created:** [October 19, 2022, 7:53am UTC](https://community.dynatrace.com/t/how-to-download-the-z-os-oneagent-diagnostics-logs/36942 "2022-10-19T07:53:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jellypuno](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/jellypuno/32/28559_2.png) [@jellypuno](https://community.dynatrace.com/u/jellypuno)\
**Post date:** [October 19, 2022, 7:53am UTC](https://community.dynatrace.com/t/how-to-download-the-z-os-oneagent-diagnostics-logs/36942/1 "2022-10-19T07:53:53Z")

</div>

Debugging and investigating the z/OS OneAgent takes time. And as a support engineer I need the OneAgent diagnostics before even starting the investigation.

So how can you help a support engineer, like me, to get the correct logs that I need for the investigation?

Here’s how:

The Dynatrace z/OS components has 3 main parts. (1) The zRemote, (2) The zLocal and (3) The zDC. All these 3 components work together and they affect each other. If the zRemote has a problem, there is a possibility that you can see the root cause of the problem in zDC/zLocal and vice versa. So the logs for these 3 components are very important.

How can you get it? There are 2 ways:

- The Manual Extraction

You can extract the logs manually in their default location _(This may depend on your configuration)_:

- **For Linux zRemote:** /var/lib/dynatrace/zremote/log
- **For Windows zRemote:** C:\ProgramData\dynatrace\zremote\log
- **zLocal and zDC logs are in the z/OS USS filesystem:** /sa/dt720/log

- Through the Dynatrace UI

You can run the OneAgent Diagnostics by going through the following steps:

- Go to the affected host (Hosts\> Click on affected host)
- Click on All Processes
- Click the OneAgent zDC. You will be re-directed to a different screen

 ![jellypuno_0-1666102203166.png](https://global.discourse-cdn.com/dynatrace/original/1X/d176d0f0c6f5e0e6af11807aee5d1c0b19015f71.png)

- Click on the 3 dots on the upper right
- Click Run OneAgent Diagnostics
- You can then start the collection of the logs by clicking Advance options \> Select 7 Days and Store Locally

 ![jellypuno_1-1666102377675.png](https://global.discourse-cdn.com/dynatrace/original/2X/d/d847d1a468be5da4ad2e392f55cf5975ac1e17ff.png)

Watch the full process:

![How to extract OA logs - no sound.gif](https://global.discourse-cdn.com/dynatrace/original/2X/e/eb76e45f13a63b721a5ffea83939449dd6eac64d.gif)

The zip file that you will collect contains logs from the zRemote, zDC and zLocal. Please attach it to your ticket and inform the support engineer. This will help them greatly.

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [January 10, 2023, 1:38pm UTC](https://community.dynatrace.com/t/how-to-download-the-z-os-oneagent-diagnostics-logs/36942/2 "2023-01-10T13:38:09Z")

</div>

Great Article&nbsp;[@jellypuno](https://community.dynatrace.com/user/50742). Getting this information ahead of the support ticket will only speed up the investigation and resolution. Thanks for sharing!
