Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

Mac OSX Terminal – Get System Details

Posted on March 30, 2016 By David Kittell

If you only have SSH access to a Mac OSX server and need some details on the machine you can use these commands to help.

uname -a
Darwin MyMacMini 15.3.0 Darwin Kernel Version 15.3.0: Thu Dec 10 18:40:58 PST 2015; root:xnu-3248.30.4~1/RELEASE_X86_64 x86_64
sw_vers
ProductName:    Mac OS X
ProductVersion: 10.11.3
BuildVersion:   15D21

System_Profiler can get you a lot of the information you are likely looking for but it pulls a lot of information so initially you may want to output it to a text file and determine what you need.

system_profiler | more > sys.txt

Of course you can do a simple grep command to filter through system_profiler

system_profiler | grep Memory
Memory: 4 GB
Memory:
      Upgradeable Memory: Yes
      Secure Virtual Memory: Enabled

The sysctl command is capable of getting a lot of information (see Mac Man Page)

sysctl kern.ostype kern.osrelease kern.osrevision kern.version kern.maxvnodes kern.maxproc kern.maxfiles kern.argmax kern.securelevel kern.hostname kern.hostid kern.clockrate kern.posix1version kern.ngroups kern.job_control kern.saved_ids kern.boottime vm.loadavg vm.swapusage net.inet.ip.forwarding net.inet.ip.redirect net.inet.ip.ttl net.inet.icmp.maskrepl net.inet.udp.checksum hw.machine hw.model hw.ncpu hw.byteorder hw.physmem hw.usermem hw.memsize hw.pagesize user.cs_path user.bc_base_max user.bc_dim_max user.bc_scale_max user.bc_string_max user.coll_weights_max user.expr_nest_max user.line_max user.re_dup_max user.posix2_version user.posix2_c_bind user.posix2_c_dev user.posix2_char_term user.posix2_fort_dev user.posix2_fort_run user.posix2_localedef user.posix2_sw_dev user.posix2_upe
kern.ostype: Darwin
kern.osrelease: 15.3.0
kern.osrevision: 199506
kern.version: Darwin Kernel Version 15.3.0: Thu Dec 10 18:40:58 PST 2015; root:x                                                                                                                               nu-3248.30.4~1/RELEASE_X86_64
kern.maxvnodes: 66560
kern.maxproc: 1064
kern.maxfiles: 12288
kern.argmax: 262144
kern.securelevel: 0
kern.hostname: MyMacMini 
kern.hostid: 0
kern.clockrate: { hz = 100, tick = 10000, tickadj = 2, profhz = 100, stathz = 10                                                                                                                               0 }
kern.posix1version: 200112
kern.boottime: { sec = 1459339211, usec = 0 } Wed Mar 30 08:00:11 2016
vm.loadavg: { 0.77 0.80 0.84 }
hw.machine: x86_64
hw.model: Macmini6,2
hw.ncpu: 8
hw.byteorder: 1234
hw.physmem: 2147483648
hw.usermem: 1363705856
hw.memsize: 4294967296
hw.pagesize: 4096
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

Code Mac OS X Shell Mac OSX UNIX UNIX Shell Scripts mac os xmac osxmachine informationsystem information

Post navigation

Previous post
Next post

Related Posts

FormatDateTime Function

Posted on August 21, 2013October 26, 2015

This is a default function within VBScript that should work in any VBScript situation. FormatDateTime(date,format) Date is required and has to be in a valid format but easily can accept date() or now() Date() would only display the current date where now() would be date and time. Format would be…

Read More

MSSQL – Remove Line Breaks

Posted on December 15, 2014October 26, 2015

Sometimes you need to remove line breaks or carriage returns, the code below should help. SELECT REPLACE(REPLACE([VarChar Column], CHAR(13), ‘ ‘), CHAR(10), ‘ ‘) The above script will not work if the column type is TEXT so you must convert it first. SELECT REPLACE(REPLACE(CAST([TEXT Column] AS VarChar(Max)), CHAR(13), ‘ ‘),…

Read More

Bash – Running In Docker?

Posted on October 26, 2020August 17, 2024

docker=$(cat /proc/self/cgroup | awk -F/ ‘$2 == "docker"’) if [ ! -z "$docker" ]; then echo "Running in Docker" else echo "Not running in Docker" fi Originally Posted on October 26, 2020Last Updated on August 17, 2024 All information on this site is shared with the intention to help. Before…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions
  • Open On Screen Keyboard (OSK)
  • SQLite - Auto-Increment / Auto Generate GUID
©2025 David Kittell | WordPress Theme by SuperbThemes