rudisdotnet Kanashimi ikari chikara ni kaete




command line

While it is easy to use Activity Monitor to see whether a running app is 32-bit or 64-bit (sample), it would be even more useful to see this information from the command-line. This post shows you how to combine a bit of rudimentary Python code and correct ps command-line options to see the "bitness" of your running apps.

Executing ps in Terminal.app will show you processes that you own and adding some command-line options: ps -Al, you can get tons of information about each process. In this case, I've asked the ps command to show me all processes and include a decent number of output fields, including one we now really care about, the "flags" field (sample output). "Flags" will end in a "4" (sample Terminal output) if the app is 64-bit, otherwise it ends with a zero.

By saving this script:

as something like "psbit.py" and executing it from the command line with either "32" or "64" as a parameter (it defaults to 64), you will see a list of apps with path names that meet the opted criteria.

When I run it, my system shows 24 active 32-bit processes out of 81 total processes. Good progress, but I shall not rest until I see it be all 64-bit!  Continue reading »



Syndicate

Syndicate content