How to check if a process is running under Rosetta with terminal

Viewed 5065

I know that one can use Activity Monitor to check if a process is running via Rosetta on Apple Silicon. I wonder if there is a way to do the same with the terminal?

Edit:

The process is some other application, so if there is a way to check if this process is running in Rosetta a possible command could maybe have the syntax:

$ is_running_under_rosetta <pid>

which would output

yes or no.

2 Answers

By using following command you can check if the process is running under Rosetta(1) or not(0, natively).

sysctl -n sysctl.proc_translated
Related