One of the things I like about Leopard is that it is UNIX.. With that one of the changes I first noticed was that now you can use “ps -eaf” instead of “ps -aux”. Nice, I hated doing ps -aux, as I use solaris all the time and /usr/ucb/ps is almost never used. The one draw back is that it does not print the username it prints the uid in the output:

[chef:~] unixwiz% ps -aef | more
UID PID PPID C STIME TTY TIME CMD
0 1 0 0 0:01.06 ?? 0:01.14 /sbin/launchd
0 10 1 0 0:00.58 ?? 0:00.66 /usr/libexec/kextd
0 11 1 0 0:02.75 ?? 0:04.55 /usr/sbin/DirectoryService
0 12 1 0 0:00.52 ?? 0:00.75 /usr/sbin/notifyd
0 13 1 0 0:00.65 ?? 0:01.05 /usr/sbin/syslogd
0 17 1 0 0:01.57 ?? 0:02.86 /usr/sbin/configd
1 18 1 0 0:00.42 ?? 0:01.01 /usr/sbin/distnoted
65 19 1 0 0:00.05 ?? 0:00.09 /usr/sbin/mDNSResponder -launchd
0 24 1 0 0:00.12 ?? 0:00.30 /usr/sbin/securityd -i
0 28 1 0 0:00.33 ?? 0:00.48 /usr/sbin/ntpd -n -g -p /var/run/ntpd.pid -f /var/db/ntp.drift
0 30 1 0 0:06.96 ?? 0:06.96 /usr/sbin/update
0 34 1 0 5:20.79 ?? 11:21.33 /System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framewo
rk/Support/mds
501 35 1 0 0:00.39 ?? 0:00.84 /System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow conso
le
0 36 1 0 0:00.01 ?? 0:00.01 /usr/sbin/KernelEventAgent
0 38 1 0 0:00.01 ?? 0:00.01 /usr/libexec/hidd

Some notes from the ps man page…

The biggest change is in the interpretation of the -u option, which now displays processes belonging to the specified username(s). Thus, “ps -aux” will fail (unless you want to know about user “x”). As a convenience, however, “ps aux” still works as it did in Tiger.

and this one is very interesting:

STANDARDS
The ps utility supports the Version 3 of the Single UNIX Specification (“SUSv3”) standard.

HISTORY
The ps command appeared in Version 4 AT&T UNIX.

BUGS
Since ps cannot run faster than the system and is run as any other scheduled process, the information it displays can never be exact.

The ps utility does not correctly display argument lists containing multibyte characters.

So if you want the output to have usernames in it, do a “ps -ej”

Another change is to the iostat command, the old iostat command mostly printed the disk io and User/Sys/Idle time. Looks like they have now added the load average to every line so it looks like this now:

[chef:~] unixwiz% iostat  1 5
          disk0           disk1       cpu     load average
    KB/t tps  MB/s     KB/t tps  MB/s  us sy id   1m   5m   15m
   24.95  85  2.08    22.38  65  1.42  16 14 70  0.86 1.14 1.35
   49.14 154  7.39    33.47 251  8.20  17 26 58  0.86 1.14 1.35
   93.75 110 10.06    59.62 148  8.61  17 20 64  0.86 1.14 1.35
   38.05 191  7.09    35.92 241  8.44  18 30 51  0.95 1.15 1.35
   53.78 190  9.97    38.98 272 10.34  20 28 52  0.95 1.15 1.35

Another command I found is “zfs”, but it does not appear any where in the gui. So I wonder if it is not fully implemented yet.

They also changed the sar command:

[chef:/usr/bin] unixwiz% sar 1 10

23:29:36  %usr  %nice   %sys   %idle
23:29:37   34      0     42     24
23:29:38   35      0     44     21
23:29:39   24      0     30     46
23:29:40   17      0     22     60
23:29:41   16      0     21     64
23:29:42   19      0     22     59
23:29:43   26      0     30     44
23:29:45   32      0     42     25
23:29:46   28      0     34     38
23:29:47   25      0     31     44
Average:     25      0     31     42

They added a %nice column

Posted by unixwiz, filed under Leopard, MacOSX. Date: October 27, 2007, 11:51 pm | Comments Off

Went and picked up MacOSX Leopard today… I decided to do a fresh install instead of trying to upgrade my current Tiger installation on my MacBook Pro. Well after backing up my entire hard drive to a external drive. I started the Installation. It took about an hour for it to install. The funny part is 30 minutes of it, was the installer verifying the integrity of of the DVD. First time I have seen an OS verify the entire disk before it started to even do an install to the hard drive. Anyways, 30 minutes after the verification was done, it was installed. The opening video is pretty cool basically flying through space. I then started the restoration of my files from the external USB Drive. Funny thing was as soon as I plugged the drive in to the MBP, time machine kicked in and asked if I wanted to use the external drive as a back up device. So I said yes and it started backing up what I had just installed while I was restoring files from the same drive.

Some little things I have noticed now:

  1. If you leave iCal on the Doc, it now shows the current date, unlike Tiger only showing it if you had it actually running.
  2. Everything seems a lot quicker than Tiger. But it could also be that I had not reinstalled Tiger since I had bought the MBP.
  3. Coverflow in finder. It is cool for going through my documents folder.

I also picked up the new iLife 08. I like the new iPhoto. Now to just get everything set back up the way I had it before.. So far I like what I see, and like the new speed..

Posted by unixwiz, filed under Apple, MacBook Pro, MacOSX. Date: October 27, 2007, 8:46 pm | Comments Off

ThinGuy over at Sun linked to this article Windows Security - Bill Gates Attacks Mac Security, Apple Ads

Needless to say, I think Gates is just realizing that for once he may be in a losing position. Maybe for once there will not be a monopoly in the home OS front. I am also not recommending any one upgrade to vista, unless you plan on having one kick ass desktop to run it on, otherwise stick with XP or move to Mac, or Solaris!!!!

Posted by unixwiz, filed under Funny, Interesting, M$ Winders, MacOSX, Solaris. Date: February 6, 2007, 7:24 pm | No Comments »

The lastest Get A Mac ad sums up my feelings about vista.

Posted by unixwiz, filed under Funny, M$ Winders, MacOSX. Date: February 6, 2007, 7:14 pm | 1 Comment »

To configure the ldapsearch command on MacOSX (10.4 server is what I am working with at the moment) to work with ssl based LDAP servers there are couple of steps you need to do:

First create an key and certificate for the ldapsearch command to use. This can be done by using the following command:

openssl req -new -x509 -nodes -out /etc/openldap/ldap.pem -keyout /etc/openldap/ldap-key.pem -days 999999

This places the key in /etc/openldap/ldap-key.pem and the certificate in /etc/openldap/ldap.pem. Now if you are using a self signed certificate on your LDAP servers place a copy of CA certificate in /etc/openldap/cacerts/

Next edit the file /etc/openldap/ldap.conf and do the following:

First change the line that says : TLS_REQCERT from never to allow
Next add a line to your CACERT:
TLS_CACERT /etc/openldap/cacerts/mycaroot.crt

Then the lines for your client key and cert:
TLS_CERT /etc/openldap/ldap.pem
TLS_KEY /etc/openldap/ldap-key.pem

now you should be able to do an ldap search using ssl like this:

ldapsearch -x -Z -H ldaps://ldap.somehost.com  -b"ou=people,dc=root" "(uid=unixwiz)"

Posted by unixwiz, filed under LDAP, MacOSX. Date: December 20, 2006, 4:53 pm | No Comments »

« Previous Entries