Skip to content

Commit

Permalink
test for script
Browse files Browse the repository at this point in the history
  • Loading branch information
Ishaan-Datta committed Sep 1, 2024
1 parent 76cc0f9 commit 2dff8ae
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
6 changes: 1 addition & 5 deletions Experiments/Python POCs/benchmarking.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,14 @@
while jetson.ok() and count < args.duration * 60:
cpu_usage = 100 - jetson.cpu['total']['idle']
memory_usage = (jetson.memory['RAM']['used'] / jetson.memory['RAM']['tot']) * 100
# gpu_usage = jetson.gpu[305987]['status']['load'] # number or string?
# gpu_usage = jetson.gpu['gpu']['load']

gpu_usage = jetson.gpu['gpu']['status']['load']
cpu_temp = jetson.temperature['cpu']['temp']
gpu_temp = jetson.temperature['gpu']['temp']
gpu_mem = int(str(jetson.memory['RAM']['shared'])[:3])
system_voltage = jetson.power['tot']['volt']
system_current = jetson.power['tot']['curr']
system_power = jetson.power['tot']['power']

gpu_usage = jetson.gpu['GPU']['status']['load']

if args.verbose:
print(f"CPU Usage: {cpu_usage:.1f}%")
print(f"Memory Usage: {memory_usage:.1f}%")
Expand Down
22 changes: 15 additions & 7 deletions Experiments/Python POCs/key_iter.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,26 @@
# read aggregate CPU status
total = jetson.cpu['total']
print("------ TOTAL ------")

for key, value in total.items():
print("{key}: {value}".format(key=key, value=value))

for idx, cpu in enumerate(jetson.gpu['gpu']):
print("bruh bruh bruh bruh bruh this is cpu")
print(jetson.gpu['gpu']['status']['load'])
print(jetson.temperature['cpu']['temp'])
print("this is gpu")
print(jetson.temperature['gpu']['temp'])

for idx, gpu in enumerate(jetson.gpu['gpu']):
print("------ GPU{idx} ------".format(idx=idx))
for key, value in cpu.items():
print("{key}: {value}".format(key=key, value=value))
# read aggregate CPU status
total = jetson.gpu['total']
print("------ TOTAL ------")
for key, value in total.items():
print(repr(gpu))

for key, value in (jetson.gpu['gpu']).items():
print("{key}: {value}".format(key=key, value=value))

print(jetson.temperature)

# read aggregate CPU status

for idx, cpu in enumerate(jetson.temperature):
print("------ CPU{idx} ------".format(idx=idx))
Expand Down

0 comments on commit 2dff8ae

Please sign in to comment.