# Collect clock dumps using the ADB shell

Source: [https://docs.qualcomm.com/doc/80-88500-3/topic/107_Collect_clock_dumps_using_the_adb_shell.html](https://docs.qualcomm.com/doc/80-88500-3/topic/107_Collect_clock_dumps_using_the_adb_shell.html)

1. Connect the USB.
2. Run the following command.

        adb shell
        mount -t debugfs none /sys/kernel/debug sleep 5 && while true;
        do echo \=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=
        \=\=\=\=\=\=\=\=\=\=\=\=\=\=\=; cat /proc/uptime;
        cd /sys/kernel/debug/clk; for i in *;
        do if [ -d $i ];
        then if [ -e $i/clk_measure ];
        then echo $i \=\> measure:`cat $i/clk_measure`; else echo $i \=\> rate:`cat $i/clk_rate`;
        fi; fi; done;
        echo \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
        \-\-\-\-\-\-\-\-\-\-\-\-\-;
        cd /sys/class/regulator; for i in *; do if [ -d $i ];
        then if [ -e $i/state ];
        then if [ "$(cat $i/state)" == "enabled" ]; then if [ -e $i/microvolts ];
        then echo $i \=\> name:`cat $i/name` state:`cat $i/state` microvolt:`cat
        $i/microvolts`;
        else echo $i \=\> name:`cat $i/name` state:`cat $i/state` microvolt: N\/A; fi; fi; fi; fi; done;
        sleep 3;
        done > /data/dumpclk.txt &
        Copy to clipboard
3. Unplug the USB when the PID appears.
4. Connect the USB and kill the clock checking PID by typing the following commands.
5. Run the test scenario. Execute test scenario for at least 2 min.

        adb shell ps | grep [PID] adb shell "kill [PID]"
        adb pull /data/dumpclk.txt
        Copy to clipboard

**Parent Topic:** [Collect clock dumps](https://docs.qualcomm.com/doc/80-88500-3/topic/105_Collect_clock_dumps_.html)

Last Published: Sep 26, 2023

[Previous Topic
Collect clock dumps using JTAG](https://docs.qualcomm.com/bundle/publicresource/80-88500-3/topics/106_Collect_clock_dumps_using_JTAG.md) [Next Topic
Collect core dumps](https://docs.qualcomm.com/bundle/publicresource/80-88500-3/topics/108_Collect_core_dumps_.md)