On May 5, 2009, at 10:32 AM, Kieran Kelleher wrote:
Depends on how wotaskd and womonitor are configured to run.
Assuming you are using Leopard, and using launchd jobs, you can
restart them by telling launchctl to stop the job ... and they
should automatically restart....
for example
sudo launchctl stop com.webobjects.wotaskd
sudo launchctl stop com.webobjects.womonitor
(assuming "com.webobjects.wotaskd" is the name of the launchd task)
Yes, same for tiger; however, for me, this is a "restart" not a
shutdown
usually killing wotaskd results in the managed instances getting
killed too IIRC.
you can also kill an instance by getting its pid and using kill.
But then it may just get restarted, depending on the config of the
instance ...
To get a pid of an instance, you get its port number in womonitor
and do
sudo lsof -i tcp:<port-num>
if your apps are actually misbehaving, refusing connections, and
basically hung or deadlocked, then it is useful to jstack them
before killing them to see what is wrong:
sudo jstack <pid>
HTH, Kieran
Useful jstack is.
I found that for tiger & leopard:
sudo launchctl unload -w /System/Library/LaunchDaemons/
com.apple.womonitor.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/
com.apple.wotaskd.plist
This kill them and they stay dead, otherwise they keep restarting.
This writes a
<key>Disabled</key>
<true/>
into the System/Library/LaunchDaemons/com.apple.womonitor.plist file.
To start just:
sudo launchctl load -w /System/Library/LaunchDaemons/
com.apple.womonitor.plist
sudo launchctl load -w /System/Library/LaunchDaemons/
com.apple.wotaskd.plist
This changes the Disabled key to a false value, and writes (-w) it
into the file:
System/Library/LaunchDaemons/com.apple.womonitor.plist
so now they keep on running.
I use this in a script which periodically runs. It has a list of
things to do like:
stop a bunch of processes
sudo launchctl unload -w /System/Library/LaunchDaemons/
com.apple.womonitor.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/
com.apple.wotaskd.plist
check for software updates
check the disks
email a report of all the above and general server condition
pause a few hours so I can do some maintenance if necessary
restart needed services
reboot and come up fully functional
A few minutes after reboot, a status report is emailed just to check
that everything is working.
On May 5, 2009, at 10:24 AM, Greg Brown wrote:
Hi,
There isn't much I could find about programatically shutting down
the webobjects system, so I assume something like a
SIGTERM signal
would, if sent to all three, terminate all webobjects programs on
unix.
Is there a nicer way? I assume a reboot does pretty much the same
thing.
Thanks!
Greg
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/kieran_lists%
40mac.com
This email sent to [email protected]
Greg Brown
[email protected]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]