# How to get System Type (64-bit or 32-bit) in Ignition?

**URL:** <https://forum.inductiveautomation.com/t/how-to-get-system-type-64-bit-or-32-bit-in-ignition/9856>\
**Category:** Ignition\
**Created:** [March 30, 2015, 9:50am UTC](https://forum.inductiveautomation.com/t/how-to-get-system-type-64-bit-or-32-bit-in-ignition/9856 "2015-03-30T09:50:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![skallepalli](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@skallepalli](https://forum.inductiveautomation.com/u/skallepalli)\
**Post date:** [March 30, 2015, 9:50am UTC](https://forum.inductiveautomation.com/t/how-to-get-system-type-64-bit-or-32-bit-in-ignition/9856/1 "2015-03-30T09:50:19Z")

</div>

Hi All,

Is there a way to get Client System Type (64-bit or 32-bit) in Ignition?

We tried with below sample code

[quote]import sys  
import os

def machine():  
try:  
return os.uname()[-1]  
except AttributeError:  
if “PROCESSOR\_ARCHITEW6432” in os.environ:  
return os.environ.get(“PROCESSOR\_ARCHITEW6432”, ‘’)  
else:  
return os.environ.get(‘PROCESSOR\_ARCHITECTURE’, ‘’)

strOS = machine()  
system.gui.errorBox("OS Details = " + str(strOS))[/quote]  
However, facing NameError: global name ‘os’ is not defined error.

Thank you

---

<div class="post-metadata">

**Author:** ![JGJohnson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jgjohnson/32/29582_2.png) [@JGJohnson](https://forum.inductiveautomation.com/u/JGJohnson)\
**Post date:** [March 30, 2015, 1:10pm UTC](https://forum.inductiveautomation.com/t/how-to-get-system-type-64-bit-or-32-bit-in-ignition/9856/2 "2015-03-30T13:10:38Z")

</div>

os is out of scope. You have to import it in the function where you are using it.

This works:

[code]  
import sys

def machine():  
import os  
try:  
return os.uname()[-1]  
except AttributeError:  
if “PROCESSOR\_ARCHITEW6432” in os.environ:  
return os.environ.get(“PROCESSOR\_ARCHITEW6432”, ‘’)  
else:  
return os.environ.get(‘PROCESSOR\_ARCHITECTURE’, ‘’)

strOS = machine()  
system.gui.errorBox("OS Details = " + str(strOS))[/code]

---

<div class="post-metadata">

**Author:** ![skallepalli](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@skallepalli](https://forum.inductiveautomation.com/u/skallepalli)\
**Post date:** [March 30, 2015, 2:20pm UTC](https://forum.inductiveautomation.com/t/how-to-get-system-type-64-bit-or-32-bit-in-ignition/9856/3 "2015-03-30T14:20:30Z")

</div>

Thanks Johnson. I forgot the simple concept.
