Skip to content

Commit 4504ad0

Browse files
Add ps output to show_tech.py
Summary: # Description Adding the output of `ps w` to meru and fbdarwin show_tech.py in order to capture the running processes for use in troubleshooting the system state. X-link: https://github.com/facebookexternal/openbmc.arista/pull/422 Test Plan: Ran the new show_tech.py and verified the ps output exists. Ran the CIT tests. ## meru ``` root@bmc:~# show_tech.py | grep -A 20 "CURRENTLY" ##### CURRENTLY RUNNING PROCESSES ##### ps w PID USER VSZ STAT COMMAND 1 root 12104 S {systemd} /init 2 root 0 SW [kthreadd] 3 root 0 SW [pool_workqueue_] 4 root 0 IW< [kworker/R-rcu_g] 5 root 0 IW< [kworker/R-rcu_p] 6 root 0 IW< [kworker/R-slub_] 7 root 0 IW [kworker/0:0-eve] 8 root 0 IW< [kworker/0:0H-ev] 9 root 0 IW [kworker/0:1-mm_] 10 root 0 IW [kworker/u4:0] 11 root 0 IW< [kworker/R-mm_pe] 12 root 0 IW [rcu_tasks_rude_] 13 root 0 IW [rcu_tasks_trace] 14 root 0 SW [ksoftirqd/0] 15 root 0 IW [rcu_sched] 16 root 0 SW [migration/0] 17 root 0 SW [cpuhp/0] 18 root 0 SW [cpuhp/1] ``` ``` root@bmc:~# python3 /usr/local/bin/tests2/cit_runner.py --platform meru ... ---------------------------------------------------------------------- Ran 15 tests in 172.478s OK ``` ## fbdarwin ``` root@bmc:~# show_tech.py | grep -A 20 "CURRENTLY" ##### CURRENTLY RUNNING PROCESSES ##### ps w PID USER VSZ STAT COMMAND 1 root 11972 S {systemd} /init 2 root 0 SW [kthreadd] 3 root 0 SW [pool_workqueue_] 4 root 0 IW< [kworker/R-rcu_g] 5 root 0 IW< [kworker/R-rcu_p] 6 root 0 IW< [kworker/R-slub_] 7 root 0 IW [kworker/0:0-pm] 8 root 0 IW< [kworker/0:0H-ev] 9 root 0 IW [kworker/0:1-eve] 10 root 0 IW [kworker/u4:0] 11 root 0 IW< [kworker/R-mm_pe] 12 root 0 IW [rcu_tasks_rude_] 13 root 0 IW [rcu_tasks_trace] 14 root 0 SW [ksoftirqd/0] 15 root 0 IW [rcu_sched] 16 root 0 SW [migration/0] 17 root 0 SW [cpuhp/0] 18 root 0 SW [cpuhp/1] ``` ``` root@bmc:~# python3 /usr/local/bin/tests2/cit_runner.py --platform fbdarwin ... ---------------------------------------------------------------------- Ran 22 tests in 147.338s OK (skipped=3) ``` Reviewed By: somasun Differential Revision: D80857201 Pulled By: joancaneus fbshipit-source-id: 6ae0af7af3e9649fc8eb453da22e4fe882baa333
1 parent b4e1161 commit 4504ad0

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

meta-facebook/meta-fbdarwin/recipes-utils/show-tech/files/show_tech.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,12 @@ def gpioDump():
151151
)
152152
)
153153

154+
def psOutput():
155+
print(
156+
"##### CURRENTLY RUNNING PROCESSES #####\n{}".format(
157+
runCmd("ps w", echo=True, verbose=True)
158+
)
159+
)
154160

155161
def showtech(quietLevel=0):
156162
verbose = not bool(quietLevel)
@@ -180,7 +186,7 @@ def showtech(quietLevel=0):
180186
i2cDetectDump()
181187
gpioDump()
182188
logDump()
183-
189+
psOutput()
184190

185191
def parseArgs():
186192
parser = argparse.ArgumentParser(

meta-facebook/meta-meru/recipes-utils/show-tech/files/show_tech.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,12 @@ def gpioDump():
162162
)
163163
)
164164

165+
def psOutput():
166+
print(
167+
"##### CURRENTLY RUNNING PROCESSES #####\n{}".format(
168+
runCmd("ps w", echo=True, verbose=True)
169+
)
170+
)
165171

166172
def showtech(quietLevel=0):
167173
verbose = not bool(quietLevel)
@@ -205,7 +211,7 @@ def showtech(quietLevel=0):
205211
i2cDetectDump()
206212
gpioDump()
207213
logDump()
208-
214+
psOutput()
209215

210216
def parseArgs():
211217
parser = argparse.ArgumentParser(

0 commit comments

Comments
 (0)