Skip to content

Commit 3b6ff8e

Browse files
maryamtahhanclaude
andcommitted
fix: fetch vLLM logs and system metrics to local results in auto playbook
The llm-benchmark-auto playbook was collecting vLLM container logs and system metrics on the DUT but never fetching them back to the controller. This resulted in only benchmark results appearing in the local results directory. Added fetch tasks to retrieve vLLM server logs and system metrics alongside benchmark results. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: Maryam Tahhan <mtahhan@redhat.com>
1 parent 1e9ef96 commit 3b6ff8e

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

automation/test-execution/ansible/llm-benchmark-auto.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,12 @@
266266

267267
tasks:
268268
- block:
269+
- name: Ensure log directory exists on DUT
270+
ansible.builtin.file:
271+
path: "{{ log_dir }}"
272+
state: directory
273+
mode: "0755"
274+
269275
- name: Get vLLM container logs
270276
ansible.builtin.command:
271277
cmd: "podman logs {{ vllm_container_name }}"
@@ -277,6 +283,32 @@
277283
content: "{{ vllm_logs.stdout }}"
278284
dest: "{{ log_dir }}/vllm-{{ core_configuration.name }}-{{ test_run_id }}.log"
279285

286+
- name: Collect system metrics snapshot
287+
ansible.builtin.shell: |
288+
echo "=== CPU Info ===" > {{ log_dir }}/system-metrics-{{ test_run_id }}.log
289+
lscpu >> {{ log_dir }}/system-metrics-{{ test_run_id }}.log
290+
echo "" >> {{ log_dir }}/system-metrics-{{ test_run_id }}.log
291+
echo "=== Memory Usage ===" >> {{ log_dir }}/system-metrics-{{ test_run_id }}.log
292+
free -h >> {{ log_dir }}/system-metrics-{{ test_run_id }}.log
293+
echo "" >> {{ log_dir }}/system-metrics-{{ test_run_id }}.log
294+
echo "=== Container Stats ===" >> {{ log_dir }}/system-metrics-{{ test_run_id }}.log
295+
podman stats --no-stream {{ vllm_container_name }} >> {{ log_dir }}/system-metrics-{{ test_run_id }}.log 2>&1 || true
296+
args:
297+
executable: /bin/bash
298+
changed_when: false
299+
300+
- name: Fetch vLLM logs to local results
301+
ansible.builtin.fetch:
302+
src: "{{ log_dir }}/vllm-{{ core_configuration.name }}-{{ test_run_id }}.log"
303+
dest: "{{ playbook_dir }}/../../../results/llm/{{ test_model | replace('/', '__') }}/{{ workload_type }}-{{ test_run_id }}/vllm-server.log"
304+
flat: true
305+
306+
- name: Fetch system metrics to local results
307+
ansible.builtin.fetch:
308+
src: "{{ log_dir }}/system-metrics-{{ test_run_id }}.log"
309+
dest: "{{ playbook_dir }}/../../../results/llm/{{ test_model | replace('/', '__') }}/{{ workload_type }}-{{ test_run_id }}/system-metrics.log"
310+
flat: true
311+
280312
when: hostvars['localhost']['vllm_mode'] | default('managed') == 'managed'
281313
# ==============================================================================
282314
# STEP 8: Optional Cleanup (Managed Mode Only)

0 commit comments

Comments
 (0)