Re: The power button

2011-06-05 Thread Amit Kulkarni
> When I press the power button on an x86 PC, acpibtn(4) receives the
> event and shuts down the machine.

that is a absolutely needed thing to have. this functionality does a
smooth shutdown without need for fsck on restart. i have depended on
this feature whenever i test something, and the machine hangs for any
reason whatsoever. hasn't happened much but it si a lifesaver whenever
it has happened (fsck problems on bigmem machines a couple of months
ago, vmmap testing etc).

> When I press the power button on my Blade 100 (sparc64), power(4)
> receives the event and by default ignores it.  Only if the
> machdep.kbdreset sysctl is set to 1 will power(4) proceed to shut
> down the machine.
>
> I don't have a preference either way, but this is inconsistent.
> Either acpibtn(4) should also be protected by a sysctl, or power(4)
> shouldn't.

this should be a sane default (i.e halt & power off on power button
press) if acpibtn() is protected by sysctl. Windows gives you a choice
and so does Linux buried somewhere in control panel/center.



The power button

2011-06-05 Thread Christian Weisgerber
When I press the power button on an x86 PC, acpibtn(4) receives the
event and shuts down the machine.

When I press the power button on my Blade 100 (sparc64), power(4)
receives the event and by default ignores it.  Only if the
machdep.kbdreset sysctl is set to 1 will power(4) proceed to shut
down the machine.

I don't have a preference either way, but this is inconsistent.
Either acpibtn(4) should also be protected by a sysctl, or power(4)
shouldn't.

-- 
Christian "naddy" Weisgerber  na...@mips.inka.de



Re: Shutdown with the power button

2008-10-17 Thread Mikel Lindsaar
On Thu, Oct 16, 2008 at 11:54 PM,  <[EMAIL PROTECTED]> wrote:
> On Thu, Oct 16, 2008 at 11:30:02PM +1100, Mikel Lindsaar wrote:
>> Hmm... here is the dmesg then any ideas?
> looks like you're missing an acpibtn (man acpibtn).

Thanks Peter, that is the case and it looks like the why on the problem.

Any pointers on how to get it enabled?

Looking through the BIOS settings, there isn't an APM section at all
that I can see, this is a 1RU server, so that doesn't really surprise
me.

Mikel



Re: Shutdown with the power button

2008-10-16 Thread Girish Venkatachalam
On 15:41:27 Oct 16, Guillermo Bernaldo de Quiros Maraver Pedroche wrote:
> see /etc/rc.shutdown and set: 
> 
> powerdown=YES   # set to YES for powerdown
> 

Try this. It might work.

My /etc/sysctl.conf has  the line

machdep.kbdreset=1  # permit console CTRL-ALT-DEL to do a 
nice halt

I find that this along with the above option set in /etc/rc.shutdown is
a nice way to shutdown the machine by pressing the magic buttons...

-Girish



Re: Shutdown with the power button

2008-10-16 Thread peter
hi,

On Thu, Oct 16, 2008 at 11:30:02PM +1100, Mikel Lindsaar wrote:
 
> Hmm... here is the dmesg then any ideas?

looks like you're missing an acpibtn (man acpibtn).

-- 
CUL8R, Peter.



Re: Shutdown with the power button

2008-10-16 Thread Guillermo Bernaldo de Quiros Maraver Pedroche
see /etc/rc.shutdown and set: 

powerdown=YES   # set to YES for powerdown

Good Luck.
On Thu, Oct 16, 2008 at 11:30:02PM +1100, Mikel Lindsaar wrote:
> On Thu, Oct 16, 2008 at 11:22 PM, Gregory Edigarov
> <[EMAIL PROTECTED]> wrote:
> > Mikel Lindsaar wrote:
> >> Wondering if anyone knows how (or if it is possible) to be able to
> >> gracefully power down an OpenBSD box by hitting the power button on
> >> the server.
> > Mine does clean  shutdown on power button just from the box
> 
> Hmm... here is the dmesg then any ideas?
> 
> 
> 
> OpenBSD 4.3 (GENERIC) #698: Wed Mar 12 11:07:05 MDT 2008
>[EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
> cpu0: Intel(R) Xeon(TM) CPU 3.06GHz ("GenuineIntel" 686-class) 3.07 GHz
> cpu0: 
> FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,CNXT-ID,xTPR
> real mem  = 2147028992 (2047MB)
> avail mem = 2068054016 (1972MB)
> mainbus0 at root
> bios0 at mainbus0: AT/286+ BIOS, date 12/31/99, BIOS32 rev. 0 @
> 0xf, SMBIOS rev. 2.3 @ 0xec000 (42 entries)
> bios0: vendor HP version "P31" date 03/03/2005
> bios0: HP ProLiant DL360 G3
> acpi0 at bios0: rev 0
> acpi0: tables DSDT FACP APIC SPCR
> acpi0: wakeup devices
> acpitimer0 at acpi0: 3579545 Hz, 32 bits
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpiprt1 at acpi0: bus 1 (PCI1)
> acpiprt2 at acpi0: bus 4 (PCI2)
> acpicpu0 at acpi0
> acpitz0 at acpi0: critical temperature 31 degC
> bios0: ROM list: 0xc/0x8000 0xc8000/0x4000 0xee000/0x2000!
> cpu0 at mainbus0
> pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
> pchb0 at pci0 dev 0 function 0 "ServerWorks CNB20-HE Host (GC-LE)" rev 0x31
> pchb1 at pci0 dev 0 function 1 "ServerWorks CNB20-HE Host (GC-LE)" rev 0x00
> pchb2 at pci0 dev 0 function 2 "ServerWorks CNB20-HE Host (GC-LE)" rev 0x00
> pci1 at pchb2 bus 1
> em0 at pci1 dev 1 function 0 "Intel PRO/1000MT (82546EB)" rev 0x01:
> irq 15, address 00:04:23:c8:03:f6
> em1 at pci1 dev 1 function 1 "Intel PRO/1000MT (82546EB)" rev 0x01:
> irq 11, address 00:04:23:c8:03:f7
> bge0 at pci1 dev 2 function 0 "Broadcom BCM5703X" rev 0x02, BCM5703 A2
> (0x1002): irq 11, address 00:0b:cd:83:67:89
> brgphy0 at bge0 phy 1: BCM5703 10/100/1000baseT PHY, rev. 2
> vga1 at pci0 dev 3 function 0 "ATI Rage XL" rev 0x27
> wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
> wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
> ciss0 at pci0 dev 4 function 0 "Compaq Smart Array 5i/532 rev.2" rev 0x01: 
> irq 3
> ciss0: 1 LD, HW rev 1, FW 2.76/2.76
> scsibus0 at ciss0: 1 targets
> sd0 at scsibus0 targ 0 lun 0:  SCSI2
> 0/direct fixed
> sd0: 34727MB, 4427 cyl, 255 head, 63 sec, 512 bytes/sec, 71122560 sec total
> "Compaq iLO" rev 0x01 at pci0 dev 5 function 0 not configured
> "Compaq iLO" rev 0x01 at pci0 dev 5 function 2 not configured
> piixpm0 at pci0 dev 15 function 0 "ServerWorks CSB5" rev 0x93: polling
> iic0 at piixpm0
> spdmem0 at iic0 addr 0x50: 512MB DDR SDRAM registered ECC PC2300CL2.5
> spdmem1 at iic0 addr 0x52: 512MB DDR SDRAM registered ECC PC2100CL2.5
> spdmem2 at iic0 addr 0x54: 512MB DDR SDRAM registered ECC PC2100CL2.5
> spdmem3 at iic0 addr 0x56: 512MB DDR SDRAM registered ECC PC2100CL2.5
> pciide0 at pci0 dev 15 function 1 "ServerWorks CSB5 IDE" rev 0x93: DMA
> atapiscsi0 at pciide0 channel 0 drive 0
> scsibus1 at atapiscsi0: 2 targets
> cd0 at scsibus1 targ 0 lun 0:  SCSI0 5/cdrom 
> removable
> cd0(pciide0:0:0): using PIO mode 4, DMA mode 2
> pciide0: no compatibility interrupt for use by channel 1
> ohci0 at pci0 dev 15 function 2 "ServerWorks OSB4/CSB5 USB" rev 0x05:
> irq 10, version 1.0, legacy support
> pchb3 at pci0 dev 15 function 3 "ServerWorks CSB5 LPC" rev 0x00
> pchb4 at pci0 dev 17 function 0 "ServerWorks CIOB-X2 PCIX" rev 0x05
> pchb5 at pci0 dev 17 function 2 "ServerWorks CIOB-X2 PCIX" rev 0x05
> pci2 at pchb5 bus 4
> bge1 at pci2 dev 2 function 0 "Broadcom BCM5703X" rev 0x02, BCM5703 A2
> (0x1002): irq 15, address 00:0b:cd:83:67:ab
> brgphy1 at bge1 phy 1: BCM5703 10/100/1000baseT PHY, rev. 2
> usb0 at ohci0: USB revision 1.0
> uhub0 at usb0 "ServerWorks OHCI root hub" rev 1.00/1.00 addr 1
> isa0 at mainbus0
> isadma0 at isa0
> pckbc0 at isa0 port 0x60/5
> pckbd0 at pckbc0 (kbd slot)
> pckbc0: using irq 1 for kbd slot
> wskbd0 at pckbd0: console keyboard, using wsdisplay0
> pmsi0 at pckbc0 (aux slot)
> pckbc0: using irq 12 for aux slot
> wsmouse0 at pmsi0 mux 0
> pcppi0 at isa0 port 0x61
> midi0 at pcppi0: 
> spkr0 at pcppi0
> npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
> pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
> fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
> fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
> biomask 65ed netmask eded ttymask ffef
> mtrr: Pentium Pro MTRR support
> softraid0 at root
> root on sd0a swap on sd0b dump on sd0b
> 

-- 
Guillermo Bernaldo de Quirss Maraver Pedroche.



Re: Shutdown with the power button

2008-10-16 Thread Marco Peereboom
It probably needs to be enabled in the bios.

On Thu, Oct 16, 2008 at 11:30:02PM +1100, Mikel Lindsaar wrote:
> On Thu, Oct 16, 2008 at 11:22 PM, Gregory Edigarov
> <[EMAIL PROTECTED]> wrote:
> > Mikel Lindsaar wrote:
> >> Wondering if anyone knows how (or if it is possible) to be able to
> >> gracefully power down an OpenBSD box by hitting the power button on
> >> the server.
> > Mine does clean  shutdown on power button just from the box
> 
> Hmm... here is the dmesg then any ideas?
> 
> 
> 
> OpenBSD 4.3 (GENERIC) #698: Wed Mar 12 11:07:05 MDT 2008
>[EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
> cpu0: Intel(R) Xeon(TM) CPU 3.06GHz ("GenuineIntel" 686-class) 3.07 GHz
> cpu0: 
> FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,CNXT-ID,xTPR
> real mem  = 2147028992 (2047MB)
> avail mem = 2068054016 (1972MB)
> mainbus0 at root
> bios0 at mainbus0: AT/286+ BIOS, date 12/31/99, BIOS32 rev. 0 @
> 0xf, SMBIOS rev. 2.3 @ 0xec000 (42 entries)
> bios0: vendor HP version "P31" date 03/03/2005
> bios0: HP ProLiant DL360 G3
> acpi0 at bios0: rev 0
> acpi0: tables DSDT FACP APIC SPCR
> acpi0: wakeup devices
> acpitimer0 at acpi0: 3579545 Hz, 32 bits
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpiprt1 at acpi0: bus 1 (PCI1)
> acpiprt2 at acpi0: bus 4 (PCI2)
> acpicpu0 at acpi0
> acpitz0 at acpi0: critical temperature 31 degC
> bios0: ROM list: 0xc/0x8000 0xc8000/0x4000 0xee000/0x2000!
> cpu0 at mainbus0
> pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
> pchb0 at pci0 dev 0 function 0 "ServerWorks CNB20-HE Host (GC-LE)" rev 0x31
> pchb1 at pci0 dev 0 function 1 "ServerWorks CNB20-HE Host (GC-LE)" rev 0x00
> pchb2 at pci0 dev 0 function 2 "ServerWorks CNB20-HE Host (GC-LE)" rev 0x00
> pci1 at pchb2 bus 1
> em0 at pci1 dev 1 function 0 "Intel PRO/1000MT (82546EB)" rev 0x01:
> irq 15, address 00:04:23:c8:03:f6
> em1 at pci1 dev 1 function 1 "Intel PRO/1000MT (82546EB)" rev 0x01:
> irq 11, address 00:04:23:c8:03:f7
> bge0 at pci1 dev 2 function 0 "Broadcom BCM5703X" rev 0x02, BCM5703 A2
> (0x1002): irq 11, address 00:0b:cd:83:67:89
> brgphy0 at bge0 phy 1: BCM5703 10/100/1000baseT PHY, rev. 2
> vga1 at pci0 dev 3 function 0 "ATI Rage XL" rev 0x27
> wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
> wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
> ciss0 at pci0 dev 4 function 0 "Compaq Smart Array 5i/532 rev.2" rev 0x01: 
> irq 3
> ciss0: 1 LD, HW rev 1, FW 2.76/2.76
> scsibus0 at ciss0: 1 targets
> sd0 at scsibus0 targ 0 lun 0:  SCSI2
> 0/direct fixed
> sd0: 34727MB, 4427 cyl, 255 head, 63 sec, 512 bytes/sec, 71122560 sec total
> "Compaq iLO" rev 0x01 at pci0 dev 5 function 0 not configured
> "Compaq iLO" rev 0x01 at pci0 dev 5 function 2 not configured
> piixpm0 at pci0 dev 15 function 0 "ServerWorks CSB5" rev 0x93: polling
> iic0 at piixpm0
> spdmem0 at iic0 addr 0x50: 512MB DDR SDRAM registered ECC PC2300CL2.5
> spdmem1 at iic0 addr 0x52: 512MB DDR SDRAM registered ECC PC2100CL2.5
> spdmem2 at iic0 addr 0x54: 512MB DDR SDRAM registered ECC PC2100CL2.5
> spdmem3 at iic0 addr 0x56: 512MB DDR SDRAM registered ECC PC2100CL2.5
> pciide0 at pci0 dev 15 function 1 "ServerWorks CSB5 IDE" rev 0x93: DMA
> atapiscsi0 at pciide0 channel 0 drive 0
> scsibus1 at atapiscsi0: 2 targets
> cd0 at scsibus1 targ 0 lun 0:  SCSI0 5/cdrom 
> removable
> cd0(pciide0:0:0): using PIO mode 4, DMA mode 2
> pciide0: no compatibility interrupt for use by channel 1
> ohci0 at pci0 dev 15 function 2 "ServerWorks OSB4/CSB5 USB" rev 0x05:
> irq 10, version 1.0, legacy support
> pchb3 at pci0 dev 15 function 3 "ServerWorks CSB5 LPC" rev 0x00
> pchb4 at pci0 dev 17 function 0 "ServerWorks CIOB-X2 PCIX" rev 0x05
> pchb5 at pci0 dev 17 function 2 "ServerWorks CIOB-X2 PCIX" rev 0x05
> pci2 at pchb5 bus 4
> bge1 at pci2 dev 2 function 0 "Broadcom BCM5703X" rev 0x02, BCM5703 A2
> (0x1002): irq 15, address 00:0b:cd:83:67:ab
> brgphy1 at bge1 phy 1: BCM5703 10/100/1000baseT PHY, rev. 2
> usb0 at ohci0: USB revision 1.0
> uhub0 at usb0 "ServerWorks OHCI root hub" rev 1.00/1.00 addr 1
> isa0 at mainbus0
> isadma0 at isa0
> pckbc0 at isa0 port 0x60/5
> pckbd0 at pckbc0 (kbd slot)
> pckbc0: using irq 1 for kbd slot
> wskbd0 at pckbd0: console keyboard, using wsdisplay0
> pmsi0 at pckbc0 (aux slot)
> pckbc0: using irq 12 for aux slot
> wsmouse0 at pmsi0 mux 0
> pcppi0 at isa0 port 0x61
> midi0 at pcppi0: 
> spkr0 at pcppi0
> npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
> pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
> fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
> fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
> biomask 65ed netmask eded ttymask ffef
> mtrr: Pentium Pro MTRR support
> softraid0 at root
> root on sd0a swap on sd0b dump on sd0b



Re: Shutdown with the power button

2008-10-16 Thread Mikel Lindsaar
On Thu, Oct 16, 2008 at 11:22 PM, Gregory Edigarov
<[EMAIL PROTECTED]> wrote:
> Mikel Lindsaar wrote:
>> Wondering if anyone knows how (or if it is possible) to be able to
>> gracefully power down an OpenBSD box by hitting the power button on
>> the server.
> Mine does clean  shutdown on power button just from the box

Hmm... here is the dmesg then any ideas?



OpenBSD 4.3 (GENERIC) #698: Wed Mar 12 11:07:05 MDT 2008
   [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel(R) Xeon(TM) CPU 3.06GHz ("GenuineIntel" 686-class) 3.07 GHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,CNXT-ID,xTPR
real mem  = 2147028992 (2047MB)
avail mem = 2068054016 (1972MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 12/31/99, BIOS32 rev. 0 @
0xf, SMBIOS rev. 2.3 @ 0xec000 (42 entries)
bios0: vendor HP version "P31" date 03/03/2005
bios0: HP ProLiant DL360 G3
acpi0 at bios0: rev 0
acpi0: tables DSDT FACP APIC SPCR
acpi0: wakeup devices
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (PCI1)
acpiprt2 at acpi0: bus 4 (PCI2)
acpicpu0 at acpi0
acpitz0 at acpi0: critical temperature 31 degC
bios0: ROM list: 0xc/0x8000 0xc8000/0x4000 0xee000/0x2000!
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 "ServerWorks CNB20-HE Host (GC-LE)" rev 0x31
pchb1 at pci0 dev 0 function 1 "ServerWorks CNB20-HE Host (GC-LE)" rev 0x00
pchb2 at pci0 dev 0 function 2 "ServerWorks CNB20-HE Host (GC-LE)" rev 0x00
pci1 at pchb2 bus 1
em0 at pci1 dev 1 function 0 "Intel PRO/1000MT (82546EB)" rev 0x01:
irq 15, address 00:04:23:c8:03:f6
em1 at pci1 dev 1 function 1 "Intel PRO/1000MT (82546EB)" rev 0x01:
irq 11, address 00:04:23:c8:03:f7
bge0 at pci1 dev 2 function 0 "Broadcom BCM5703X" rev 0x02, BCM5703 A2
(0x1002): irq 11, address 00:0b:cd:83:67:89
brgphy0 at bge0 phy 1: BCM5703 10/100/1000baseT PHY, rev. 2
vga1 at pci0 dev 3 function 0 "ATI Rage XL" rev 0x27
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
ciss0 at pci0 dev 4 function 0 "Compaq Smart Array 5i/532 rev.2" rev 0x01: irq 3
ciss0: 1 LD, HW rev 1, FW 2.76/2.76
scsibus0 at ciss0: 1 targets
sd0 at scsibus0 targ 0 lun 0:  SCSI2
0/direct fixed
sd0: 34727MB, 4427 cyl, 255 head, 63 sec, 512 bytes/sec, 71122560 sec total
"Compaq iLO" rev 0x01 at pci0 dev 5 function 0 not configured
"Compaq iLO" rev 0x01 at pci0 dev 5 function 2 not configured
piixpm0 at pci0 dev 15 function 0 "ServerWorks CSB5" rev 0x93: polling
iic0 at piixpm0
spdmem0 at iic0 addr 0x50: 512MB DDR SDRAM registered ECC PC2300CL2.5
spdmem1 at iic0 addr 0x52: 512MB DDR SDRAM registered ECC PC2100CL2.5
spdmem2 at iic0 addr 0x54: 512MB DDR SDRAM registered ECC PC2100CL2.5
spdmem3 at iic0 addr 0x56: 512MB DDR SDRAM registered ECC PC2100CL2.5
pciide0 at pci0 dev 15 function 1 "ServerWorks CSB5 IDE" rev 0x93: DMA
atapiscsi0 at pciide0 channel 0 drive 0
scsibus1 at atapiscsi0: 2 targets
cd0 at scsibus1 targ 0 lun 0:  SCSI0 5/cdrom removable
cd0(pciide0:0:0): using PIO mode 4, DMA mode 2
pciide0: no compatibility interrupt for use by channel 1
ohci0 at pci0 dev 15 function 2 "ServerWorks OSB4/CSB5 USB" rev 0x05:
irq 10, version 1.0, legacy support
pchb3 at pci0 dev 15 function 3 "ServerWorks CSB5 LPC" rev 0x00
pchb4 at pci0 dev 17 function 0 "ServerWorks CIOB-X2 PCIX" rev 0x05
pchb5 at pci0 dev 17 function 2 "ServerWorks CIOB-X2 PCIX" rev 0x05
pci2 at pchb5 bus 4
bge1 at pci2 dev 2 function 0 "Broadcom BCM5703X" rev 0x02, BCM5703 A2
(0x1002): irq 15, address 00:0b:cd:83:67:ab
brgphy1 at bge1 phy 1: BCM5703 10/100/1000baseT PHY, rev. 2
usb0 at ohci0: USB revision 1.0
uhub0 at usb0 "ServerWorks OHCI root hub" rev 1.00/1.00 addr 1
isa0 at mainbus0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pmsi0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pmsi0 mux 0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: 
spkr0 at pcppi0
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
biomask 65ed netmask eded ttymask ffef
mtrr: Pentium Pro MTRR support
softraid0 at root
root on sd0a swap on sd0b dump on sd0b



Shutdown with the power button

2008-10-16 Thread Mikel Lindsaar
Hi list,

Wondering if anyone knows how (or if it is possible) to be able to
gracefully power down an OpenBSD box by hitting the power button on
the server.

Useful when you need someone to power down a system (like in a power
failure situation) but there is no console attached.

FreeBSD and linux provide what I am talking about, hit the power
button and it looks like the equiv of a halt -p - But I don't want to
use linux or FreeBSD on these firewall boxes.

Not something I would use very often, but two nights ago really needed
it.  The OpenBSD box ended up having a hard power switch off instead
of a clean shutdown.

The server in question is a HP DL 360.

Thanks,

Mikel



Re: Shutdown and Powerdown when the power button is pressed

2008-08-24 Thread Remco
Ajitabh Pandey wrote:

> Hi,
> 
> I have a Dell Pentium III 1GHz/512MB running OpenBSD 4.3. I am running
> the generic kernel. When I press the power button on the front the
> machine just switches off.
> 
> I wanted if the power button is pressed then the shutdown is started
> followed by poweroff (shutdown -hp now).
> 
The OS can override the BIOS when it's ACPI enabled. It seems you do not
have a multi-processor system and I think ACPI is disabled.

What works for me is to create a kernel image with APM disabled and ACPI
enabled. (see config(8), you can temporarily do this by using the -c option
at the boot prompt and type "disable apm", "enable acpi", see boot.conf(5))
If your dmesg shows you:
acpibtn0 at acpi0: PWRB
you should have a working power button. (also see acpi(4), acpibtn(4))



Re: Shutdown and Powerdown when the power button is pressed

2008-08-24 Thread Stijn

Ajitabh Pandey wrote:

Hi,

I have a Dell Pentium III 1GHz/512MB running OpenBSD 4.3. I am running
the generic kernel. When I press the power button on the front the
machine just switches off.

I wanted if the power button is pressed then the shutdown is started
followed by poweroff (shutdown -hp now).

This machine was running Ubuntu sometime back and If I remember
correct this used to happen.

Any pointers, please?

Regards.
  

1. Provide a dmesg
2. What action is set in the BIOS for "power button"
3. What does "halt -p" do?

HTH,
Stijn



Re: Shutdown and Powerdown when the power button is pressed

2008-08-24 Thread ropers
The first thing I would do is look at the BIOS and check whether it
still works with an Ubuntu LiveCD. Only then would I start looking at
what OpenBSD is doing, starting with a look at dmesg.

2008/8/24 Ajitabh Pandey <[EMAIL PROTECTED]>:
> Hi,
>
> I have a Dell Pentium III 1GHz/512MB running OpenBSD 4.3. I am running
> the generic kernel. When I press the power button on the front the
> machine just switches off.
>
> I wanted if the power button is pressed then the shutdown is started
> followed by poweroff (shutdown -hp now).
>
> This machine was running Ubuntu sometime back and If I remember
> correct this used to happen.
>
> Any pointers, please?
>
> Regards.
> --
> Ajitabh Pandey
> http://www.ajitabhpandey.info/ | http://www.unixclinic.net/
> ICQ - 150615062
> Registered Linux User - 240748



Shutdown and Powerdown when the power button is pressed

2008-08-24 Thread Ajitabh Pandey
Hi,

I have a Dell Pentium III 1GHz/512MB running OpenBSD 4.3. I am running
the generic kernel. When I press the power button on the front the
machine just switches off.

I wanted if the power button is pressed then the shutdown is started
followed by poweroff (shutdown -hp now).

This machine was running Ubuntu sometime back and If I remember
correct this used to happen.

Any pointers, please?

Regards.
-- 
Ajitabh Pandey
http://www.ajitabhpandey.info/ | http://www.unixclinic.net/
ICQ - 150615062
Registered Linux User - 240748