Posts Tagged ‘StartupItems’

Sure, We Have a Mac Client, We Use Java!

Thursday, January 24th, 2013

We all have our favorite epithets to invoke for certain software vendors and the practices they use. Some of our peers go downright apoplectic when speaking about those companies and the lack of advances we perceive in the name of manageable platforms. Not good, life is too short.

I wouldn’t have even imagined APC would be forgiving in this respect, they are quite obviously a hardware company. You may ask yourself, though, ‘is your refrigerator running’ is the software actually listening for a safe shutdown signal from the network card installed in the UPS? Complicating matters is:
- The reason we install this Network Shutdown software from APC on our server is to receive this signal over ethernet, not USB, so it’s not detected by Energy Saver like other, directly cabled models

- The shutdown notifier client doesn’t have a windowed process/menubar icon

- The process itself identifies as “Java” in Activity Monitor (just like… CrashPlan – although we can kindof guess which one is using 400+ MBs of virtual memory idle…)

Which sucks. (Seriously, it installs in /Users/Shared/Applications! And runs at boot with a StartupItem! In 2013! OMGWTFBBQ!)

Calm, calm, not to fear! ps sprinkled with awk to the rescue:

ps avx | awk '/java/&&/Notifier/&&!/awk/{print $17,$18}'

To explain the ps flags, first it allows for all users processes, prints in long format with more criteria, and the x is for even if they have no ‘controlling console.’ Then awk looks for both Java and the ‘Notifier’ jar name, minus our awk itself, and prints the relevant fields, highlighted below(trimmed and rewrapped for readability):

:./comp/pcns.jar:./comp/Notifier.jar: 

com.apcc.m11.arch.application.Application

So at least we can tell that something is running, and appreciate the thoughtful development process APC followed, at least while we aren’t fashioning our own replacement with booster serial cables and middleware. Thanks to the googles and the overflown’ stacks for the proper flags to pass ps.

Starting (and restarting) Retrospect Clients From the Command Line

Monday, March 10th, 2008

Port scan the system to see if port 497 is up. Send Unix Command(this very often does not work for me) : exec SystemStarter stop RetroClient # then exec SystemStarter start RetroClient

If the above fails, enable SSH by sending the command via Send Unix: systemsetup -setremotelogin on

Open up a new terminal window and ssh into the system: ssh 318admin@192.168.1.150

Run the following to start the retrospect startup item: sudo /Library/StartupItems/RetroClient/RetroClient

if that does not work you can try to manually run the daemon in the foreground: sudo /Applications/Retrospect\ Client.app/Contents/Resources/pitond

This last command is only helpful for debugging as the client will exit as soon as you close the window. however you can open up multiple (ssh) terminal windows to view the logs on while you manually start and stop the service.

tail -f /var/log/retroclient.log tail -f /var/log/system.log