Re: How to shut down a server?
- From: adrian@xxxxxxxxxxxxxxxxxxxxxxxxxxxx (Adrian Tuddenham)
- Date: Mon, 17 Aug 2009 22:07:33 +0100
Rowland McDonnell <real-address-in-sig@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
Adrian Tuddenham <adrian@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Rowland McDonnell <real-address-in-sig@xxxxxxxxxxxxxxxxxxxxxxx> wrote:[snip]
Adrian Tuddenham <adrian@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Rowland McDonnell <real-address-in-sig@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
I wrote a simple script but when I went to run it from the logged-in
machine, it tried to shut down the logged-in machine instead of the
server. I wonder if turning on Program Linking in the File Sharing menu
would solve that?
Oh blimey - I can't recall the details of exactly how to do things, but
that sounds about right. I think you have to do something to specify
the particular Mac-on-the-network you want to control, too.
That's the bit I need to know. All the other stuff is in place and
working.
Right.
tell application "Finder" to shut down
Is how to tell a Mac to shut down. How to get that instruction executed
by the Finder of A.N. Other Mac?
Need an incantation of the form tell application "Finder" of <remote Mac
specifier>.
<http://web.suffieldacademy.org/ils/netadmin/docs/software/os9_remote_sh
utdown/>
I tried:
tell application "Finder" of machine "eppc://username:password@hostname"
to shut down
which worked here.
It doesn't work on OS8.6; when I went to check the syntax, it baulked at
the word 'of'. It looks as though it can only assume the machine it is
running on.
What's that eppc specifier, I wonder?
That's a strange one. Probably makes sense to a networking specialist.
Here, the signalling was between two MacOS X 10.4.11 machines linked by
Ethernet, and with Remote Apple Events turned on (on the commanded Mac)
- `Enable access for assistive devices' in Universal Access (similar
setting prior to MacOS X exists) is not needed to be on.
I think the settings of the server need to be right too, but I haven't
got as far as that stage.
`hostname' was simply the name of the Mac that shows up in the Finder
when I'm looking at `Network'. Damned if I can recall where it's set in
the first place.
In OS8.6 it is set in the File Sharing Contol Panel
(btw, and totally off-topic, but I thought I'd ask because I bet you can
give me answers much more quickly than you can read the questions.
I'm considering building a simple ultrasound blaster to dissuade the dog
next door from barking (the neighbours just shout threats of violence
and general abuse at me when I ask them to stop their dog barking; we've
had the cops out quite often because of their behaviour). I found these
rather cheap transducers:
<http://www.theelectronicsshop.co.uk/Spares/tweeters%20info.htm>
in particular, 200-675 and 200-698 at the top of the page.
(1kHz impededance spec'd at 1kHz! for a 4kHz-30kHz transducer! - I'm
going to be using 22kHz-30kHz)
What I was wondering was this: they're allegedly 1k ohm impededance @
1kHz, 100W rms, that gives a requirement for 316V rms/316mA drive for
100W output but only at 1kHz. I don't know much about these transducers
- basically, I assume I'll have to measure to check at higher
frequencies, but is the impedance going to be similar?
They are peizo-electric tweeters, so the impedance is predominantly
capacitive, that means it is inversely proportional to frequency
(roughly). At 20 Kc/s it will be down to 50 ohms or thereabouts.
The 'wattage' is meaningless for a capacitance, so the figures usually
mean "This is the power of amplifier they can be connected across"
rather than "This is the power they will draw from that amplifier". In
that case, 100 W in an 8-ohm system is equivalent to about 28v rms or
80v p/p.
I would run them well below that because:
a) They are very efficient and might permanently damage the dog's
hearing (which wouldn't stop it from barking).
b) They may have mechanical resonances around the upper end of the
response which would crack the crystal at full power.
c) The ratings given are probably bull-*** anyway. The recommended
47-ohm series resistor is going to reduce the working power to a quarter
of the specified figure.
And is there anything amiss with my idea of building a bog standard
variable frequency square wave generator switching some suitable
transistors on and off to shove a crude square wave into the
transducers, which I'll mount in a nondescript box 'cos it doesn't
matter with this job?
That would probably work, start with a supply rail not exceeding 24
volts. If you are driving each transistor to saturation (for
efficiency), there will be a significant time delay due to stored charge
when each one is being switched off. Drive the output transistors from
a ring-of-10 counter so that one is on for a count of four, the other is
on for four and they are both off between times. That way there is no
chance of the switch-off lag causing both transistors to be on at the
same time (the circuit is capacitive, so you shouldn't have to cope with
any inductive switch-off spikes in the pause). Use low value base
pull-down resistors to shorten the switch-off time
The transistors will be called on to dissipate quite a bit of power
because they are charging and discharging a capacitor. If you don't
want to start complicating the design with inductors, you may have to
provide some heat-sinking. Watch the repetitive peak current ratings.
I might even use a TTL IC for the square wave generator - from the
actual original 74 series... I've got some in the loft, I suspect.
You will need to do a bit of jiggery-pokery to switch the top transistor
of the pair, an inverted driver will be needed. (The bottom one will
probably need some sort of driver, too)
At present I have solved the problem in a low-tech way by poking the
'off' button.
I suspect that gives you an orderly shutdown - easily checked, that
point. And if so, why not stick with the method?
It'll work fine as long as the server lives under the bench. If I ever
move it, I might have to think again.
--
~ Adrian Tuddenham ~
(Remove the ".invalid"s and add ".co.uk" to reply)
www.poppyrecords.co.uk
.
- References:
- How to shut down a server?
- From: Adrian Tuddenham
- Re: How to shut down a server?
- From: Rowland McDonnell
- Re: How to shut down a server?
- From: Adrian Tuddenham
- Re: How to shut down a server?
- From: Rowland McDonnell
- Re: How to shut down a server?
- From: Adrian Tuddenham
- How to shut down a server?
- Prev by Date: Re: Talking of news readers....
- Next by Date: Re: Resource fork zapping?
- Previous by thread: Re: How to shut down a server?
- Next by thread: Re: How to shut down a server?
- Index(es):
Loading