find out if it is32 or 64 bit process
Hi everyone,
Using Debian Squeeze amd64. How can I find out, from running process, which ones are 32 bit, and which ones are 64 bits? |
I'm not sure what exceptional cases might exist where this doesn't work. I also don't know if I'm ignoring some easier or more reliable method (I know several harder methods). But what I have is:
Code:
file -L /proc/pid/exe |
Thanks! It worked fine on Debian.
It should be easier, like a column in 'top' :P |
Hi all! Is there any other way to get it programmatically, like a special flag somewhere in /proc/<pid>/, etc.??
edit: OK, I have ended up parsing process executable (/proc/<pid>/exe or /proc/<pid>/cmdline) the 5th byte in ELF header can be 1 if compiled as 32 bit or 2 for 64 |
All times are GMT -5. The time now is 02:41 PM. |