How to display IMEI info?

lashomb
Contributor II

I can see where to search for it in an Advanced Search, but how do I just display that info? Didn't see a choice in Inventory Display. I'm running 9.3.

Thanks!
Brian

2 ACCEPTED SOLUTIONS

lashomb
Contributor II

Nevermind this... I just decided to look in the database. If anyone finds this (and I've seen a few posts like this with no responses), just do this.

And yes I know... bad things to run mysql as root, but here it is anyway...

On your JSS, navigate to the mysql/bin directory and run:
./mysql -u root -p.

In my JumpStart, the root password was left blank. In this case simply hit return to get to a mysql prompt.

Next we’ll need to tell mysql which database we want to use. Type this and hit return:
USE jamfsoftware;

Running from the mysql prompt shows the fields we can select:
SHOW COLUMNS FROM mobile_devices_denormalized FROM jamfsoftware;

You'll see a list of all fields.... I'm just using username and imei in this example.

Run from the mysql prompt:
SELECT md.username, md.imei FROM mobile_devices_denormalized AS md INTO OUTFILE '/Users/Shared/mobile.txt';

Now you have that data in a text file in the directory you specified.

View solution in original post

bentoms
Release Candidate Programs Tester

@lashomb, you should also be able to do this via the API.

JAMF are advising against DB queries as they may change the tables, but the API should remain.

View solution in original post

3 REPLIES 3

lashomb
Contributor II

Nevermind this... I just decided to look in the database. If anyone finds this (and I've seen a few posts like this with no responses), just do this.

And yes I know... bad things to run mysql as root, but here it is anyway...

On your JSS, navigate to the mysql/bin directory and run:
./mysql -u root -p.

In my JumpStart, the root password was left blank. In this case simply hit return to get to a mysql prompt.

Next we’ll need to tell mysql which database we want to use. Type this and hit return:
USE jamfsoftware;

Running from the mysql prompt shows the fields we can select:
SHOW COLUMNS FROM mobile_devices_denormalized FROM jamfsoftware;

You'll see a list of all fields.... I'm just using username and imei in this example.

Run from the mysql prompt:
SELECT md.username, md.imei FROM mobile_devices_denormalized AS md INTO OUTFILE '/Users/Shared/mobile.txt';

Now you have that data in a text file in the directory you specified.

bentoms
Release Candidate Programs Tester

@lashomb, you should also be able to do this via the API.

JAMF are advising against DB queries as they may change the tables, but the API should remain.

lashomb
Contributor II

Thanks Ben.