Ticket #33 (new enhancement)

Opened 3 years ago

Last modified 13 months ago

Fetch Darwin system information using "sysctl -a" and "system_profiler"

Reported by: chris Owned by:
Priority: major Milestone:
Component: OSX Version:
Keywords: Cc:

Description (last modified by chris) (diff)

See how much information Eddie can make use of from:

sysctl -a

and

system_profiler

on Darwin (OS X).

Change History

Changed 3 years ago by chris

  • description modified (diff)
  • summary changed from Fetch Darwin system information using sysctl -a to Fetch Darwin system information using "sysctl -a" and "system_profiler"

Changed 3 years ago by chris

  • owner set to chris
  • status changed from new to assigned
  • milestone set to eddie-0.36

Changed 3 years ago by chris

Analysis of sysctl -a:

Can fetch some standard stats:

$ sysctl vm.loadavg
vm.loadavg: 1.30 1.52 1.91

or suppress the name in the output:

$ sysctl -n vm.loadavg
1.10 1.47 1.89

Swap usage:

$ sysctl vm.swapusage
vm.swapusage: total = 2048.00M  used = 1390.33M  free = 657.67M  (encrypted)

Can fetch 2 (or more) stats at once with one command, Example:

$ sysctl vm.loadavg vm.swapusage
vm.loadavg: 1.59 1.70 2.03
vm.swapusage: total = 2048.00M  used = 1390.33M  free = 657.67M  (encrypted)

Total RAM:

$ sysctl hw.physmem
hw.physmem: 2147483648
$ sysctl hw.memsize
hw.memsize: 2147483648

Can't see any other stats that are immediately relevant to data that current Eddie needs.

Changed 3 years ago by chris

system_profiler:

Can output data in XML format using

system_profiler -xml

Can see all data types with

system_profiler -listDataTypes

Battery information: can fetch battery charge levels (in XML) with

system_profiler SPPowerDataType  -xml

Can fetch volume information with something like:

system_profiler SPParallelATADataType SPSerialATADataType SPFibreChannelDataType SPFireWireDataType SPParallelSCSIDataType -xml

and network mount points:

system_profiler SPNetworkVolumeDataType

Changed 13 months ago by chris

  • owner chris deleted
  • status changed from assigned to new
  • milestone eddie-0.36 deleted
Note: See TracTickets for help on using tickets.