Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

The question is based on this thread.

Problem: to find an installation within the process data

I would like to know how you can see from the following data that I have the updates of MacPorts' ports going on.

I run

ps -u Sam

I get

UID   PID TTY           TIME CMD
  501    79 ??         0:15.95 /sbin/launchd
  501   186 ??         0:01.50 /Library/Google/Google Desktop/GoogleDesktopAgent.app/Contents/MacOS/GoogleDesktopAgent
  501   188 ??         0:01.14 /System/Library/CoreServices/AirPort Base Station Agent.app/Contents/MacOS/AirPort Base Station Agent -launchd -allowquit
  501   193 ??         0:01.55 /System/Library/CoreServices/Spotlight.app/Contents/MacOS/Spotlight
  501   194 ??         0:00.34 /usr/sbin/UserEventAgent -l Aqua
  501   195 ??         0:13.79 /System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Support/ATSServer
  501   196 ??         0:09.80 /System/Library/CoreServices/Dock.app/Contents/MacOS/Dock -psn_0_28679
  501   197 ??         0:10.99 /System/Library/CoreServices/SystemUIServer.app/Contents/MacOS/SystemUIServer -psn_0_40970
  501   198 ??         0:00.00 /usr/sbin/pboard
  501   199 ??         1:48.90 /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder -psn_0_45067
  501   210 ??         0:17.12 /Library/CFMSupport/CNQL1213_ButtonManager.app/Contents/MacOS/CNQL1213_ButtonManager -psn_0_65552
  501   214 ??         0:01.50 /Users/Sam/Library/PreferencePanes/Growl.prefPane/Contents/Resources/GrowlHelperApp.app/Contents/MacOS/GrowlHelperApp -psn_0
  501   218 ??         0:00.07 /Applications/iTunes.app/Contents/Resources/iTunesHelper.app/Contents/MacOS/iTunesHelper -psn_0_81940
  501   219 ??         2:12.63 /Applications/Personal/Dropbox.app/Contents/MacOS/Dropbox -psn_0_86037
  501   220 ??         0:03.80 /System/Library/Image Capture/Support/Image Capture Extension.app/Contents/MacOS/Image Capture Extension -psn_0_94231
  501   287 ??         0:00.00 /sw/bin/dbus-daemon --nofork --session
  501   402 ??         0:01.19 /System/Library/CoreServices/Dock.app/Contents/Resources/DashboardClient.app/Contents/MacOS/DashboardClient
  501   403 ??         0:00.54 /System/Library/CoreServices/Dock.app/Contents/Resources/DashboardClient.app/Contents/MacOS/DashboardClient
  501  6768 ??        43:54.31 /Applications/Browsers/Firefox.app/Contents/MacOS/firefox-bin -psn_0_270402
  501  7178 ??         0:55.52 /Applications/Browsers/Safari.app/Contents/MacOS/Safari -psn_0_315469
  501  7297 ??         0:00.24 /usr/bin/ssh-agent -l
  501  7482 ??         0:12.13 /Applications/iTerm.app/Contents/MacOS/iTerm -psn_0_344148
  501  7620 ??         0:10.82 /Applications/Browsers/Opera.app/Contents/MacOS/Opera -psn_0_360536
  501  8029 ??         0:03.11 SCREEN -xR
  501 34477 ??         0:06.56 /Applications/Utilities/Terminal.app/Contents/MacOS/Terminal -psn_0_532610
  501 43345 ??         0:01.08 /System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework/Versions/A/Support/mdworker MDSImporterWorke
  501 62291 ??         0:10.15 /Applications/Utilities/Activity Monitor.app/Contents/MacOS/Activity Monitor -psn_0_540804
    0 34478 ttys000    0:00.02 login -pfq Sam /bin/zsh
  501 34479 ttys000    0:00.05 -zsh
  501 34497 ttys000    0:00.01 screen -xR
    0  8030 ttys001    0:00.01 login -pflq Sam /bin/zsh
  501  8031 ttys001    0:01.45 zsh
    0 30465 ttys001    0:00.00 ps -u Sam
    0 83953 ttys002    0:00.01 login -pflq Sam /bin/zsh
  501 83957 ttys002    0:00.07 zsh
    0 24515 ttys003    0:00.01 login -pflq Sam /bin/zsh
  501 24567 ttys003    0:00.94 zsh
  501 34808 ttys003    0:00.06 vim /Users/Sam/.zshrc

How can you see that I have an installation going on?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

Did you use sudo to run the updates, like this:

sudo port ...

If so, the update is not running as your account, but as root. You could try a command like this to see if "port" was running:

ps aux | grep port

Try that and let me know what you see.

share|improve this answer
    
@Anthony: I see now files.getdropbox.com/u/175564/ps-aux-problem.png –  Masi Jul 2 '09 at 20:47
    
You might need to use grep -i port or grep Port if it's not all lowercase. –  Dennis Williamson Jul 2 '09 at 20:50
    
Is the MacPorts update still running? Once it finishes, the process will end and it won't show up when you run "ps". –  Anthony Lewis Jul 2 '09 at 20:51
    
Does OSX not have pgrep? –  jldugger Jul 3 '09 at 4:18
    
@jldugger - Not out of box. –  Chealion Jul 3 '09 at 5:34
add comment

This answer helps to understand the data better.

I run

pstree

I get

-+= 00001 root /sbin/launchd
 |--= 00010 root /usr/libexec/kextd
 |--= 00011 root /usr/sbin/notifyd
 |--= 00012 root /usr/sbin/syslogd
 |--= 00014 root /usr/sbin/ntpd -c /private/etc/ntp-restrict.conf -n -g -p /var/run/ntpd.pid -f /var/db/ntp.drift
 |--= 00015 _usbmuxd /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/Resources/usbmuxd -launchd
 |--= 00016 root /usr/sbin/update
 |--= 00017 root /sbin/SystemStarter
 |--= 00020 root /usr/sbin/securityd -i
 |--= 00022 root /System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework/Support/mds
 |--= 00023 _mdnsresponder /usr/sbin/mDNSResponder -launchd
 |--= 00024 Sam /System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow console
 |--= 00025 root /usr/sbin/KernelEventAgent
 |--= 00027 root /usr/libexec/hidd
 |--= 00028 root /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/Support/fseventsd
 |--= 00030 root /sbin/dynamic_pager -F /private/var/vm/swapfile
 |--= 00033 root /usr/sbin/diskarbitrationd
 |--= 00034 root /usr/sbin/DirectoryService
 |--= 00036 root /usr/sbin/configd
 |--= 00039 root autofsd
 |--= 00041 root /usr/libexec/ApplicationFirewall/socketfilterfw
 |-+= 00045 root /Library/Google/Google Desktop/GoogleDesktopDaemon.bundle/Contents/MacOS/GoogleDesktopDaemon
 | \--= 96304 nobody (GDImportWorker)
 |--= 00046 daemon /usr/sbin/distnoted
 |--= 00047 root /System/Library/CoreServices/coreservicesd
 |--= 00049 root /usr/sbin/blued
 |--= 00061 _windowserver /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Resources/WindowServer -daemon
 |-+= 00079 Sam /sbin/launchd
 | |--= 00186 Sam /Library/Google/Google Desktop/GoogleDesktopAgent.app/Contents/MacOS/GoogleDesktopAgent
 | |--= 00188 Sam /System/Library/CoreServices/AirPort Base Station Agent.app/Contents/MacOS/AirPort Base Station Agent -launchd -allowquit
 | |--= 00193 Sam /System/Library/CoreServices/Spotlight.app/Contents/MacOS/Spotlight
 | |--= 00194 Sam /usr/sbin/UserEventAgent -l Aqua
 | |--= 00195 Sam /System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Support/ATSServer
 | |-+= 00196 Sam /System/Library/CoreServices/Dock.app/Contents/MacOS/Dock -psn_0_28679
 | | |--- 00402 Sam /System/Library/CoreServices/Dock.app/Contents/Resources/DashboardClient.app/Contents/MacOS/DashboardClient
 | | \--- 00403 Sam /System/Library/CoreServices/Dock.app/Contents/Resources/DashboardClient.app/Contents/MacOS/DashboardClient
 | |--= 00197 Sam /System/Library/CoreServices/SystemUIServer.app/Contents/MacOS/SystemUIServer -psn_0_40970
 | |--= 00198 Sam /usr/sbin/pboard
 | |--= 00199 Sam /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder -psn_0_45067
 | |--= 00210 Sam /Library/CFMSupport/CNQL1213_ButtonManager.app/Contents/MacOS/CNQL1213_ButtonManager -psn_0_65552
 | |--= 00214 Sam /Users/Sam/Library/PreferencePanes/Growl.prefPane/Contents/Resources/GrowlHelperApp.app/Contents/MacOS/GrowlHelperApp -psn_0_69649
 | |--= 00218 Sam /Applications/iTunes.app/Contents/Resources/iTunesHelper.app/Contents/MacOS/iTunesHelper -psn_0_81940
 | |--= 00219 Sam /Applications/Personal/Dropbox.app/Contents/MacOS/Dropbox -psn_0_86037
 | |--= 00220 Sam /System/Library/Image Capture/Support/Image Capture Extension.app/Contents/MacOS/Image Capture Extension -psn_0_94231
 | |--= 00287 Sam /sw/bin/dbus-daemon --nofork --session
 | |--= 06768 Sam /Applications/Browsers/Firefox.app/Contents/MacOS/firefox-bin -psn_0_270402
 | |--= 07178 Sam /Applications/Browsers/Safari.app/Contents/MacOS/Safari -psn_0_315469
 | |--= 07297 Sam /usr/bin/ssh-agent -l
 | |--= 07482 Sam /Applications/iTerm.app/Contents/MacOS/iTerm -ps
    
share|improve this answer
1  
That still doesn't show that the "port" command is running... –  Anthony Lewis Jul 2 '09 at 20:54
    
@Anthony: You are right. The command's execution seems to be ended. --- I will try your advice next time when I update my system. --- Thank you for your answers! –  Masi Jul 2 '09 at 22:18
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.