Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Feb 7, 2009, 07:40 AM   #1
jashsayani
macrumors regular
 
Join Date: Feb 2009
Location: San Jose, CA
Fetching system information

I want to make a simple Cocoa app that displays system information like Serial No, HD space, IP Address, OS Info, etc.

How do I fetch the info and display it in the app ?
__________________
Mac mini: 2.0 GHz, 2 GB RAM, 160 GB HD, Leopard 10.5.8
MacBook Pro: 2.9 GHz, 8 GB RAM, 256 GB SSD, Mavericks 10.9.1
Visit my Blog Twitter: Follow Me
jashsayani is offline   0 Reply With Quote
Old Feb 7, 2009, 07:53 PM   #2
bascov
macrumors newbie
 
Join Date: Feb 2009
Location: USA
something like:
set sysInfo to do shell script "system_profiler SPHardwareDataType"
display dialog sysInfo
bascov is offline   0 Reply With Quote
Old Feb 9, 2009, 02:47 AM   #3
jashsayani
Thread Starter
macrumors regular
 
Join Date: Feb 2009
Location: San Jose, CA
Thanks a lot for the reply.

When I type this in the terminal, I get the basic info:
Code:
system_profiler SPHardwareDataType
Now, how do I separately display Memory, Serial No., Cache, etc.
Explanation with 2 lines of code (getting info and displaying) would be great as I'm new to Cocoa programming.

Thanks.
__________________
Mac mini: 2.0 GHz, 2 GB RAM, 160 GB HD, Leopard 10.5.8
MacBook Pro: 2.9 GHz, 8 GB RAM, 256 GB SSD, Mavericks 10.9.1
Visit my Blog Twitter: Follow Me
jashsayani is offline   0 Reply With Quote
Old Feb 9, 2009, 01:28 PM   #4
Mac_Max
macrumors 6502
 
Join Date: Mar 2004
typing "man system_profiler" will give you the commands you need to extract the data you want.
Mac_Max is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
System Information KingMike Mac Programming 0 May 6, 2008 10:05 AM
Any way to change where the Weather app fetches it information from? cstromme iPhone Tips, Help and Troubleshooting 2 Sep 12, 2007 05:26 PM
EA System Information utility says MBP has 512MB video Ram sikkinixx MacBook Pro 5 Jun 24, 2007 03:34 PM
System information tool aafuss1 Mac Applications and Mac App Store 3 May 2, 2007 09:12 PM
System Information in AppleScript Unorthodox Mac Programming 1 Sep 21, 2006 11:47 AM


All times are GMT -5. The time now is 03:50 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC